SparcV8 skeleton
[oota-llvm.git] / lib / Target / Sparc / SparcV8Instrs.td
1 //===- SparcV8InstrInfo.td - Describe the SparcV8 Instruction Set -*- C++ -*-=//
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 //
11 //===----------------------------------------------------------------------===//
12
13 class Format<bits<4> val> {
14   bits<4> Value = val;
15 }
16
17 // All of the SparcV8 instruction formats, plus a pseudo-instruction format:
18 def Pseudo : Format<0>;
19 def IForm : Format<1>;
20 def BForm : Format<2>;
21 def SCForm : Format<3>;
22 def DForm : Format<4>;
23 def XForm : Format<5>;
24 def XLForm : Format<6>;
25 def XFXForm : Format<7>;
26 def XFLForm : Format<8>;
27 def XOForm : Format<9>;
28 def AForm : Format<10>;
29 def MForm : Format<11>;
30
31 class PPCInst<string nm, bits<6> opcd, Format f> : Instruction {
32   let Namespace = "SparcV8";
33
34   let Name = nm;
35   bits<6> Opcode = opcd;
36   Format Form = f;
37   bits<4> FormBits = Form.Value;
38 }
39
40 // Pseudo-instructions:
41 def PHI : PPCInst<"PHI", 0, Pseudo>;          // PHI node...
42 def NOP : PPCInst<"NOP", 0, Pseudo>;          // No-op
43 def ADJCALLSTACKDOWN : PPCInst<"ADJCALLSTACKDOWN", 0, Pseudo>;
44 def ADJCALLSTACKUP : PPCInst<"ADJCALLSTACKUP", 0, Pseudo>;
45
46