summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2012-11-28 18:21:03 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2012-11-28 18:21:03 +0000
commit781dfbd482c5177215ae7a43c9483e641eeb0d47 (patch)
tree4f3f530867c8cc2adb7e53011b51f4a034252b94 /lib
parentdacb9a51bddbad9535c1b9339532827e73013388 (diff)
downloadllvm-781dfbd482c5177215ae7a43c9483e641eeb0d47.tar.gz
llvm-781dfbd482c5177215ae7a43c9483e641eeb0d47.tar.bz2
llvm-781dfbd482c5177215ae7a43c9483e641eeb0d47.tar.xz
Fix initial frame state on powerpc64.
The createPPCMCAsmInfo routine used PPC::R1 as the initial frame pointer register, but on PPC64 the 32-bit R1 register does not have a corresponding DWARF number, causing invalid CIE initial frame state to be emitted. Fix by using PPC::X1 instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp b/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
index 29faca3400..4d914aa110 100644
--- a/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
+++ b/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
@@ -70,7 +70,7 @@ static MCAsmInfo *createPPCMCAsmInfo(const Target &T, StringRef TT) {
// Initial state of the frame pointer is R1.
MachineLocation Dst(MachineLocation::VirtualFP);
- MachineLocation Src(PPC::R1, 0);
+ MachineLocation Src(isPPC64? PPC::X1 : PPC::R1, 0);
MAI->addInitialFrameState(0, Dst, Src);
return MAI;