diff options
author | kobalicek <kobalicek.petr@gmail.com> | 2017-03-21 14:16:08 +0300 |
---|---|---|
committer | kobalicek <kobalicek.petr@gmail.com> | 2017-03-21 14:16:08 +0300 |
commit | 46daab98b111dcb4728c2891e81cf3ef6014fb40 (patch) | |
tree | bdffbaef79db19d28d15adc2b5a2d5c584d9d737 | |
parent | 81a78351b32e155a0e4a9ba180882b4b6fa7fc6e (diff) |
[bug] Fixed incorrect code generated by setcc instruction when using GPB.HI reg
-rw-r--r-- | src/asmjit/x86/x86assembler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/asmjit/x86/x86assembler.cpp b/src/asmjit/x86/x86assembler.cpp index 75b86cd..ad21293 100644 --- a/src/asmjit/x86/x86assembler.cpp +++ b/src/asmjit/x86/x86assembler.cpp @@ -484,11 +484,10 @@ Error X86Assembler::onDetach(CodeHolder* code) noexcept { // - Disallow REX prefix. #define FIXUP_GPB(REG_OP, REG_ID, ...) \ do { \ - if (static_cast<const X86Gp&>(REG_OP).isGpbLo()) { \ + if (!static_cast<const X86Gp&>(REG_OP).isGpbHi()) { \ options |= (REG_ID >= 4) ? X86Inst::kOptionRex : 0; \ } \ else { \ - ASMJIT_ASSERT(X86Reg::isGpbHi(REG_OP)); \ options |= X86Inst::_kOptionInvalidRex; \ REG_ID += 4; \ } \ @@ -1840,6 +1839,7 @@ CaseX86Pop_Gp: case X86Inst::kEncodingX86Set: if (isign3 == ENC_OPS1(Reg)) { rbReg = o0.getId(); + FIXUP_GPB(o0, rbReg); goto EmitX86R; } |