1 //===- PIC16RegisterInfo.td - PIC16 Register defs ------------*- tblgen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
11 // Describe PIC16 instructions format
13 // All the possible PIC16 fields are:
15 // opcode - operation code.
16 // f - 7-bit register file address.
17 // d - 1-bit direction specifier
18 // k - 8/11 bit literals
19 // b - 3 bits bit num specifier
21 //===----------------------------------------------------------------------===//
23 // Generic PIC16 Format
24 class PIC16Inst<dag outs, dag ins, string asmstr, list<dag> pattern>
29 let Namespace = "PIC16";
31 dag OutOperandList = outs;
32 dag InOperandList = ins;
34 let AsmString = asmstr;
35 let Pattern = pattern;
39 //===----------------------------------------------------------------------===//
40 // Byte Oriented instruction class in PIC16 : <|opcode|d|f|>
41 //===----------------------------------------------------------------------===//
43 class ByteFormat<bits<6> op, dag outs, dag ins, string asmstr,
45 :PIC16Inst<outs, ins, asmstr, pattern>
56 //===----------------------------------------------------------------------===//
57 // Bit Oriented instruction class in PIC16 : <|opcode|b|f|>
58 //===----------------------------------------------------------------------===//
60 class BitFormat<bits<4> op, dag outs, dag ins, string asmstr, list<dag> pattern>
61 : PIC16Inst<outs, ins, asmstr, pattern>
72 //===----------------------------------------------------------------------===//
73 // Literal Format instruction class in PIC16 : <|opcode|k|>
74 //===----------------------------------------------------------------------===//
76 class LiteralFormat<bits<6> op, dag outs, dag ins, string asmstr,
78 : PIC16Inst<outs, ins, asmstr, pattern>
88 //===----------------------------------------------------------------------===//
89 // Control Format instruction class in PIC16 : <|opcode|k|>
90 //===----------------------------------------------------------------------===//
92 class ControlFormat<bits<3> op, dag outs, dag ins, string asmstr,
94 :PIC16Inst<outs, ins, asmstr, pattern>
104 //===----------------------------------------------------------------------===//
105 // Pseudo instruction class in PIC16
106 //===----------------------------------------------------------------------===//
108 class Pseudo<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>:
109 PIC16Inst<outs, ins, asmstr, pattern>