mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-24 15:12:36 +00:00
Add support for Thumb interworking addresses for symbol offsets that get constant folded very early.
This fixes SPASS with -integrated-as. <rdar://problem/9165399> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ffcb717488
commit
ce3a1bac4b
@ -310,6 +310,11 @@ static void AttemptToFoldSymbolOffsetDifference(const MCAssembler *Asm,
|
||||
if (AD.getFragment() == BD.getFragment()) {
|
||||
Addend += (AD.getOffset() - BD.getOffset());
|
||||
|
||||
// Pointers to Thumb symbols need to have their low-bit set to allow
|
||||
// for interworking.
|
||||
if (Asm->isThumbFunc(&SA))
|
||||
Addend |= 1;
|
||||
|
||||
// Clear the symbol expr pointers to indicate we have folded these
|
||||
// operands.
|
||||
A = B = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user