summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CellSPU/SPUOperands.td
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/CellSPU/SPUOperands.td')
-rw-r--r--llvm/lib/Target/CellSPU/SPUOperands.td11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUOperands.td b/llvm/lib/Target/CellSPU/SPUOperands.td
index 802628f8996..6216651e48a 100644
--- a/llvm/lib/Target/CellSPU/SPUOperands.td
+++ b/llvm/lib/Target/CellSPU/SPUOperands.td
@@ -9,6 +9,17 @@
// Cell SPU Instruction Operands:
//===----------------------------------------------------------------------===//
+// TO_IMM32 - Convert an i8/i16 to i32.
+def TO_IMM32 : SDNodeXForm<imm, [{
+ return getI32Imm(N->getZExtValue());
+}]>;
+
+// TO_IMM16 - Convert an i8/i32 to i16.
+def TO_IMM16 : SDNodeXForm<imm, [{
+ return CurDAG->getTargetConstant(N->getZExtValue(), MVT::i16);
+}]>;
+
+
def LO16 : SDNodeXForm<imm, [{
unsigned val = N->getZExtValue();
// Transformation function: get the low 16 bits.
OpenPOWER on IntegriCloud