mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
[Sparc] Use %r_disp32 for pc_rel entries in FDE as well.
This makes MCAsmInfo::getExprForFDESymbol() a virtual function and overrides it in SparcMCAsmInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200376 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
52de969206
commit
99c3e481f3
@ -364,7 +364,7 @@ namespace llvm {
|
||||
unsigned Encoding,
|
||||
MCStreamer &Streamer) const;
|
||||
|
||||
const MCExpr *
|
||||
virtual const MCExpr *
|
||||
getExprForFDESymbol(const MCSymbol *Sym,
|
||||
unsigned Encoding,
|
||||
MCStreamer &Streamer) const;
|
||||
|
@ -56,3 +56,15 @@ SparcELFMCAsmInfo::getExprForPersonalitySymbol(const MCSymbol *Sym,
|
||||
|
||||
return MCAsmInfo::getExprForPersonalitySymbol(Sym, Encoding, Streamer);
|
||||
}
|
||||
|
||||
const MCExpr*
|
||||
SparcELFMCAsmInfo::getExprForFDESymbol(const MCSymbol *Sym,
|
||||
unsigned Encoding,
|
||||
MCStreamer &Streamer) const {
|
||||
if (Encoding & dwarf::DW_EH_PE_pcrel) {
|
||||
MCContext &Ctx = Streamer.getContext();
|
||||
return SparcMCExpr::Create(SparcMCExpr::VK_Sparc_R_DISP32,
|
||||
MCSymbolRefExpr::Create(Sym, Ctx), Ctx);
|
||||
}
|
||||
return MCAsmInfo::getExprForFDESymbol(Sym, Encoding, Streamer);
|
||||
}
|
||||
|
@ -26,6 +26,10 @@ public:
|
||||
virtual const MCExpr* getExprForPersonalitySymbol(const MCSymbol *Sym,
|
||||
unsigned Encoding,
|
||||
MCStreamer &Streamer) const;
|
||||
virtual const MCExpr* getExprForFDESymbol(const MCSymbol *Sym,
|
||||
unsigned Encoding,
|
||||
MCStreamer &Streamer) const;
|
||||
|
||||
};
|
||||
|
||||
} // namespace llvm
|
||||
|
@ -57,6 +57,7 @@
|
||||
; V8PIC_NOCFI: .section .eh_frame
|
||||
; V8PIC_NOCFI-NOT: .section
|
||||
; V8PIC_NOCFI: .word %r_disp32(DW.ref.__gxx_personality_v0)
|
||||
; V8PIC_NOCFI: .word %r_disp32(.Ltmp{{.+}}) ! FDE initial location
|
||||
|
||||
|
||||
; V9ABS-LABEL: main:
|
||||
@ -94,6 +95,7 @@
|
||||
; V9PIC_NOCFI: .section .eh_frame
|
||||
; V9PIC_NOCFI-NOT: .section
|
||||
; V9PIC_NOCFI: .word %r_disp32(DW.ref.__gxx_personality_v0)
|
||||
; V9PIC_NOCFI: .word %r_disp32(.Ltmp{{.+}}) ! FDE initial location
|
||||
|
||||
define i32 @main(i32 %argc, i8** nocapture readnone %argv) unnamed_addr #0 {
|
||||
entry:
|
||||
|
Loading…
x
Reference in New Issue
Block a user