diff options
author | Eli Bendersky <eliben@google.com> | 2013-01-22 18:02:49 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2013-01-22 18:02:49 +0000 |
commit | 9dd2a3b1f2c253e20262535bb89b1ab6cc680ece (patch) | |
tree | a09ede4ebc6fd6ed1ba755225a016be1cec33aae /lib/MC | |
parent | 91df03b8f29905c8293f61696ffb95398eafa663 (diff) | |
download | external_llvm-9dd2a3b1f2c253e20262535bb89b1ab6cc680ece.zip external_llvm-9dd2a3b1f2c253e20262535bb89b1ab6cc680ece.tar.gz external_llvm-9dd2a3b1f2c253e20262535bb89b1ab6cc680ece.tar.bz2 |
Initial patch for x32 ABI support.
Add the x32 environment kind to the triple, and separate the concept of
pointer size and callee save stack slot size, since they're not equal
on x32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCAsmInfo.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCDwarf.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp index a6fa658..de1095b 100644 --- a/lib/MC/MCAsmInfo.cpp +++ b/lib/MC/MCAsmInfo.cpp @@ -24,6 +24,8 @@ using namespace llvm; MCAsmInfo::MCAsmInfo() { PointerSize = 4; + CalleeSaveStackSlotSize = 0; // 0 means PointerSize is used in getter. + IsLittleEndian = true; StackGrowsUp = false; HasSubsectionsViaSymbols = false; diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp index 74851ce..3cf47bc 100644 --- a/lib/MC/MCDwarf.cpp +++ b/lib/MC/MCDwarf.cpp @@ -792,7 +792,7 @@ void MCGenDwarfLabelEntry::Make(MCSymbol *Symbol, MCStreamer *MCOS, static int getDataAlignmentFactor(MCStreamer &streamer) { MCContext &context = streamer.getContext(); const MCAsmInfo &asmInfo = context.getAsmInfo(); - int size = asmInfo.getPointerSize(); + int size = asmInfo.getCalleeSaveStackSlotSize(); if (asmInfo.isStackGrowthDirectionUp()) return size; else |