Add UDIV, SDIV, and a few variants of WR.
[oota-llvm.git] / lib / Target / Sparc / SparcV8InstrInfo_F3.td
1 //===- SparcV8Instrs_F3.td - Format 3 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 #3 instruction classes in the SparcV8
11 //
12 //===----------------------------------------------------------------------===//
13
14 class F3 : InstV8 {
15   bits<5> rd;
16   bits<6> op3;
17   bits<5> rs1;
18   let op{1} = 1;   // Op = 2 or 3
19   let Inst{29-25} = rd;
20   let Inst{24-19} = op3;
21   let Inst{18-14} = rs1;
22 }
23
24 // Specific F3 classes: SparcV8 manual, page 44
25 //
26 class F3_1<bits<2> opVal, bits<6> op3val, string name> : F3 {
27   bits<8> asi;
28   bits<5> rs2;
29
30   let op         = opVal;
31   let op3        = op3val;
32   let Name       = name;
33
34   let Inst{13}   = 0;     // i field = 0
35   let Inst{12-5} = asi;   // address space identifier
36   let Inst{4-0}  = rs2;
37 }
38
39 class F3_2<bits<2> opVal, bits<6> op3val, string name> : F3 {
40   bits<13> simm13;
41
42   let op         = opVal;
43   let op3        = op3val;
44   let Name       = name;
45
46   let Inst{13}   = 1;     // i field = 1
47   let Inst{12-0} = simm13;
48 }
49
50 /*
51 class F3_3<bits<2> opVal, bits<6> op3val, bits<9> opfVal, string name> 
52   : F3_rs1rs2 {
53   bits<5> rs2;
54
55   let op         = opVal;
56   let op3        = op3val;
57   let Name       = name;
58
59   let Inst{13-5} = opfVal;
60   let Inst{4-0}  = rs2;
61 }
62 */