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
diff --git a/lib/CodeGen/ABIInfo.h b/lib/CodeGen/ABIInfo.h
index 44af0c4..58e5a77 100644
--- a/lib/CodeGen/ABIInfo.h
+++ b/lib/CodeGen/ABIInfo.h
@@ -44,6 +44,9 @@
/// 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 @@
static ABIArgInfo getDirect() {
return ABIArgInfo(Direct);
}
+ static ABIArgInfo getExtend() {
+ return ABIArgInfo(Extend);
+ }
static ABIArgInfo getIgnore() {
return ABIArgInfo(Ignore);
}
@@ -94,6 +100,7 @@
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; }