summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCAsmInfo.h
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2013-01-22 18:02:49 +0000
committerEli Bendersky <eliben@google.com>2013-01-22 18:02:49 +0000
commit9dd2a3b1f2c253e20262535bb89b1ab6cc680ece (patch)
treea09ede4ebc6fd6ed1ba755225a016be1cec33aae /include/llvm/MC/MCAsmInfo.h
parent91df03b8f29905c8293f61696ffb95398eafa663 (diff)
downloadllvm-9dd2a3b1f2c253e20262535bb89b1ab6cc680ece.tar.gz
llvm-9dd2a3b1f2c253e20262535bb89b1ab6cc680ece.tar.bz2
llvm-9dd2a3b1f2c253e20262535bb89b1ab6cc680ece.tar.xz
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 'include/llvm/MC/MCAsmInfo.h')
-rw-r--r--include/llvm/MC/MCAsmInfo.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h
index 97114bb034..7474ac8d0f 100644
--- a/include/llvm/MC/MCAsmInfo.h
+++ b/include/llvm/MC/MCAsmInfo.h
@@ -48,6 +48,11 @@ namespace llvm {
/// Default is 4.
unsigned PointerSize;
+ /// CalleeSaveStackSlotSize - Size of the stack slot reserved for
+ /// callee-saved registers, in bytes.
+ /// Default is same as pointer size.
+ unsigned CalleeSaveStackSlotSize;
+
/// IsLittleEndian - True if target is little endian.
/// Default is true.
bool IsLittleEndian;
@@ -343,7 +348,18 @@ namespace llvm {
return PointerSize;
}
- /// islittleendian - True if the target is little endian.
+ /// getCalleeSaveStackSlotSize - Get the callee-saved register stack slot
+ /// size in bytes.
+ unsigned getCalleeSaveStackSlotSize() const {
+ // If a target doesn't explicitly initialize this member, PointerSize is
+ // used by default.
+ if (CalleeSaveStackSlotSize == 0)
+ return PointerSize;
+ else
+ return CalleeSaveStackSlotSize;
+ }
+
+ /// isLittleEndian - True if the target is little endian.
bool isLittleEndian() const {
return IsLittleEndian;
}