Skip to content

Commit

Permalink
[BUG] Fixed REX.W prefix in short form of arithmetic instruction (REX…
Browse files Browse the repository at this point in the history
….W was deleted by opcode = ...)
  • Loading branch information
kobalicek committed Jun 15, 2015
1 parent 3d3d5f5 commit ec8eb0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/asmjit/x86/x86assembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,8 @@ static Error ASMJIT_CDECL X86Assembler_emit(Assembler* self_, uint32_t code, con

// Alternate Form - AL, AX, EAX, RAX.
if (rmReg == 0 && (o0->getSize() == 1 || imLen != 1)) {
opCode = ((opReg << 3) | (0x04 + (o0->getSize() != 1)));
opCode &= kX86InstOpCode_PP_66 | kX86InstOpCode_W;
opCode |= ((opReg << 3) | (0x04 + (o0->getSize() != 1)));
imLen = IntUtil::iMin<uint32_t>(o0->getSize(), 4);
goto _EmitX86Op;
}
Expand Down

0 comments on commit ec8eb0d

Please sign in to comment.