llvm-6502/test/TableGen/intrinsic-varargs.td
Kit Barton 1e3da044d8 Add support for v1i128 type.
The v1i128 type is needed for the quadword add/substract instructions introduced
in POWER8. Futhermore, the PowerPC ABI specifies that parameters of type v1i128
are to be passed in a single vector register, while parameters of type i128 are
passed in pairs of GPRs. Thus, it is necessary to be able to differentiate
between v1i128 and i128 in LLVM.

http://reviews.llvm.org/D8564


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235198 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-17 16:11:05 +00:00

31 lines
784 B
TableGen

// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s
// XFAIL: vg_leak
class IntrinsicProperty;
class ValueType<int size, int value> {
string Namespace = "MVT";
int Size = size;
int Value = value;
}
class LLVMType<ValueType vt> {
ValueType VT = vt;
}
class Intrinsic<string name, list<LLVMType> param_types = []> {
string LLVMName = name;
bit isTarget = 0;
string TargetPrefix = "";
list<LLVMType> RetTypes = [];
list<LLVMType> ParamTypes = param_types;
list<IntrinsicProperty> Properties = [];
}
// isVoid needs to match the definition in ValueTypes.td
def isVoid : ValueType<0, 57>; // Produces no value
def llvm_vararg_ty : LLVMType<isVoid>; // this means vararg here
// CHECK: /* 0 */ 0, 28, 0,
def int_foo : Intrinsic<"llvm.foo", [llvm_vararg_ty]>;