Support printing base+offset pairs where the offset is a register.
[oota-llvm.git] / lib / Target / Sparc / SparcV8InstrInfo_F2.td
1 //===- SparcV8Instrs_F2.td - Format 2 instructions: SparcV8 Target --------===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 // 
8 //===----------------------------------------------------------------------===//
9 //
10 // Format #2 instruction classes in the SparcV8
11 //
12 //===----------------------------------------------------------------------===//
13
14 class F2 : InstV8 {                   // Format 2 instructions
15   bits<3>  op2;
16   bits<22> imm22;
17   let op          = 0;    // op = 0
18   let Inst{24-22} = op2;
19   let Inst{21-0}  = imm22;
20 }
21
22 // Specific F2 classes: SparcV8 manual, page 44
23 //
24 class F2_1<bits<3> op2Val, string name> : F2 {
25   bits<5>  rd;
26   bits<22> imm;
27
28   let op2         = op2Val;
29   let Name        = name;
30
31   let Inst{29-25} = rd;
32 }
33
34 class F2_2<bits<4> condVal, bits<3> op2Val, string name> : F2 {
35   bits<4>   cond;
36   bit       annul = 0;     // currently unused
37
38   let cond        = condVal;
39   let op2         = op2Val;
40   let Name        = name;
41
42   let Inst{29}    = annul;
43   let Inst{28-25} = cond;
44 }