Add simple reg-reg and reg-imm moves
[oota-llvm.git] / lib / Target / SystemZ / SystemZInstrInfo.td
1 //===- SystemZInstrInfo.td - SystemZ 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 SystemZ instructions in TableGen format.
11 //
12 //===----------------------------------------------------------------------===//
13
14 include "SystemZInstrFormats.td"
15
16 //===----------------------------------------------------------------------===//
17 // SystemZ Specific Node Definitions.
18 //===----------------------------------------------------------------------===//
19 def SystemZretflag : SDNode<"SystemZISD::RET_FLAG", SDTNone,
20                      [SDNPHasChain, SDNPOptInFlag]>;
21
22 let neverHasSideEffects = 1 in
23 def NOP : Pseudo<(outs), (ins), "# no-op", []>;
24
25 //===----------------------------------------------------------------------===//
26 //  Control Flow Instructions...
27 //
28
29 // FIXME: Provide proper encoding!
30 let isReturn = 1, isTerminator = 1 in {
31   def RET : Pseudo<(outs), (ins), "br\t%r14", [(SystemZretflag)]>;
32 }
33
34 //===----------------------------------------------------------------------===//
35 // Move Instructions
36
37 // FIXME: Provide proper encoding!
38 let neverHasSideEffects = 1 in {
39 def MOV64rr : Pseudo<(outs GR64:$dst), (ins GR64:$src),
40                      "lgr\t{$dst, $src}",
41                      []>;
42 }
43
44 // FIXME: Provide proper encoding!
45 let isReMaterializable = 1, isAsCheapAsAMove = 1 in {
46 def MOV64ri : Pseudo<(outs GR64:$dst), (ins i64imm:$src),
47                      "lghi\t{$dst, $src}",
48                      [(set GR64:$dst, imm:$src)]>;
49 }