summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/ABIInfo.h
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-06-06 09:36:29 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-06-06 09:36:29 +0000
commitcc6fa88666ca2f287df4a600eb31a4087bab9c13 (patch)
tree4e253300ee3c4aab47ae838df342163be73bc8e0 /lib/CodeGen/ABIInfo.h
parenta311be7ddb3f6d732fce2ea09c8ffbeabaa94984 (diff)
Add new ABIArgInfo kind: Extend. This allows target to implement its own argument
zero/sign extension logic (consider, e.g. target has only 64 bit registers and thus i32's should be extended as well). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ABIInfo.h')
-rw-r--r--lib/CodeGen/ABIInfo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/ABIInfo.h b/lib/CodeGen/ABIInfo.h
index 44af0c476a..58e5a778cf 100644
--- a/lib/CodeGen/ABIInfo.h
+++ b/lib/CodeGen/ABIInfo.h
@@ -44,6 +44,9 @@ namespace clang {
/// converted LLVM type. Complex and structure types
/// are passed using first class aggregates.
+ Extend, /// Valid only for integer argument types. Same as 'direct'
+ /// but also emit a zero/sign extension attribute.
+
Indirect, /// Pass the argument indirectly via a hidden pointer
/// with the specified alignment (0 indicates default
/// alignment).
@@ -79,6 +82,9 @@ namespace clang {
static ABIArgInfo getDirect() {
return ABIArgInfo(Direct);
}
+ static ABIArgInfo getExtend() {
+ return ABIArgInfo(Extend);
+ }
static ABIArgInfo getIgnore() {
return ABIArgInfo(Ignore);
}
@@ -94,6 +100,7 @@ namespace clang {
Kind getKind() const { return TheKind; }
bool isDirect() const { return TheKind == Direct; }
+ bool isExtend() const { return TheKind == Extend; }
bool isIgnore() const { return TheKind == Ignore; }
bool isCoerce() const { return TheKind == Coerce; }
bool isIndirect() const { return TheKind == Indirect; }