1 //===- IA64InstrFormats.td - IA64 Instruction Formats --*- tablegen -*-=//
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 // - Warning: the stuff in here isn't really being used, so is mostly
11 // junk. It'll get fixed as the JIT gets built.
13 //===----------------------------------------------------------------------===//
15 //===----------------------------------------------------------------------===//
16 // Instruction format superclass
17 //===----------------------------------------------------------------------===//
19 class InstIA64<bits<4> op, dag OOL, dag IOL, string asmstr> : Instruction {
20 // IA64 instruction baseline
22 let Namespace = "IA64";
23 let OutOperandList = OOL;
24 let InOperandList = IOL;
25 let AsmString = asmstr;
30 //"Each Itanium instruction is categorized into one of six types."
34 class AForm<bits<4> opcode, bits<6> qpReg, dag OOL, dag IOL, string asmstr> :
35 InstIA64<opcode, OOL, IOL, asmstr> {
37 let Inst{5-0} = qpReg;
40 class AForm_DAG<bits<4> opcode, bits<6> qpReg, dag OOL, dag IOL, string asmstr,
42 InstIA64<opcode, OOL, IOL, asmstr> {
44 let Pattern = pattern;
45 let Inst{5-0} = qpReg;
48 let isBranch = 1, isTerminator = 1 in
49 class BForm<bits<4> opcode, bits<6> x6, bits<3> btype, dag OOL, dag IOL, string asmstr> :
50 InstIA64<opcode, OOL, IOL, asmstr> {
53 let Inst{8-6} = btype;
56 class MForm<bits<4> opcode, bits<6> x6, dag OOL, dag IOL, string asmstr> :
57 InstIA64<opcode, OOL, IOL, asmstr> {
63 // let Inst{20-16} = Rb;
64 let Inst{15-0} = disp;
67 class RawForm<bits<4> opcode, bits<26> rest, dag OOL, dag IOL, string asmstr> :
68 InstIA64<opcode, OOL, IOL, asmstr> {
69 let Inst{25-0} = rest;
72 // Pseudo instructions.
73 class PseudoInstIA64<dag OOL, dag IOL, string nm> : InstIA64<0, OOL, IOL, nm> {
76 class PseudoInstIA64_DAG<dag OOL, dag IOL, string nm, list<dag> pattern>
77 : InstIA64<0, OOL, IOL, nm> {
78 let Pattern = pattern;