diff options
author | Eyal Sawady <ecs@d2evs.net> | 2022-01-17 22:00:48 +0000 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-01-23 11:43:59 +0100 |
commit | e91d12158122b23271ff49de8977c92fef7f3908 (patch) | |
tree | ea5051ef69ae917f23249fe7a6adc8569deb3718 /ops.h | |
parent | 367c8215d99054892740ad74c690b106c45ebf60 (diff) | |
download | roux-e91d12158122b23271ff49de8977c92fef7f3908.tar.gz |
Add a negation instruction
Necessary for floating-point negation, because `%result = sub 0, %operand` doesn't give the correct sign for 0/-0.
Diffstat (limited to 'ops.h')
-rw-r--r-- | ops.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ops.h b/ops.h index 535be71..0729d46 100644 --- a/ops.h +++ b/ops.h @@ -15,6 +15,7 @@ /* Arithmetic and Bits */ O(add, T(w,l,s,d, w,l,s,d), 1) X(2, 1, 0) O(sub, T(w,l,s,d, w,l,s,d), 1) X(2, 1, 0) +O(neg, T(w,l,s,d, x,x,x,x), 1) X(1, 1, 0) O(div, T(w,l,s,d, w,l,s,d), 1) X(0, 0, 0) O(rem, T(w,l,e,e, w,l,e,e), 1) X(0, 0, 0) O(udiv, T(w,l,e,e, w,l,e,e), 1) X(0, 0, 0) |