Fix output bug: Intel asm comment character is #, not ;.
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9_F2.td
1 //===- Sparc.td - Target Description for Sparc V9 Target --------*- C++ -*-===//
2 // vim:ft=cpp
3 //===----------------------------------------------------------------------===//
4
5 //===----------------------------------------------------------------------===//
6 // Format #2 classes
7 //
8 class F2 : InstV9 {                   // Format 2 instructions
9   bits<3> op2;
10   set op          = 0;    // Op = 0
11   set Inst{24-22} = op2;
12 }
13
14 // Format 2.1 instructions
15 class F2_1<string name> : F2 {
16   bits<22> imm;
17   bits<5>  rd;
18
19   set Name        = name;
20   set Inst{29-25} = rd;
21   set Inst{21-0}  = imm;
22 }
23
24 class F2_br : F2 {                    // Format 2 Branch instruction
25   set isBranch    = 1;      // All instances are branch instructions
26 }
27
28 class F2_2<bits<4> cond, string name> : F2_br { // Format 2.2 instructions
29   bits<22> disp;
30   bit      annul;
31
32   set Name        = name;
33   set Inst{29}    = annul;
34   set Inst{28-25} = cond;
35   set Inst{21-0}  = disp;
36 }
37
38 class F2_3<bits<4> cond, string name> : F2_br { // Format 2.3 instructions
39   bits<2>  cc;
40   bits<19> disp;
41   bit      predict;
42   bit      annul;
43
44   set Name        = name;
45   set Inst{29}    = annul;
46   set Inst{28-25} = cond;
47   set Inst{21-20} = cc;
48   set Inst{19}    = predict;
49   set Inst{18-0}  = disp;
50 }
51
52 class F2_4<bits<3> rcond, string name> : F2_br { // Format 2.4 instructions
53   bits<5>  rs1;
54   bits<16> disp;
55   bit      predict;
56   bit      annul;
57
58   set Name        = name;
59   set Inst{29}    = annul;
60   set Inst{28}    = 0;
61   set Inst{27-25} = rcond;
62   set Inst{21-20} = disp{15-14};
63   set Inst{19}    = predict;
64   set Inst{18-14} = rs1;
65   set Inst{13-0 } = disp{13-0};
66 }