diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-18 22:29:13 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-18 22:29:13 +0000 |
commit | 2d28617de2b0b731c08d1af9e830f31e14ac75b4 (patch) | |
tree | e93a2a8c00c44b718f86a24da5044756f3abccc3 /lib/Target/XCore/MCTargetDesc | |
parent | 91614aec48ae01452422faf0cf6a6770d6b2166c (diff) | |
download | external_llvm-2d28617de2b0b731c08d1af9e830f31e14ac75b4.zip external_llvm-2d28617de2b0b731c08d1af9e830f31e14ac75b4.tar.gz external_llvm-2d28617de2b0b731c08d1af9e830f31e14ac75b4.tar.bz2 |
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.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp b/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp index a29f160..104170c 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); } |