mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
fix an x86-64 encoding bug Daniel found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98855 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -278,7 +278,10 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
|
||||
// Emit the normal disp32 encoding.
|
||||
EmitByte(ModRMByte(2, RegOpcodeField, 4), CurByte, OS);
|
||||
ForceDisp32 = true;
|
||||
} else if (Disp.getImm() == 0 && BaseReg != X86::EBP) {
|
||||
} else if (Disp.getImm() == 0 &&
|
||||
// Base reg can't be anything that ends up with '5' as the base
|
||||
// reg, it is the magic [*] nomenclature that indicates no base.
|
||||
BaseRegNo != N86::EBP) {
|
||||
// Emit no displacement ModR/M byte
|
||||
EmitByte(ModRMByte(0, RegOpcodeField, 4), CurByte, OS);
|
||||
} else if (isDisp8(Disp.getImm())) {
|
||||
|
Reference in New Issue
Block a user