From 695f9bf8d0a7d0a871b8ab75270ceb29715d9be3 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 25 Jul 2019 00:08:23 -0700 Subject: 5468 --- html/subx/016index_addressing.cc.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'html/subx/016index_addressing.cc.html') diff --git a/html/subx/016index_addressing.cc.html b/html/subx/016index_addressing.cc.html index 68841882..bd2304e9 100644 --- a/html/subx/016index_addressing.cc.html +++ b/html/subx/016index_addressing.cc.html @@ -71,7 +71,7 @@ if ('onhashchange' in window) { 13 "== data 0x2000\n" 14 "01 00 00 00\n" // 0x00000001 15 ); - 16 CHECK_TRACE_CONTENTS( + 16 CHECK_TRACE_CONTENTS( 17 "run: add EBX to r/m32\n" 18 "run: effective address is initially 0x00002000 (EAX)\n" 19 "run: effective address is 0x00002000\n" @@ -85,27 +85,27 @@ if ('onhashchange' in window) { 27 break; 28 :(code) 29 uint32_t effective_address_from_sib(uint8_t mod) { - 30 const uint8_t sib = next(); + 30 const uint8_t sib = next(); 31 const uint8_t base = sib&0x7; 32 uint32_t addr = 0; 33 if (base != EBP || mod != 0) { 34 addr = Reg[base].u; - 35 trace(Callstack_depth+1, "run") << "effective address is initially 0x" << HEXWORD << addr << " (" << rname(base) << ")" << end(); + 35 trace(Callstack_depth+1, "run") << "effective address is initially 0x" << HEXWORD << addr << " (" << rname(base) << ")" << end(); 36 } 37 else { 38 // base == EBP && mod == 0 39 addr = next32(); // ignore base - 40 trace(Callstack_depth+1, "run") << "effective address is initially 0x" << HEXWORD << addr << " (disp32)" << end(); + 40 trace(Callstack_depth+1, "run") << "effective address is initially 0x" << HEXWORD << addr << " (disp32)" << end(); 41 } 42 const uint8_t index = (sib>>3)&0x7; 43 if (index == ESP) { 44 // ignore index and scale - 45 trace(Callstack_depth+1, "run") << "effective address is 0x" << HEXWORD << addr << end(); + 45 trace(Callstack_depth+1, "run") << "effective address is 0x" << HEXWORD << addr << end(); 46 } 47 else { 48 const uint8_t scale = (1 << (sib>>6)); 49 addr += Reg[index].i*scale; // treat index register as signed. Maybe base as well? But we'll always ensure it's non-negative. - 50 trace(Callstack_depth+1, "run") << "effective address is 0x" << HEXWORD << addr << " (after adding " << rname(index) << "*" << NUM(scale) << ")" << end(); + 50 trace(Callstack_depth+1, "run") << "effective address is 0x" << HEXWORD << addr << " (after adding " << rname(index) << "*" << NUM(scale) << ")" << end(); 51 } 52 return addr; 53 } @@ -124,7 +124,7 @@ if ('onhashchange' in window) { 66 "== data 0x2000\n" 67 "01 00 00 00\n" // 0x00000001 68 ); - 69 CHECK_TRACE_CONTENTS( + 69 CHECK_TRACE_CONTENTS( 70 "run: add EBX to r/m32\n" 71 "run: effective address is initially 0x00001ffe (EAX)\n" 72 "run: effective address is 0x00002000 (after adding ECX*1)\n" @@ -144,7 +144,7 @@ if ('onhashchange' in window) { 86 "== data 0x2000\n" 87 "01 00 00 00\n" // 0x00000001 88 ); - 89 CHECK_TRACE_CONTENTS( + 89 CHECK_TRACE_CONTENTS( 90 "run: add EBX to r/m32\n" 91 "run: effective address is initially 0x00002000 (disp32)\n" 92 "run: effective address is 0x00002000\n" @@ -168,7 +168,7 @@ if ('onhashchange' in window) { 110 "== data 0x2000\n" 111 "01 00 00 00\n" // 0x00000001 112 ); -113 CHECK_TRACE_CONTENTS( +113 CHECK_TRACE_CONTENTS( 114 "run: add EBX to r/m32\n" 115 "run: effective address is initially 0x00001ff9 (EAX)\n" 116 "run: effective address is 0x00001ffe (after adding ECX*1)\n" @@ -198,7 +198,7 @@ if ('onhashchange' in window) { 140 "== data 0x2000\n" 141 "01 00 00 00\n" // 0x00000001 142 ); -143 CHECK_TRACE_CONTENTS( +143 CHECK_TRACE_CONTENTS( 144 "run: add EBX to r/m32\n" 145 "run: effective address is initially 0x00001ff9 (EAX)\n" 146 "run: effective address is 0x00001ffe (after adding ECX*1)\n" -- cgit 1.4.1-2-gfad0