Skip to content

Commit 0bf2470

Browse files
author
Hal Finkel
committed
Merge in r168799 (PPC bug fix).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168842 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 0416bc1 commit 0bf2470

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static MCAsmInfo *createPPCMCAsmInfo(const Target &T, StringRef TT) {
7070

7171
// Initial state of the frame pointer is R1.
7272
MachineLocation Dst(MachineLocation::VirtualFP);
73-
MachineLocation Src(PPC::R1, 0);
73+
MachineLocation Src(isPPC64? PPC::X1 : PPC::R1, 0);
7474
MAI->addInitialFrameState(0, Dst, Src);
7575

7676
return MAI;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
;; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj %s -o - | \
2+
;; RUN: elf-dump --dump-section-data | FileCheck %s
3+
4+
;; FIXME: this file should be in .s form, change when asm parser is available.
5+
6+
define void @f() {
7+
entry:
8+
ret void
9+
}
10+
11+
;; CHECK: ('sh_name', 0x{{.*}}) # '.eh_frame'
12+
;; CHECK-NEXT: ('sh_type', 0x00000001)
13+
;; CHECK-NEXT: ('sh_flags', 0x0000000000000002)
14+
;; CHECK-NEXT: ('sh_addr', 0x{{.*}})
15+
;; CHECK-NEXT: ('sh_offset', 0x{{.*}})
16+
;; CHECK-NEXT: ('sh_size', 0x0000000000000030)
17+
;; CHECK-NEXT: ('sh_link', 0x00000000)
18+
;; CHECK-NEXT: ('sh_info', 0x00000000)
19+
;; CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
20+
;; CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
21+
;; CHECK-NEXT: ('_section_data', '00000010 00000000 017a5200 01784101 000c0100 00000018 00000018 00000000 00000000 00000000 00000010 00000000')
22+
23+
;; CHECK: ('sh_name', 0x{{.*}}) # '.rela.eh_frame'
24+
;; CHECK-NEXT: ('sh_type', 0x00000004)
25+
;; CHECK-NEXT: ('sh_flags', 0x0000000000000000)
26+
;; CHECK-NEXT: ('sh_addr', 0x{{.*}})
27+
;; CHECK-NEXT: ('sh_offset', 0x{{.*}})
28+
;; CHECK-NEXT: ('sh_size', 0x0000000000000018)
29+
;; CHECK-NEXT: ('sh_link', 0x{{.*}})
30+
;; CHECK-NEXT: ('sh_info', 0x{{.*}})
31+
;; CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
32+
;; CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
33+
;; CHECK-NEXT: ('_relocations', [
34+
;; CHECK-NEXT: # Relocation 0
35+
;; CHECK-NEXT: (('r_offset', 0x000000000000001c)
36+
;; CHECK-NEXT: ('r_sym', 0x{{.*}})
37+
;; CHECK-NEXT: ('r_type', 0x00000026)
38+
;; CHECK-NEXT: ('r_addend', 0x0000000000000000)
39+
;; CHECK-NEXT: ),
40+
;; CHECK-NEXT: ])
41+

0 commit comments

Comments
 (0)