about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-10-12 22:40:48 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-10-12 22:40:48 -0700
commit6c112cbc14503d9a48b71802d5879dd03a259450 (patch)
treea59bb9212b0daf62c6807a9b9b4c18078f82838a /subx
parent998a943933faea807ca11b9b5c77d44d53e66577 (diff)
downloadmu-6c112cbc14503d9a48b71802d5879dd03a259450.tar.gz
4046
Diffstat (limited to 'subx')
-rw-r--r--subx/011add.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/subx/011add.cc b/subx/011add.cc
index 5bcd62d8..82495865 100644
--- a/subx/011add.cc
+++ b/subx/011add.cc
@@ -156,3 +156,15 @@ case 5: {
   BINARY_ARITHMETIC_OP(-, *arg1, arg2);
   break;
 }
+
+//:
+
+:(scenario sub_imm32_from_mem_at_r32)
+% Reg[3].i = 0x60;
+% Mem.at(0x60) = 10;
+# op  ModRM   SIB   displacement  immediate
+  81  2b                          01 00 00 00  # subtract 1 from *EBX (reg 3)
++run: combine imm32 0x00000001 with effective address
++run: effective address is mem at address 0x60 (reg 3)
++run: subop subtract
++run: storing 0x00000009