summaryrefslogtreecommitdiffstats
path: root/clang/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
commit18adbf5f07af12bb6fbc87b25740a0d5ce46eefc (patch)
tree97b1935740bdfd489409e59e5333545ed0d8d6ed /clang/lib/CodeGen/ABIInfo.h
parent6813eb125f2d819548e85685059bdda2ee86b04f (diff)
downloadbcm5719-llvm-18adbf5f07af12bb6fbc87b25740a0d5ce46eefc.tar.gz
bcm5719-llvm-18adbf5f07af12bb6fbc87b25740a0d5ce46eefc.zip
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). llvm-svn: 72998
Diffstat (limited to 'clang/lib/CodeGen/ABIInfo.h')
-rw-r--r--clang/lib/CodeGen/ABIInfo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ABIInfo.h b/clang/lib/CodeGen/ABIInfo.h
index 44af0c476aa..58e5a778cf3 100644
--- a/clang/lib/CodeGen/ABIInfo.h
+++ b/clang/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; }
OpenPOWER on IntegriCloud