summaryrefslogtreecommitdiff
path: root/lib/Target/XCore/MCTargetDesc
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-18 22:29:13 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-18 22:29:13 +0000
commit2d28617de2b0b731c08d1af9e830f31e14ac75b4 (patch)
treee93a2a8c00c44b718f86a24da5044756f3abccc3 /lib/Target/XCore/MCTargetDesc
parent91614aec48ae01452422faf0cf6a6770d6b2166c (diff)
downloadllvm-2d28617de2b0b731c08d1af9e830f31e14ac75b4.tar.gz
llvm-2d28617de2b0b731c08d1af9e830f31e14ac75b4.tar.bz2
llvm-2d28617de2b0b731c08d1af9e830f31e14ac75b4.tar.xz
Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
better location welcome). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/MCTargetDesc')
-rw-r--r--lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp b/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
index a29f160d41..104170c328 100644
--- a/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
+++ b/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
@@ -61,6 +61,17 @@ extern "C" void LLVMInitializeXCoreMCSubtargetInfo() {
createXCoreMCSubtargetInfo);
}
+static MCAsmInfo *createXCoreMCAsmInfo(const Target &T, StringRef TT) {
+ MCAsmInfo *MAI = new XCoreMCAsmInfo(T, TT);
+
+ // Initial state of the frame pointer is SP.
+ MachineLocation Dst(MachineLocation::VirtualFP);
+ MachineLocation Src(XCore::SP, 0);
+ MAI->addInitialFrameState(0, Dst, Src);
+
+ return MAI;
+}
+
extern "C" void LLVMInitializeXCoreMCAsmInfo() {
- RegisterMCAsmInfo<XCoreMCAsmInfo> X(TheXCoreTarget);
+ RegisterMCAsmInfoFn X(TheXCoreTarget, createXCoreMCAsmInfo);
}