1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Use the correct func begin symbol in all places in ppc.

I missed an occurrence of the old symbol in my previous patch.

llvm-svn: 231398
This commit is contained in:
Rafael Espindola 2015-03-05 19:47:50 +00:00
parent c4e27ccc28
commit 0acd6bd828
4 changed files with 14 additions and 12 deletions

View File

@ -556,13 +556,7 @@ void AsmPrinter::EmitFunctionHeader() {
OutStreamer.EmitLabel(DeadBlockSyms[i]);
}
bool NeedsLocalForSize = MAI->needsLocalForSize();
if (!MMI->getLandingPads().empty() || MMI->hasDebugInfo() ||
NeedsLocalForSize) {
CurrentFnBegin = createTempSymbol("func_begin", getFunctionNumber());
if (NeedsLocalForSize)
CurrentFnSymForSize = CurrentFnBegin;
if (CurrentFnBegin) {
if (MAI->useAssignmentForEHBegin()) {
MCSymbol *CurPos = OutContext.CreateTempSymbol();
OutStreamer.EmitLabel(CurPos);
@ -1127,6 +1121,14 @@ void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
// Get the function symbol.
CurrentFnSym = getSymbol(MF.getFunction());
CurrentFnSymForSize = CurrentFnSym;
CurrentFnBegin = nullptr;
bool NeedsLocalForSize = MAI->needsLocalForSize();
if (!MMI->getLandingPads().empty() || MMI->hasDebugInfo() ||
NeedsLocalForSize) {
CurrentFnBegin = createTempSymbol("func_begin", getFunctionNumber());
if (NeedsLocalForSize)
CurrentFnSymForSize = CurrentFnBegin;
}
if (isVerbose())
LI = &getAnalysis<MachineLoopInfo>();

View File

@ -1068,8 +1068,7 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
OutStreamer.SwitchSection(Section);
OutStreamer.EmitLabel(CurrentFnSym);
OutStreamer.EmitValueToAlignment(8);
MCSymbol *Symbol1 =
OutContext.GetOrCreateSymbol(".L." + Twine(CurrentFnSym->getName()));
MCSymbol *Symbol1 = CurrentFnSymForSize;
// Generates a R_PPC64_ADDR64 (from FK_DATA_8) relocation for the function
// entry point.
OutStreamer.EmitValue(MCSymbolRefExpr::Create(Symbol1, OutContext),

View File

@ -3,11 +3,11 @@
; CHECK: .section .opd,"aw",@progbits
; CHECK-NEXT: test1:
; CHECK-NEXT: .align 3
; CHECK-NEXT: .quad .L.test1
; CHECK-NEXT: .quad .L[[BEGIN:.*]]
; CHECK-NEXT: .quad .TOC.@tocbase
; CHECK-NEXT: .quad 0
; CHECK-NEXT: .text
; CHECK-NEXT: .L[[BEGIN:.*]]:
; CHECK-NEXT: .L[[BEGIN]]:
define i32 @test1(i32 %a) nounwind {
entry:

View File

@ -10,10 +10,11 @@ define i64 @access_int64(i64 %a) nounwind readonly {
entry:
; CHECK-LABEL: access_int64:
; CHECK-NEXT: .align 3
; CHECK-NEXT: .quad .L.access_int64
; CHECK-NEXT: .quad .L[[BEGIN:.*]]
; CHECK-NEXT: .quad .TOC.@tocbase
; CHECK-NEXT: .quad 0
; CHECK-NEXT: .text
; CHECK-NEXT: .L[[BEGIN]]:
%0 = load i64, i64* @number64, align 8
; CHECK: ld {{[0-9]+}}, .LC{{[0-9]+}}@toc(2)
%cmp = icmp eq i64 %0, %a