1 //===- SparcV9_F4.td - Format 4 instructions: SparcV9 Target --------------===//
3 // The LLVM Compiler Infrastructure
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.
8 //===----------------------------------------------------------------------===//
10 //----------------------- F4 classes -----------------------------------------
12 // F4 - Common superclass of all F4 instructions. All instructions have an op3
16 let Inst{24-19} = op3;
19 // F4_rs1 - Common class of instructions that use an rs1 field
22 let Inst{18-14} = rs1;
25 // F4_rs1rs2 - Common class of instructions that have rs1 and rs2 fields
26 class F4_rs1rs2 : F4_rs1 {
31 // F4_rs1rs2rd - Common class of instructions that have 3 register operands
32 class F4_rs1rs2rd : F4_rs1rs2 {
37 // F4_rs1rs2rd - Common class of instructions that have 2 reg and 1 imm operand
38 class F4_rs1simm11rd : F4_rs1 {
42 let Inst{10-0} = simm11;
46 // F4_cc - Common class of instructions that have a cond field
49 let Inst{17-14} = cond;
52 // F4_cc - Common class of instructions that have cc register as first operand
53 class F4_condcc : F4_cond {
60 // Actual F4 instruction classes
62 class F4_1<bits<2> opVal, bits<6> op3Val, string name> : F4_rs1rs2rd {
68 let Inst{13} = 0; // i bit
70 let Inst{10-5} = 0; // don't care
73 class F4_2<bits<2> opVal, bits<6> op3Val, string name> : F4_rs1simm11rd {
79 let Inst{13} = 1; // i bit
83 class F4_3<bits<2> opVal, bits<6> op3Val, bits<4> condVal,
84 string name> : F4_condcc {
93 let Inst{13} = 0; // i bit
94 let Inst{10-5} = 0; // don't care
98 class F4_4<bits<2> opVal, bits<6> op3Val, bits<4> condVal,
99 string name> : F4_condcc {
107 let Inst{29-25} = rd;
108 let Inst{13} = 1; // i bit
109 let Inst{10-0} = simm11;
114 class F4_6<bits<2> opVal, bits<6> op3Val, bits<3> rcondVal,
115 bits<5> opf_lowVal, string name> : F4_rs1rs2rd {
120 let Inst{12-10} = rcondVal;
121 let Inst{9-5} = opf_lowVal;
124 class F4_7<bits<2> opVal, bits<6> op3Val, bits<4> condVal,
125 bits<6> opf_lowVal, string name> : F4_cond {
134 let Inst{29-25} = rd;
136 let Inst{13-11} = cc;
137 let Inst{10-5} = opf_lowVal;
141 // FIXME: F4 classes 8-9