Add proper ISD::RET lowering
[oota-llvm.git] / lib / Target / MSP430 / MSP430InstrInfo.td
1 //===- MSP430InstrInfo.td - MSP430 Instruction defs -----------*- tblgen-*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source 
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file describes the MSP430 instructions in TableGen format.
11 //
12 //===----------------------------------------------------------------------===//
13
14 include "MSP430InstrFormats.td"
15
16 //===----------------------------------------------------------------------===//
17 // Type Constraints.
18 //===----------------------------------------------------------------------===//
19 class SDTCisI8<int OpNum> : SDTCisVT<OpNum, i8>;
20 class SDTCisI16<int OpNum> : SDTCisVT<OpNum, i16>;
21
22 //===----------------------------------------------------------------------===//
23 // Type Profiles.
24 //===----------------------------------------------------------------------===//
25
26 //===----------------------------------------------------------------------===//
27 // MSP430 Specific Node Definitions.
28 //===----------------------------------------------------------------------===//
29 def retflag : SDNode<"MSP430ISD::RET_FLAG", SDTNone,
30                      [SDNPHasChain, SDNPOptInFlag]>;
31
32 //===----------------------------------------------------------------------===//
33 // Pseudo Instructions
34 //===----------------------------------------------------------------------===//
35
36 def NOP : Pseudo<(outs), (ins), "nop", []>;
37
38 //===----------------------------------------------------------------------===//
39 // Real Instructions
40 //===----------------------------------------------------------------------===//
41
42 // FIXME: Provide proper encoding!
43 let isReturn = 1, isTerminator = 1 in {
44   def RETI: Pseudo<(outs), (ins), "reti", [(retflag)]>;
45 }