diff options
| author | Robert Norton | 2017-10-02 15:49:35 +0100 |
|---|---|---|
| committer | Robert Norton | 2017-10-02 15:49:35 +0100 |
| commit | 4d3e8058659d32e0b2668950fb1bb9d2a80cd7a1 (patch) | |
| tree | de75e43e12ff648b422149736536d573e1291e1f /cheri | |
| parent | fcf8270b4f46b4cd92534807292694bfd6d14457 (diff) | |
cheri: fix swapped cmovz and cmovn.
Diffstat (limited to 'cheri')
| -rw-r--r-- | cheri/cheri_insts.sail | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cheri/cheri_insts.sail b/cheri/cheri_insts.sail index 8b5d9dd0..caa87e55 100644 --- a/cheri/cheri_insts.sail +++ b/cheri/cheri_insts.sail @@ -468,9 +468,9 @@ function clause execute (CClearTag(cd, cb)) = } union ast member (regno,regno,regno,bool) CMOVX -function clause decode (0b010010 : 0b00000 : (regno) cd : (regno) cb : (regno) rt : 0b011100) = Some(CMOVX(cd, cb, rt, false)) (* CMOVN *) -function clause decode (0b010010 : 0b00000 : (regno) cd : (regno) cb : (regno) rt : 0b011011) = Some(CMOVX(cd, cb, rt, true)) (* CMOVZ *) -function clause execute (CMOVX(cd, cb, rt, ismovz)) = +function clause decode (0b010010 : 0b00000 : (regno) cd : (regno) cb : (regno) rt : 0b011100) = Some(CMOVX(cd, cb, rt, true)) (* CMOVN *) +function clause decode (0b010010 : 0b00000 : (regno) cd : (regno) cb : (regno) rt : 0b011011) = Some(CMOVX(cd, cb, rt, false)) (* CMOVZ *) +function clause execute (CMOVX(cd, cb, rt, ismovn)) = { (* START_CMOVX *) checkCP2usable(); @@ -478,7 +478,7 @@ function clause execute (CMOVX(cd, cb, rt, ismovz)) = raise_c2_exception(CapEx_AccessSystemRegsViolation, cd) else if (register_inaccessible(cb)) then raise_c2_exception(CapEx_AccessSystemRegsViolation, cb) - else if ((rGPR(rt) == 0) ^ ismovz) then + else if ((rGPR(rt) == 0) ^ ismovn) then writeCapReg(cd) := readCapReg(cb); (* END_CMOVX *) } |
