summaryrefslogtreecommitdiff
path: root/cheri
diff options
context:
space:
mode:
authorRobert Norton2016-04-15 16:23:22 +0100
committerRobert Norton2016-04-15 16:23:22 +0100
commit13d2b02fe550366a23812ab4b85cbdad3c1a751d (patch)
tree17b3f20db6d644b8816c08abf95a048d182eb2fa /cheri
parentddda8969d55f2c76f24ea29fce33030851cff5bf (diff)
signed comparison between nats is not sensible. cast to bit vector instead.
Diffstat (limited to 'cheri')
-rw-r--r--cheri/cheri_insts.sail2
1 files changed, 1 insertions, 1 deletions
diff --git a/cheri/cheri_insts.sail b/cheri/cheri_insts.sail
index 88516bb4..d331e695 100644
--- a/cheri/cheri_insts.sail
+++ b/cheri/cheri_insts.sail
@@ -160,7 +160,7 @@ function clause execute(CPtrCmp(rd, cb, ct, op)) =
cursor2 := getCapCursor(ct_val);
equal := (cursor1 == cursor2);
ltu := (cursor1 < cursor2);
- lts := (cursor1 <_s cursor2);
+ lts := (((bit[64])cursor1) <_s ((bit[64])cursor2));
};
wGPR(rd) := EXTZ(switch (op) {
case CEQ -> [equal]