diff options
Diffstat (limited to 'subx/011direct_addressing.cc')
-rw-r--r-- | subx/011direct_addressing.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/subx/011direct_addressing.cc b/subx/011direct_addressing.cc index de5e923a..bbd482d4 100644 --- a/subx/011direct_addressing.cc +++ b/subx/011direct_addressing.cc @@ -83,3 +83,24 @@ case 0x21: { // and r32 with r/m32 BINARY_BITWISE_OP(&, *arg1, Reg[arg2].u); break; } + +//:: or + +:(scenario or_r32_with_r32) +% Reg[0].i = 0x0a0b0c0d; +% Reg[3].i = 0xa0b0c0d0; +# op ModR/M SIB displacement immediate + 09 d8 # or EBX (reg 3) with destination EAX (reg 0) ++run: or reg 3 with effective address ++run: effective address is reg 0 ++run: storing 0xaabbccdd + +:(before "End Single-Byte Opcodes") +case 0x09: { // or r32 with r/m32 + uint8_t modrm = next(); + uint8_t arg2 = (modrm>>3)&0x7; + trace(2, "run") << "or reg " << NUM(arg2) << " with effective address" << end(); + int32_t* arg1 = effective_address(modrm); + BINARY_BITWISE_OP(|, *arg1, Reg[arg2].u); + break; +} |