//===- SystemZInstrFormats.td - SystemZ Instruction Formats ----*- tablegen -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // Format specifies the encoding used by the instruction. This is part of the // ad-hoc solution used to emit machine instruction encodings by our machine // code emitter. class Format val> { bits<5> Value = val; } def Pseudo : Format<0>; def EForm : Format<1>; def IForm : Format<2>; def RIForm : Format<3>; def RIEForm : Format<4>; def RILForm : Format<5>; def RISForm : Format<6>; def RRForm : Format<7>; def RREForm : Format<8>; def RRFForm : Format<9>; def RRRForm : Format<10>; def RRSForm : Format<11>; def RSForm : Format<12>; def RSIForm : Format<13>; def RSILForm : Format<14>; def RSYForm : Format<15>; def RXForm : Format<16>; def RXEForm : Format<17>; def RXFForm : Format<18>; def RXYForm : Format<19>; def SForm : Format<20>; def SIForm : Format<21>; def SILForm : Format<22>; def SIYForm : Format<23>; def SSForm : Format<24>; def SSEForm : Format<25>; def SSFForm : Format<26>; class InstSystemZ op, Format f, dag outs, dag ins> : Instruction { let Namespace = "SystemZ"; bits<16> Opcode = op; Format Form = f; bits<5> FormBits = Form.Value; dag OutOperandList = outs; dag InOperandList = ins; } class I8 op, Format f, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<0, f, outs, ins> { let Opcode{0-7} = op; let Opcode{8-15} = 0; let Pattern = pattern; let AsmString = asmstr; } class I12 op, Format f, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<0, f, outs, ins> { let Opcode{0-11} = op; let Opcode{12-15} = 0; let Pattern = pattern; let AsmString = asmstr; } class I16 op, Format f, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ { let Pattern = pattern; let AsmString = asmstr; } class RRI op, dag outs, dag ins, string asmstr, list pattern> : I8; class RII op, dag outs, dag ins, string asmstr, list pattern> : I12; class RILI op, dag outs, dag ins, string asmstr, list pattern> : I12; class RREI op, dag outs, dag ins, string asmstr, list pattern> : I16; class RXI op, dag outs, dag ins, string asmstr, list pattern> : I8 { let AddedComplexity = 1; } class RXYI op, dag outs, dag ins, string asmstr, list pattern> : I16; class RSI op, dag outs, dag ins, string asmstr, list pattern> : I8 { let AddedComplexity = 1; } class RSYI op, dag outs, dag ins, string asmstr, list pattern> : I16; class SII op, dag outs, dag ins, string asmstr, list pattern> : I8 { let AddedComplexity = 1; } class SIYI op, dag outs, dag ins, string asmstr, list pattern> : I16; class SILI op, dag outs, dag ins, string asmstr, list pattern> : I16; //===----------------------------------------------------------------------===// // Pseudo instructions //===----------------------------------------------------------------------===// class Pseudo pattern> : InstSystemZ<0, Pseudo, outs, ins> { let Pattern = pattern; let AsmString = asmstr; }