about summary refs log tree commit diff stats
path: root/mu_instructions
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-10-04 01:25:02 -0700
committerKartik Agaram <vc@akkartik.com>2020-10-04 01:25:02 -0700
commit21ff6d831aaa59f12f977c2bf93730c39d301bc3 (patch)
tree8fcf579da347581b9fcc6e48a3d0ea3ad917ab0a /mu_instructions
parent93c6352dda47f54c602a343b665bf7860678561b (diff)
downloadmu-21ff6d831aaa59f12f977c2bf93730c39d301bc3.tar.gz
6944
Diffstat (limited to 'mu_instructions')
-rw-r--r--mu_instructions4
1 files changed, 4 insertions, 0 deletions
diff --git a/mu_instructions b/mu_instructions
index 9c16607e..4248f680 100644
--- a/mu_instructions
+++ b/mu_instructions
@@ -81,6 +81,10 @@ var/reg <- xor n                  => "81 6/subop/xor %" reg " " n "/imm32"
 xor-with var, n                   => "81 6/subop/xor *(ebp+" var.stack-offset ") " n "/imm32"
 xor-with *var/reg, n              => "81 6/subop/xor *" reg " " n "/imm32"
 
+var/reg <- negate                 => "f7 3/subop/negate %" reg
+negate var                        => "f7 3/subop/negate *(ebp+" var.stack-offset ")"
+negate *var/reg                   => "f7 3/subop/negate *" reg
+
 var/reg <- shift-left n           => "c1/shift 4/subop/left %" reg " " n "/imm32"
 var/reg <- shift-right n          => "c1/shift 5/subop/right %" reg " " n "/imm32"
 var/reg <- shift-right-signed n   => "c1/shift 7/subop/right-signed %" reg " " n "/imm32"