1 //===- MSP430InstrFormats.td - MSP430 Instruction Formats-----*- 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 MSP430 instructions format here
14 // Generic MSP430 Format
15 class MSP430Inst<dag outs, dag ins, string asmstr> : Instruction {
18 let Namespace = "MSP430";
20 dag OutOperandList = outs;
21 dag InOperandList = ins;
23 let AsmString = asmstr;
26 // FIXME: Create different classes for different addressing modes.
28 // MSP430 Double Operand (Format I) Instructions
29 class IForm<bits<4> opcode, bit ad, bit bw, bits<2> as,
30 dag outs, dag ins, string asmstr, list<dag> pattern>
31 : MSP430Inst<outs, ins, asmstr> {
32 let Pattern = pattern;
34 let Inst{12-15} = opcode;
40 // MSP430 Single Operand (Format II) Instructions
41 class IIForm<bits<9> opcode, bit bw, bits<2> ad,
42 dag outs, dag ins, string asmstr, list<dag> pattern>
43 : MSP430Inst<outs, ins, asmstr> {
44 let Pattern = pattern;
46 let Inst{7-15} = opcode;
51 // MSP430 Conditional Jumps Instructions
52 class CJForm<bits<3> opcode, bits<3> cond, bit s,
53 dag outs, dag ins, string asmstr, list<dag> pattern>
54 : MSP430Inst<outs, ins, asmstr> {
55 let Pattern = pattern;
57 let Inst{13-15} = opcode;
58 let Inst{10-12} = cond;
62 // Pseudo instructions
63 class Pseudo<dag outs, dag ins, string asmstr, list<dag> pattern>
64 : MSP430Inst<outs, ins, asmstr> {
65 let Pattern = pattern;