Fixed some bugs.
[llvm/zpu.git] / lib / Target / ZPU / ZPUInstrFormats.td
blob2ecf874f22995b666cc8e1ec35a34c96f2c732f5
1 //===- ZPURegisterInfo.td - ZPU Register defs ------------*- tablegen -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
11 //  Describe ZPU instructions format
13 //  CPU INSTRUCTION FORMATS
16 //===----------------------------------------------------------------------===//
18 class ZPUIm<dag outs, dag ins, string asmstr, list<dag> pattern>: Instruction 
20   field bits<32> Inst;
22   let Namespace = "ZPU";
24   // This is our opcode 
25   let Inst{7} = 1;   
26   
27   dag OutOperandList = outs;
28   dag InOperandList  = ins;
30   let AsmString   = asmstr;
31   let Pattern     = pattern;
34 class ZPUSlot<bits<1> op, dag outs, dag ins, string asmstr, list<dag> pattern>: Instruction 
36   field bits<32> Inst;
38   let Namespace = "ZPU";
40   // This is our opcode 
41   let Inst{7} = 0;
42   // This is a stack slot instruction   
43   let Inst{6} = 1;
44   // is it a store or load?
45   let Inst{5} = op;   
46   
47   dag OutOperandList = outs;
48   dag InOperandList  = ins;
50   let AsmString   = asmstr;
51   let Pattern     = pattern;
54 class ZPUZeroOp<bits<6> op, dag outs, dag ins, string asmstr, list<dag> pattern>: Instruction 
56   field bits<32> Inst;
58   let Namespace = "ZPU";
60   // This is our opcode 
61   let Inst{7} = 0;
62   // This is not a stack slot instruction   
63   let Inst{6} = 0;
64   // Actual instruction
65   let Inst{5-0} = op;
66   
67   dag OutOperandList = outs;
68   dag InOperandList  = ins;
70   let AsmString   = asmstr;
71   let Pattern     = pattern;