diff options
| author | azidar | 2015-07-30 13:47:04 -0700 |
|---|---|---|
| committer | azidar | 2015-07-30 13:47:04 -0700 |
| commit | a2f3ac70d45b6a419178e2d28a2b7be801599d13 (patch) | |
| tree | fd8700ae147f27895214221c33077fed63a54386 /src/main/stanza/primop.stanza | |
| parent | d9bb443216d7e6d2214cc91c4d9b5f182164577e (diff) | |
Added eqv for bitwise equality, and change eq to be arithmetic equality
Diffstat (limited to 'src/main/stanza/primop.stanza')
| -rw-r--r-- | src/main/stanza/primop.stanza | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/stanza/primop.stanza b/src/main/stanza/primop.stanza index 0e343d74..f7eb6d04 100644 --- a/src/main/stanza/primop.stanza +++ b/src/main/stanza/primop.stanza @@ -39,6 +39,8 @@ public defn lower-and-type-primop (e:DoPrim) -> DoPrim : GREATER-EQ-OP : DoPrim(GREATER-EQ-OP,args(e),consts(e),u()) EQUAL-OP : DoPrim(EQUAL-OP,args(e),consts(e),u()) NEQUAL-OP : DoPrim(NEQUAL-OP,args(e),consts(e),u()) + EQUIV-OP : DoPrim(EQUIV-OP,args(e),consts(e),u()) + NEQUIV-OP : DoPrim(NEQUIV-OP,args(e),consts(e),u()) MUX-OP : DoPrim(MUX-OP,args(e),consts(e),of-type(args(e)[1])) PAD-OP : DoPrim(PAD-OP,args(e),consts(e),of-type(args(e)[0])) AS-UINT-OP : DoPrim(AS-UINT-OP,args(e),consts(e),u()) @@ -98,6 +100,8 @@ public defn primop-gen-constraints (e:DoPrim,v:Vector<WGeq>) -> Type : GREATER-EQ-OP : IntWidth(1) EQUAL-OP : IntWidth(1) NEQUAL-OP : IntWidth(1) + EQUIV-OP : IntWidth(1) + NEQUIV-OP : IntWidth(1) MUX-OP : add(v,WGeq(IntWidth(1),width!(args(e)[0]))) add(v,WGeq(width!(args(e)[0]),IntWidth(1))) |
