mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 18:31:23 +00:00
Split out these asserts so it's more apparent why we're not assembling
that rip-relative address when executing in 32-bit mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105656 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6335ac67b6
commit
497f1eb2b8
@ -202,8 +202,8 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
|
||||
|
||||
// Handle %rip relative addressing.
|
||||
if (BaseReg == X86::RIP) { // [disp32+RIP] in X86-64 mode
|
||||
assert(IndexReg.getReg() == 0 && Is64BitMode &&
|
||||
"Invalid rip-relative address");
|
||||
assert(Is64BitMode && "Rip-relative addressing requires 64-bit mode");
|
||||
assert(IndexReg.getReg() == 0 && "Invalid rip-relative address");
|
||||
EmitByte(ModRMByte(0, RegOpcodeField, 5), CurByte, OS);
|
||||
|
||||
unsigned FixupKind = X86::reloc_riprel_4byte;
|
||||
|
Loading…
Reference in New Issue
Block a user