about summary refs log tree commit diff stats
path: root/subx/014index_addressing.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2018-01-24 21:01:47 -0800
committerKartik K. Agaram <vc@akkartik.com>2018-01-24 21:14:31 -0800
commit871ea368d14d0ce474a7db20f13684bdcde2a7e1 (patch)
tree1a880b871739f1857a9ce2d501b2349a6152a6d8 /subx/014index_addressing.cc
parent631de5d9819531e7428a115e81c8e5e627609f52 (diff)
downloadmu-871ea368d14d0ce474a7db20f13684bdcde2a7e1.tar.gz
4189
Diffstat (limited to 'subx/014index_addressing.cc')
-rw-r--r--subx/014index_addressing.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/subx/014index_addressing.cc b/subx/014index_addressing.cc
index 8e032f38..723a243a 100644
--- a/subx/014index_addressing.cc
+++ b/subx/014index_addressing.cc
@@ -8,8 +8,8 @@
   01  1c      20                             # add EBX to *EAX
 # ModR/M in binary: 00 (indirect mode) 011 (src EBX) 100 (dest in SIB)
 # SIB in binary: 00 (scale 1) 100 (no index) 000 (base EAX)
-+run: add EBX to effective address
-+run: effective address is mem at address 0x60 (EAX)
++run: add EBX to r/m32
++run: effective address is 0x60 (EAX)
 +run: storing 0x00000011
 
 :(before "End Mod 0 Special-cases")
@@ -45,13 +45,13 @@ uint32_t effective_address_from_sib(uint8_t mod) {
   uint8_t index = (sib>>3)&0x7;
   if (index == ESP) {
     // ignore index and scale
-    trace(2, "run") << "effective address is mem at address 0x" << std::hex << Reg[base].u << " (" << rname(base) << ")" << end();
+    trace(2, "run") << "effective address is 0x" << std::hex << Reg[base].u << " (" << rname(base) << ")" << end();
     return Reg[base].u;
   }
   else {
     uint8_t scale = (1 << (sib>>6));
     uint32_t addr = Reg[base].u + Reg[index].i*scale;  // treat index register as signed. Maybe base as well? But we'll always ensure it's non-negative.
-    trace(2, "run") << "effective address is mem at address 0x" << std::hex << addr << " (" << rname(base) << " + " << rname(index) << "*" << NUM(scale) << ")" << end();
+    trace(2, "run") << "effective address is 0x" << std::hex << addr << " (" << rname(base) << " + " << rname(index) << "*" << NUM(scale) << ")" << end();
     return addr;
   }
 }
@@ -65,6 +65,6 @@ uint32_t effective_address_from_sib(uint8_t mod) {
   01  1c      08                             # add EBX to *(EAX+ECX)
 # ModR/M in binary: 00 (indirect mode) 011 (src EBX) 100 (dest in SIB)
 # SIB in binary: 00 (scale 1) 001 (index ECX) 000 (base EAX)
-+run: add EBX to effective address
-+run: effective address is mem at address 0x60 (EAX + ECX*1)
++run: add EBX to r/m32
++run: effective address is 0x60 (EAX + ECX*1)
 +run: storing 0x00000011