mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
ADD64ri32 sign extends its argument, so we need to use a R_X86_64_32S.
Fixes PR9934. We really need to start tblgening the relocation info :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131669 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1015,7 +1015,8 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS,
|
||||
} else {
|
||||
unsigned FixupKind;
|
||||
// FIXME: Is there a better way to know that we need a signed relocation?
|
||||
if (MI.getOpcode() == X86::MOV64ri32 ||
|
||||
if (MI.getOpcode() == X86::ADD64ri32 ||
|
||||
MI.getOpcode() == X86::MOV64ri32 ||
|
||||
MI.getOpcode() == X86::MOV64mi32 ||
|
||||
MI.getOpcode() == X86::PUSH64i32)
|
||||
FixupKind = X86::reloc_signed_4byte;
|
||||
|
Reference in New Issue
Block a user