From d1c9392a5461e0d33e226375a8f7986a97d2d66b Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 26 Nov 2018 01:19:47 -0800 Subject: 4782 --- html/subx/021byte_addressing.cc.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'html/subx/021byte_addressing.cc.html') diff --git a/html/subx/021byte_addressing.cc.html b/html/subx/021byte_addressing.cc.html index a6b00dc7..f9f9e055 100644 --- a/html/subx/021byte_addressing.cc.html +++ b/html/subx/021byte_addressing.cc.html @@ -88,18 +88,18 @@ if ('onhashchange' in window) { 27 return reg_8bit(rm); 28 } 29 // the rest is as usual - 30 return mem_addr_u8(effective_address_number(modrm)); + 30 return mem_addr_u8(effective_address_number(modrm)); 31 } 32 33 uint8_t* reg_8bit(uint8_t rm) { - 34 uint8_t* result = reinterpret_cast<uint8_t*>(&Reg[rm & 0x3].i); // _L register + 34 uint8_t* result = reinterpret_cast<uint8_t*>(&Reg[rm & 0x3].i); // _L register 35 if (rm & 0x4) 36 ++result; // _H register; assumes host is little-endian 37 return result; 38 } 39 40 :(before "End Initialize Op Names") - 41 put_new(Name, "88", "copy r8 to r8/m8-at-r32"); + 41 put_new(Name, "88", "copy r8 to r8/m8-at-r32"); 42 43 :(scenario copy_r8_to_mem_at_r32) 44 % Reg[EBX].i = 0x224488ab; @@ -117,21 +117,21 @@ if ('onhashchange' in window) { 56 57 :(before "End Single-Byte Opcodes") 58 case 0x88: { // copy r8 to r/m8 - 59 const uint8_t modrm = next(); + 59 const uint8_t modrm = next(); 60 const uint8_t rsrc = (modrm>>3)&0x7; 61 trace(90, "run") << "copy " << rname_8bit(rsrc) << " to r8/m8-at-r32" << end(); 62 // use unsigned to zero-extend 8-bit value to 32 bits 63 uint8_t* dest = reinterpret_cast<uint8_t*>(effective_byte_address(modrm)); 64 const uint8_t* src = reg_8bit(rsrc); 65 *dest = *src; - 66 trace(90, "run") << "storing 0x" << HEXBYTE << NUM(*dest) << end(); + 66 trace(90, "run") << "storing 0x" << HEXBYTE << NUM(*dest) << end(); 67 break; 68 } 69 70 //: 71 72 :(before "End Initialize Op Names") - 73 put_new(Name, "8a", "copy r8/m8-at-r32 to r8"); + 73 put_new(Name, "8a", "copy r8/m8-at-r32 to r8"); 74 75 :(scenario copy_mem_at_r32_to_r8) 76 % Reg[EBX].i = 0xaabbcc0f; // one nibble each of lowest byte set to all 0s and all 1s, to maximize value of this test @@ -150,16 +150,16 @@ if ('onhashchange' in window) { 89 90 :(before "End Single-Byte Opcodes") 91 case 0x8a: { // copy r/m8 to r8 - 92 const uint8_t modrm = next(); + 92 const uint8_t modrm = next(); 93 const uint8_t rdest = (modrm>>3)&0x7; 94 trace(90, "run") << "copy r8/m8-at-r32 to " << rname_8bit(rdest) << end(); 95 // use unsigned to zero-extend 8-bit value to 32 bits 96 const uint8_t* src = reinterpret_cast<uint8_t*>(effective_byte_address(modrm)); 97 uint8_t* dest = reg_8bit(rdest); - 98 trace(90, "run") << "storing 0x" << HEXBYTE << NUM(*src) << end(); + 98 trace(90, "run") << "storing 0x" << HEXBYTE << NUM(*src) << end(); 99 *dest = *src; 100 const uint8_t rdest_32bit = rdest & 0x3; -101 trace(90, "run") << rname(rdest_32bit) << " now contains 0x" << HEXWORD << Reg[rdest_32bit].u << end(); +101 trace(90, "run") << rname(rdest_32bit) << " now contains 0x" << HEXWORD << Reg[rdest_32bit].u << end(); 102 break; 103 } 104 -- cgit 1.4.1-2-gfad0