mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Materialize GA addresses with movw + movt pairs for Darwin in PIC mode. e.g.
movw r0, :lower16:(L_foo$non_lazy_ptr-(LPC0_0+4))
movt r0, :upper16:(L_foo$non_lazy_ptr-(LPC0_0+4))
LPC0_0:
add r0, pc, r0
It's not yet enabled by default as some tests are failing. I suspect bugs in
down stream tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123619 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -517,7 +517,7 @@ unsigned ARMFastISel::ARMMaterializeGV(const GlobalValue *GV, EVT VT) {
|
||||
|
||||
// Grab index.
|
||||
unsigned PCAdj = (RelocM != Reloc::PIC_) ? 0 : (Subtarget->isThumb() ? 4 : 8);
|
||||
unsigned Id = AFI->createConstPoolEntryUId();
|
||||
unsigned Id = AFI->createPICLabelUId();
|
||||
ARMConstantPoolValue *CPV = new ARMConstantPoolValue(GV, Id,
|
||||
ARMCP::CPValue, PCAdj);
|
||||
unsigned Idx = MCP.getConstantPoolIndex(CPV, Align);
|
||||
|
||||
Reference in New Issue
Block a user