1 //===- Sparc.td - Target Description for Sparc V9 Target --------*- C++ -*-===//
3 //===----------------------------------------------------------------------===//
5 //----------------------- F4 classes -----------------------------------------
7 // F4 - Common superclass of all F4 instructions. All instructions have an op3
11 set Inst{24-19} = op3;
14 // F4_rs1 - Common class of instructions that use an rs1 field
17 //set Inst{29-25} = dontcare;
18 set Inst{18-14} = rs1;
21 // F4_rs1rs2 - Common class of instructions that have rs1 and rs2 fields
22 class F4_rs1rs2 : F4_rs1 {
24 //set Inst{12-5} = dontcare;
28 // F4_rs1rs2rd - Common class of instructions that have 3 register operands
29 class F4_rs1rs2rd : F4_rs1rs2 {
34 // F4_rs1rs2rd - Common class of instructions that have 2 reg and 1 imm operand
35 class F4_rs1simm11rd : F4_rs1 {
39 set Inst{10-0} = simm11;
43 // F4_cc - Common class of instructions that have a cond field
46 set Inst{17-14} = cond;
49 // F4_cc - Common class of instructions that have cc register as first operand
50 class F4_condcc : F4_cond {
57 // Actual F4 instruction classes
59 class F4_1<bits<2> opVal, bits<6> op3Val, string name> : F4_rs1rs2rd {
65 set Inst{13} = 0; // i bit
67 //set Inst{10-5} = dontcare;
70 class F4_2<bits<2> opVal, bits<6> op3Val, string name> : F4_rs1simm11rd {
76 set Inst{13} = 1; // i bit
80 class F4_3<bits<2> opVal, bits<6> op3Val, bits<4> condVal,
81 string name> : F4_condcc {
88 set Inst{13} = 0; // i bit
89 //set Inst{10-5} = dontcare;
93 class F4_4<bits<2> opVal, bits<6> op3Val, bits<4> condVal,
94 string name> : F4_condcc {
102 set Inst{13} = 1; // i bit
103 set Inst{10-0} = sim11;
108 class F4_6<bits<2> opVal, bits<6> op3Val, bits<3> rcondVal,
109 bits<5> opf_lowVal, string name> : F4_rs1rs2rd {
114 set Inst{12-10} = rcondVal;
115 set Inst{9-5} = opf_lowVal;
118 class F4_7<bits<2> opVal, bits<6> op3Val, bits<4> condVal,
119 bits<6> opf_lowVal, string name> : F4_cond {
128 set Inst{29-25} = rd;
130 set Inst{13-11} = cc;
131 set Inst{10-5} = opf_lowVal;
135 // FIXME: F4 classes 8-9