diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-08-16 21:02:59 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-08-16 21:02:59 +0000 |
commit | 3ca95b020283db6244cab92ede73c969253b6a31 (patch) | |
tree | d16e791e58694facd8f68d3e2797a1eaa8018afc /contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td | |
parent | 27067774dce3388702a4cf744d7096c6fb71b688 (diff) | |
parent | c3aee98e721333f265a88d6bf348e6e468f027d4 (diff) |
Update llvm to release_39 branch r276489, and resolve conflicts.
Notes
Notes:
svn path=/projects/clang390-import/; revision=304240
Diffstat (limited to 'contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td')
-rw-r--r-- | contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td | 122 |
1 files changed, 75 insertions, 47 deletions
diff --git a/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td b/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td index 74ccf551e473..76366c6695f4 100644 --- a/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td +++ b/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td @@ -7,8 +7,9 @@ // //===----------------------------------------------------------------------===// -class InstSP<dag outs, dag ins, string asmstr, list<dag> pattern> - : Instruction { +class InstSP<dag outs, dag ins, string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : Instruction { field bits<32> Inst; let Namespace = "SP"; @@ -24,6 +25,8 @@ class InstSP<dag outs, dag ins, string asmstr, list<dag> pattern> let DecoderNamespace = "Sparc"; field bits<32> SoftFail = 0; + + let Itinerary = itin; } //===----------------------------------------------------------------------===// @@ -31,8 +34,9 @@ class InstSP<dag outs, dag ins, string asmstr, list<dag> pattern> //===----------------------------------------------------------------------===// // Format 2 instructions -class F2<dag outs, dag ins, string asmstr, list<dag> pattern> - : InstSP<outs, ins, asmstr, pattern> { +class F2<dag outs, dag ins, string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : InstSP<outs, ins, asmstr, pattern, itin> { bits<3> op2; bits<22> imm22; let op = 0; // op = 0 @@ -42,8 +46,9 @@ class F2<dag outs, dag ins, string asmstr, list<dag> pattern> // Specific F2 classes: SparcV8 manual, page 44 // -class F2_1<bits<3> op2Val, dag outs, dag ins, string asmstr, list<dag> pattern> - : F2<outs, ins, asmstr, pattern> { +class F2_1<bits<3> op2Val, dag outs, dag ins, string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : F2<outs, ins, asmstr, pattern, itin> { bits<5> rd; let op2 = op2Val; @@ -52,7 +57,8 @@ class F2_1<bits<3> op2Val, dag outs, dag ins, string asmstr, list<dag> pattern> } class F2_2<bits<3> op2Val, bit annul, dag outs, dag ins, string asmstr, - list<dag> pattern> : F2<outs, ins, asmstr, pattern> { + list<dag> pattern, InstrItinClass itin = NoItinerary> + : F2<outs, ins, asmstr, pattern, itin> { bits<4> cond; let op2 = op2Val; @@ -61,8 +67,9 @@ class F2_2<bits<3> op2Val, bit annul, dag outs, dag ins, string asmstr, } class F2_3<bits<3> op2Val, bit annul, bit pred, - dag outs, dag ins, string asmstr, list<dag> pattern> - : InstSP<outs, ins, asmstr, pattern> { + dag outs, dag ins, string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : InstSP<outs, ins, asmstr, pattern, itin> { bits<2> cc; bits<4> cond; bits<19> imm19; @@ -77,9 +84,9 @@ class F2_3<bits<3> op2Val, bit annul, bit pred, let Inst{18-0} = imm19; } -class F2_4<bits<3> cond, bit annul, bit pred, - dag outs, dag ins, string asmstr, list<dag> pattern> - : InstSP<outs, ins, asmstr, pattern> { +class F2_4<bits<3> cond, bit annul, bit pred, dag outs, dag ins, + string asmstr, list<dag> pattern, InstrItinClass itin = NoItinerary> + : InstSP<outs, ins, asmstr, pattern, itin> { bits<16> imm16; bits<5> rs1; @@ -100,8 +107,9 @@ class F2_4<bits<3> cond, bit annul, bit pred, // Format #3 instruction classes in the Sparc //===----------------------------------------------------------------------===// -class F3<dag outs, dag ins, string asmstr, list<dag> pattern> - : InstSP<outs, ins, asmstr, pattern> { +class F3<dag outs, dag ins, string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : InstSP<outs, ins, asmstr, pattern, itin> { bits<5> rd; bits<6> op3; bits<5> rs1; @@ -114,7 +122,8 @@ class F3<dag outs, dag ins, string asmstr, list<dag> pattern> // Specific F3 classes: SparcV8 manual, page 44 // class F3_1_asi<bits<2> opVal, bits<6> op3val, dag outs, dag ins, - string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, InstrItinClass itin = NoItinerary> + : F3<outs, ins, asmstr, pattern, itin> { bits<8> asi; bits<5> rs2; @@ -127,13 +136,14 @@ class F3_1_asi<bits<2> opVal, bits<6> op3val, dag outs, dag ins, } class F3_1<bits<2> opVal, bits<6> op3val, dag outs, dag ins, string asmstr, - list<dag> pattern> : F3_1_asi<opVal, op3val, outs, ins, - asmstr, pattern> { + list<dag> pattern, InstrItinClass itin = IIC_iu_instr> + : F3_1_asi<opVal, op3val, outs, ins, asmstr, pattern, itin> { let asi = 0; } class F3_2<bits<2> opVal, bits<6> op3val, dag outs, dag ins, - string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, InstrItinClass itin = IIC_iu_instr> + : F3<outs, ins, asmstr, pattern, itin> { bits<13> simm13; let op = opVal; @@ -145,7 +155,8 @@ class F3_2<bits<2> opVal, bits<6> op3val, dag outs, dag ins, // floating-point class F3_3<bits<2> opVal, bits<6> op3val, bits<9> opfval, dag outs, dag ins, - string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, InstrItinClass itin = NoItinerary> + : F3<outs, ins, asmstr, pattern, itin> { bits<5> rs2; let op = opVal; @@ -157,7 +168,8 @@ class F3_3<bits<2> opVal, bits<6> op3val, bits<9> opfval, dag outs, dag ins, // floating-point unary operations. class F3_3u<bits<2> opVal, bits<6> op3val, bits<9> opfval, dag outs, dag ins, - string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, InstrItinClass itin = NoItinerary> + : F3<outs, ins, asmstr, pattern, itin> { bits<5> rs2; let op = opVal; @@ -170,7 +182,8 @@ class F3_3u<bits<2> opVal, bits<6> op3val, bits<9> opfval, dag outs, dag ins, // floating-point compares. class F3_3c<bits<2> opVal, bits<6> op3val, bits<9> opfval, dag outs, dag ins, - string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, InstrItinClass itin = NoItinerary> + : F3<outs, ins, asmstr, pattern, itin> { bits<5> rs2; let op = opVal; @@ -182,7 +195,8 @@ class F3_3c<bits<2> opVal, bits<6> op3val, bits<9> opfval, dag outs, dag ins, // Shift by register rs2. class F3_Sr<bits<2> opVal, bits<6> op3val, bit xVal, dag outs, dag ins, - string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, InstrItinClass itin = IIC_iu_instr> + : F3<outs, ins, asmstr, pattern, itin> { bit x = xVal; // 1 for 64-bit shifts. bits<5> rs2; @@ -196,7 +210,8 @@ class F3_Sr<bits<2> opVal, bits<6> op3val, bit xVal, dag outs, dag ins, // Shift by immediate. class F3_Si<bits<2> opVal, bits<6> op3val, bit xVal, dag outs, dag ins, - string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, InstrItinClass itin = IIC_iu_instr> + : F3<outs, ins, asmstr, pattern, itin> { bit x = xVal; // 1 for 64-bit shifts. bits<6> shcnt; // shcnt32 / shcnt64. @@ -210,17 +225,21 @@ class F3_Si<bits<2> opVal, bits<6> op3val, bit xVal, dag outs, dag ins, // Define rr and ri shift instructions with patterns. multiclass F3_S<string OpcStr, bits<6> Op3Val, bit XVal, SDNode OpNode, - ValueType VT, RegisterClass RC> { + ValueType VT, RegisterClass RC, + InstrItinClass itin = IIC_iu_instr> { def rr : F3_Sr<2, Op3Val, XVal, (outs RC:$rd), (ins RC:$rs1, IntRegs:$rs2), !strconcat(OpcStr, " $rs1, $rs2, $rd"), - [(set VT:$rd, (OpNode VT:$rs1, i32:$rs2))]>; + [(set VT:$rd, (OpNode VT:$rs1, i32:$rs2))], + itin>; def ri : F3_Si<2, Op3Val, XVal, (outs RC:$rd), (ins RC:$rs1, i32imm:$shcnt), !strconcat(OpcStr, " $rs1, $shcnt, $rd"), - [(set VT:$rd, (OpNode VT:$rs1, (i32 imm:$shcnt)))]>; + [(set VT:$rd, (OpNode VT:$rs1, (i32 imm:$shcnt)))], + itin>; } -class F4<bits<6> op3, dag outs, dag ins, string asmstr, list<dag> pattern> - : InstSP<outs, ins, asmstr, pattern> { +class F4<bits<6> op3, dag outs, dag ins, string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : InstSP<outs, ins, asmstr, pattern, itin> { bits<5> rd; let op = 2; @@ -230,9 +249,9 @@ class F4<bits<6> op3, dag outs, dag ins, string asmstr, list<dag> pattern> class F4_1<bits<6> op3, dag outs, dag ins, - string asmstr, list<dag> pattern> - : F4<op3, outs, ins, asmstr, pattern> { - + string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : F4<op3, outs, ins, asmstr, pattern, itin> { bit intcc; bits<2> cc; bits<4> cond; @@ -243,12 +262,12 @@ class F4_1<bits<6> op3, dag outs, dag ins, let Inst{13} = 0; let Inst{17-14} = cond; let Inst{18} = intcc; - } class F4_2<bits<6> op3, dag outs, dag ins, - string asmstr, list<dag> pattern> - : F4<op3, outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : F4<op3, outs, ins, asmstr, pattern, itin> { bit intcc; bits<2> cc; bits<4> cond; @@ -262,8 +281,9 @@ class F4_2<bits<6> op3, dag outs, dag ins, } class F4_3<bits<6> op3, bits<6> opf_low, dag outs, dag ins, - string asmstr, list<dag> pattern> - : F4<op3, outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : F4<op3, outs, ins, asmstr, pattern, itin> { bits<4> cond; bit intcc; bits<2> opf_cc; @@ -278,8 +298,9 @@ class F4_3<bits<6> op3, bits<6> opf_low, dag outs, dag ins, } class F4_4r<bits<6> op3, bits<5> opf_low, bits<3> rcond, dag outs, dag ins, - string asmstr, list<dag> pattern> - : F4<op3, outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : F4<op3, outs, ins, asmstr, pattern, itin> { bits <5> rs1; bits <5> rs2; let Inst{18-14} = rs1; @@ -291,8 +312,9 @@ class F4_4r<bits<6> op3, bits<5> opf_low, bits<3> rcond, dag outs, dag ins, class F4_4i<bits<6> op3, bits<3> rcond, dag outs, dag ins, - string asmstr, list<dag> pattern> - : F4<op3, outs, ins, asmstr, pattern> { + string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : F4<op3, outs, ins, asmstr, pattern, itin> { bits<5> rs1; bits<10> simm10; let Inst{18-14} = rs1; @@ -302,9 +324,10 @@ class F4_4i<bits<6> op3, bits<3> rcond, dag outs, dag ins, } -class TRAPSP<bits<6> op3Val, bit isimm, dag outs, dag ins, string asmstr, - list<dag> pattern>: F3<outs, ins, asmstr, pattern> { - +class TRAPSP<bits<6> op3Val, bit isimm, dag outs, dag ins, + string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : F3<outs, ins, asmstr, pattern, itin> { bits<4> cond; bits<2> cc; @@ -317,15 +340,20 @@ class TRAPSP<bits<6> op3Val, bit isimm, dag outs, dag ins, string asmstr, } -class TRAPSPrr<bits<6> op3Val, dag outs, dag ins, string asmstr, - list<dag> pattern>: TRAPSP<op3Val, 0, outs, ins, asmstr, pattern> { +class TRAPSPrr<bits<6> op3Val, dag outs, dag ins, + string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : TRAPSP<op3Val, 0, outs, ins, asmstr, pattern, itin> { bits<5> rs2; let Inst{10-5} = 0; let Inst{4-0} = rs2; } -class TRAPSPri<bits<6> op3Val, dag outs, dag ins, string asmstr, - list<dag> pattern>: TRAPSP<op3Val, 1, outs, ins, asmstr, pattern> { + +class TRAPSPri<bits<6> op3Val, dag outs, dag ins, + string asmstr, list<dag> pattern, + InstrItinClass itin = NoItinerary> + : TRAPSP<op3Val, 1, outs, ins, asmstr, pattern, itin> { bits<8> imm; let Inst{10-8} = 0; |