mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-11 06:06:52 +00:00
finish up support for callw: PR7195
llvm-svn: 107826
This commit is contained in:
parent
6a5db9c9c9
commit
155420f59f
@ -33,6 +33,7 @@ static unsigned getFixupKindLog2Size(unsigned Kind) {
|
||||
default: llvm_unreachable("invalid fixup kind!");
|
||||
case X86::reloc_pcrel_1byte:
|
||||
case FK_Data_1: return 0;
|
||||
case X86::reloc_pcrel_2byte:
|
||||
case FK_Data_2: return 1;
|
||||
case X86::reloc_pcrel_4byte:
|
||||
case X86::reloc_riprel_4byte:
|
||||
@ -47,6 +48,7 @@ static bool isFixupKindPCRel(unsigned Kind) {
|
||||
default:
|
||||
return false;
|
||||
case X86::reloc_pcrel_1byte:
|
||||
case X86::reloc_pcrel_2byte:
|
||||
case X86::reloc_pcrel_4byte:
|
||||
case X86::reloc_riprel_4byte:
|
||||
case X86::reloc_riprel_4byte_movq_load:
|
||||
|
@ -201,7 +201,7 @@ EmitImmediate(const MCOperand &DispOp, unsigned Size, MCFixupKind FixupKind,
|
||||
FixupKind == MCFixupKind(X86::reloc_riprel_4byte_movq_load))
|
||||
ImmOffset -= 4;
|
||||
if (FixupKind == MCFixupKind(X86::reloc_pcrel_2byte))
|
||||
ImmOffset -= 4;// FIXME: This should be 2, but 'as' produces an offset of 4.
|
||||
ImmOffset -= 2;
|
||||
if (FixupKind == MCFixupKind(X86::reloc_pcrel_1byte))
|
||||
ImmOffset -= 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user