2012-02-18 20:03:15 +08:00
|
|
|
//===-- X86InstrFormats.td - X86 Instruction Formats -------*- tablegen -*-===//
|
|
|
|
//
|
2007-07-31 16:04:03 +08:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-30 04:36:04 +08:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2012-02-18 20:03:15 +08:00
|
|
|
//
|
2007-07-31 16:04:03 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// X86 Instruction Format Definitions.
|
|
|
|
//
|
|
|
|
|
|
|
|
// 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<bits<6> val> {
|
|
|
|
bits<6> Value = val;
|
|
|
|
}
|
|
|
|
|
|
|
|
def Pseudo : Format<0>; def RawFrm : Format<1>;
|
|
|
|
def AddRegFrm : Format<2>; def MRMDestReg : Format<3>;
|
|
|
|
def MRMDestMem : Format<4>; def MRMSrcReg : Format<5>;
|
|
|
|
def MRMSrcMem : Format<6>;
|
|
|
|
def MRM0r : Format<16>; def MRM1r : Format<17>; def MRM2r : Format<18>;
|
|
|
|
def MRM3r : Format<19>; def MRM4r : Format<20>; def MRM5r : Format<21>;
|
|
|
|
def MRM6r : Format<22>; def MRM7r : Format<23>;
|
|
|
|
def MRM0m : Format<24>; def MRM1m : Format<25>; def MRM2m : Format<26>;
|
|
|
|
def MRM3m : Format<27>; def MRM4m : Format<28>; def MRM5m : Format<29>;
|
|
|
|
def MRM6m : Format<30>; def MRM7m : Format<31>;
|
|
|
|
def MRMInitReg : Format<32>;
|
2010-02-12 10:06:33 +08:00
|
|
|
def MRM_C1 : Format<33>;
|
2010-02-13 08:41:14 +08:00
|
|
|
def MRM_C2 : Format<34>;
|
|
|
|
def MRM_C3 : Format<35>;
|
|
|
|
def MRM_C4 : Format<36>;
|
|
|
|
def MRM_C8 : Format<37>;
|
|
|
|
def MRM_C9 : Format<38>;
|
|
|
|
def MRM_E8 : Format<39>;
|
|
|
|
def MRM_F0 : Format<40>;
|
|
|
|
def MRM_F8 : Format<41>;
|
2010-02-13 10:06:11 +08:00
|
|
|
def MRM_F9 : Format<42>;
|
2010-09-18 02:02:29 +08:00
|
|
|
def RawFrmImm8 : Format<43>;
|
|
|
|
def RawFrmImm16 : Format<44>;
|
2011-02-22 08:35:18 +08:00
|
|
|
def MRM_D0 : Format<45>;
|
|
|
|
def MRM_D1 : Format<46>;
|
2012-02-19 09:39:49 +08:00
|
|
|
def MRM_D4 : Format<47>;
|
|
|
|
def MRM_D8 : Format<48>;
|
|
|
|
def MRM_D9 : Format<49>;
|
|
|
|
def MRM_DA : Format<50>;
|
|
|
|
def MRM_DB : Format<51>;
|
|
|
|
def MRM_DC : Format<52>;
|
|
|
|
def MRM_DD : Format<53>;
|
|
|
|
def MRM_DE : Format<54>;
|
|
|
|
def MRM_DF : Format<55>;
|
2007-07-31 16:04:03 +08:00
|
|
|
|
|
|
|
// ImmType - This specifies the immediate type used by an instruction. This is
|
|
|
|
// part of the ad-hoc solution used to emit machine instruction encodings by our
|
|
|
|
// machine code emitter.
|
|
|
|
class ImmType<bits<3> val> {
|
|
|
|
bits<3> Value = val;
|
|
|
|
}
|
2010-02-13 06:27:07 +08:00
|
|
|
def NoImm : ImmType<0>;
|
|
|
|
def Imm8 : ImmType<1>;
|
|
|
|
def Imm8PCRel : ImmType<2>;
|
|
|
|
def Imm16 : ImmType<3>;
|
2010-07-08 06:27:31 +08:00
|
|
|
def Imm16PCRel : ImmType<4>;
|
|
|
|
def Imm32 : ImmType<5>;
|
|
|
|
def Imm32PCRel : ImmType<6>;
|
|
|
|
def Imm64 : ImmType<7>;
|
2007-07-31 16:04:03 +08:00
|
|
|
|
|
|
|
// FPFormat - This specifies what form this FP instruction has. This is used by
|
|
|
|
// the Floating-Point stackifier pass.
|
|
|
|
class FPFormat<bits<3> val> {
|
|
|
|
bits<3> Value = val;
|
|
|
|
}
|
|
|
|
def NotFP : FPFormat<0>;
|
|
|
|
def ZeroArgFP : FPFormat<1>;
|
|
|
|
def OneArgFP : FPFormat<2>;
|
|
|
|
def OneArgFPRW : FPFormat<3>;
|
|
|
|
def TwoArgFP : FPFormat<4>;
|
|
|
|
def CompareFP : FPFormat<5>;
|
|
|
|
def CondMovFP : FPFormat<6>;
|
|
|
|
def SpecialFP : FPFormat<7>;
|
|
|
|
|
2010-03-26 01:25:00 +08:00
|
|
|
// Class specifying the SSE execution domain, used by the SSEDomainFix pass.
|
2010-03-31 06:46:53 +08:00
|
|
|
// Keep in sync with tables in X86InstrInfo.cpp.
|
2010-03-26 01:25:00 +08:00
|
|
|
class Domain<bits<2> val> {
|
|
|
|
bits<2> Value = val;
|
|
|
|
}
|
|
|
|
def GenericDomain : Domain<0>;
|
2010-03-31 06:46:53 +08:00
|
|
|
def SSEPackedSingle : Domain<1>;
|
|
|
|
def SSEPackedDouble : Domain<2>;
|
|
|
|
def SSEPackedInt : Domain<3>;
|
2010-03-26 01:25:00 +08:00
|
|
|
|
2007-07-31 16:04:03 +08:00
|
|
|
// Prefix byte classes which are used to indicate to the ad-hoc machine code
|
|
|
|
// emitter that various prefix bytes are required.
|
|
|
|
class OpSize { bit hasOpSizePrefix = 1; }
|
|
|
|
class AdSize { bit hasAdSizePrefix = 1; }
|
|
|
|
class REX_W { bit hasREX_WPrefix = 1; }
|
2008-03-01 21:37:02 +08:00
|
|
|
class LOCK { bit hasLockPrefix = 1; }
|
2008-10-12 03:09:15 +08:00
|
|
|
class SegFS { bits<2> SegOvrBits = 1; }
|
|
|
|
class SegGS { bits<2> SegOvrBits = 2; }
|
2011-04-04 23:58:30 +08:00
|
|
|
class TB { bits<5> Prefix = 1; }
|
|
|
|
class REP { bits<5> Prefix = 2; }
|
|
|
|
class D8 { bits<5> Prefix = 3; }
|
|
|
|
class D9 { bits<5> Prefix = 4; }
|
|
|
|
class DA { bits<5> Prefix = 5; }
|
|
|
|
class DB { bits<5> Prefix = 6; }
|
|
|
|
class DC { bits<5> Prefix = 7; }
|
|
|
|
class DD { bits<5> Prefix = 8; }
|
|
|
|
class DE { bits<5> Prefix = 9; }
|
|
|
|
class DF { bits<5> Prefix = 10; }
|
|
|
|
class XD { bits<5> Prefix = 11; }
|
|
|
|
class XS { bits<5> Prefix = 12; }
|
|
|
|
class T8 { bits<5> Prefix = 13; }
|
|
|
|
class TA { bits<5> Prefix = 14; }
|
2011-04-05 00:58:13 +08:00
|
|
|
class A6 { bits<5> Prefix = 15; }
|
|
|
|
class A7 { bits<5> Prefix = 16; }
|
2011-10-17 00:50:08 +08:00
|
|
|
class T8XD { bits<5> Prefix = 17; }
|
|
|
|
class T8XS { bits<5> Prefix = 18; }
|
2011-10-23 15:34:00 +08:00
|
|
|
class TAXD { bits<5> Prefix = 19; }
|
2011-12-13 03:12:26 +08:00
|
|
|
class XOP8 { bits<5> Prefix = 20; }
|
|
|
|
class XOP9 { bits<5> Prefix = 21; }
|
2010-06-23 06:38:56 +08:00
|
|
|
class VEX { bit hasVEXPrefix = 1; }
|
2010-07-01 09:20:06 +08:00
|
|
|
class VEX_W { bit hasVEX_WPrefix = 1; }
|
2010-06-23 06:38:56 +08:00
|
|
|
class VEX_4V : VEX { bit hasVEX_4VPrefix = 1; }
|
2011-10-16 15:55:05 +08:00
|
|
|
class VEX_4VOp3 : VEX { bit hasVEX_4VOp3Prefix = 1; }
|
2010-07-07 06:36:24 +08:00
|
|
|
class VEX_I8IMM { bit hasVEX_i8ImmReg = 1; }
|
2010-07-14 05:07:28 +08:00
|
|
|
class VEX_L { bit hasVEX_L = 1; }
|
2011-10-04 14:30:42 +08:00
|
|
|
class VEX_LIG { bit ignoresVEX_L = 1; }
|
2010-10-04 02:08:05 +08:00
|
|
|
class Has3DNow0F0FOpcode { bit has3DNow0F0FOpcode = 1; }
|
2011-12-30 12:48:54 +08:00
|
|
|
class MemOp4 { bit hasMemOp4Prefix = 1; }
|
2011-12-13 03:12:26 +08:00
|
|
|
class XOP { bit hasXOP_Prefix = 1; }
|
2007-07-31 16:04:03 +08:00
|
|
|
class X86Inst<bits<8> opcod, Format f, ImmType i, dag outs, dag ins,
|
2012-02-02 07:20:51 +08:00
|
|
|
string AsmStr,
|
|
|
|
InstrItinClass itin,
|
|
|
|
Domain d = GenericDomain>
|
2007-07-31 16:04:03 +08:00
|
|
|
: Instruction {
|
|
|
|
let Namespace = "X86";
|
|
|
|
|
|
|
|
bits<8> Opcode = opcod;
|
|
|
|
Format Form = f;
|
|
|
|
bits<6> FormBits = Form.Value;
|
|
|
|
ImmType ImmT = i;
|
|
|
|
|
|
|
|
dag OutOperandList = outs;
|
|
|
|
dag InOperandList = ins;
|
|
|
|
string AsmString = AsmStr;
|
|
|
|
|
2010-11-01 03:22:57 +08:00
|
|
|
// If this is a pseudo instruction, mark it isCodeGenOnly.
|
|
|
|
let isCodeGenOnly = !eq(!cast<string>(f), "Pseudo");
|
|
|
|
|
2012-02-02 07:20:51 +08:00
|
|
|
let Itinerary = itin;
|
|
|
|
|
2007-07-31 16:04:03 +08:00
|
|
|
//
|
|
|
|
// Attributes specific to X86 instructions...
|
|
|
|
//
|
|
|
|
bit hasOpSizePrefix = 0; // Does this inst have a 0x66 prefix?
|
|
|
|
bit hasAdSizePrefix = 0; // Does this inst have a 0x67 prefix?
|
|
|
|
|
2011-04-04 23:58:30 +08:00
|
|
|
bits<5> Prefix = 0; // Which prefix byte does this inst have?
|
2010-11-30 17:11:54 +08:00
|
|
|
bit hasREX_WPrefix = 0; // Does this inst require the REX.W prefix?
|
2010-03-26 02:52:01 +08:00
|
|
|
FPFormat FPForm = NotFP; // What flavor of FP instruction is this?
|
2008-08-20 21:46:21 +08:00
|
|
|
bit hasLockPrefix = 0; // Does this inst have a 0xF0 prefix?
|
2008-10-12 03:09:15 +08:00
|
|
|
bits<2> SegOvrBits = 0; // Segment override prefix.
|
2010-03-26 02:52:01 +08:00
|
|
|
Domain ExeDomain = d;
|
2010-11-30 17:11:54 +08:00
|
|
|
bit hasVEXPrefix = 0; // Does this inst require a VEX prefix?
|
2010-07-01 09:20:06 +08:00
|
|
|
bit hasVEX_WPrefix = 0; // Does this inst set the VEX_W field?
|
2010-11-30 17:11:54 +08:00
|
|
|
bit hasVEX_4VPrefix = 0; // Does this inst require the VEX.VVVV field?
|
2011-10-16 15:55:05 +08:00
|
|
|
bit hasVEX_4VOp3Prefix = 0; // Does this inst require the VEX.VVVV field to
|
|
|
|
// encode the third operand?
|
2010-11-30 17:11:54 +08:00
|
|
|
bit hasVEX_i8ImmReg = 0; // Does this inst require the last source register
|
2010-07-07 06:36:24 +08:00
|
|
|
// to be encoded in a immediate field?
|
2010-11-30 17:11:54 +08:00
|
|
|
bit hasVEX_L = 0; // Does this inst use large (256-bit) registers?
|
2011-10-04 14:30:42 +08:00
|
|
|
bit ignoresVEX_L = 0; // Does this instruction ignore the L-bit
|
2010-10-04 02:08:05 +08:00
|
|
|
bit has3DNow0F0FOpcode =0;// Wacky 3dNow! encoding?
|
2011-12-30 12:48:54 +08:00
|
|
|
bit hasMemOp4Prefix = 0; // Same bit as VEX_W, but used for swapping operands
|
2011-12-13 03:12:26 +08:00
|
|
|
bit hasXOP_Prefix = 0; // Does this inst require an XOP prefix?
|
2010-04-05 11:10:20 +08:00
|
|
|
|
|
|
|
// TSFlags layout should be kept in sync with X86InstrInfo.h.
|
|
|
|
let TSFlags{5-0} = FormBits;
|
|
|
|
let TSFlags{6} = hasOpSizePrefix;
|
|
|
|
let TSFlags{7} = hasAdSizePrefix;
|
2011-04-04 23:58:30 +08:00
|
|
|
let TSFlags{12-8} = Prefix;
|
|
|
|
let TSFlags{13} = hasREX_WPrefix;
|
|
|
|
let TSFlags{16-14} = ImmT.Value;
|
|
|
|
let TSFlags{19-17} = FPForm.Value;
|
|
|
|
let TSFlags{20} = hasLockPrefix;
|
|
|
|
let TSFlags{22-21} = SegOvrBits;
|
|
|
|
let TSFlags{24-23} = ExeDomain.Value;
|
|
|
|
let TSFlags{32-25} = Opcode;
|
|
|
|
let TSFlags{33} = hasVEXPrefix;
|
|
|
|
let TSFlags{34} = hasVEX_WPrefix;
|
|
|
|
let TSFlags{35} = hasVEX_4VPrefix;
|
2011-10-16 15:55:05 +08:00
|
|
|
let TSFlags{36} = hasVEX_4VOp3Prefix;
|
|
|
|
let TSFlags{37} = hasVEX_i8ImmReg;
|
|
|
|
let TSFlags{38} = hasVEX_L;
|
|
|
|
let TSFlags{39} = ignoresVEX_L;
|
|
|
|
let TSFlags{40} = has3DNow0F0FOpcode;
|
2011-12-30 12:48:54 +08:00
|
|
|
let TSFlags{41} = hasMemOp4Prefix;
|
2011-12-13 03:12:26 +08:00
|
|
|
let TSFlags{42} = hasXOP_Prefix;
|
2007-07-31 16:04:03 +08:00
|
|
|
}
|
|
|
|
|
2010-11-30 16:57:23 +08:00
|
|
|
class PseudoI<dag oops, dag iops, list<dag> pattern>
|
2012-02-02 07:20:51 +08:00
|
|
|
: X86Inst<0, Pseudo, NoImm, oops, iops, "", NoItinerary> {
|
2010-11-30 16:57:23 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
}
|
|
|
|
|
2010-03-26 01:25:00 +08:00
|
|
|
class I<bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT,
|
|
|
|
Domain d = GenericDomain>
|
|
|
|
: X86Inst<o, f, NoImm, outs, ins, asm, itin, d> {
|
2007-07-31 16:04:03 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class Ii8 <bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT,
|
|
|
|
Domain d = GenericDomain>
|
|
|
|
: X86Inst<o, f, Imm8, outs, ins, asm, itin, d> {
|
2007-07-31 16:04:03 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
2010-02-13 06:27:07 +08:00
|
|
|
class Ii8PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: X86Inst<o, f, Imm8PCRel, outs, ins, asm, itin> {
|
2010-02-13 06:27:07 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class Ii16<bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: X86Inst<o, f, Imm16, outs, ins, asm, itin> {
|
2007-07-31 16:04:03 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class Ii32<bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: X86Inst<o, f, Imm32, outs, ins, asm, itin> {
|
2007-07-31 16:04:03 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
2010-07-08 06:27:31 +08:00
|
|
|
class Ii16PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: X86Inst<o, f, Imm16PCRel, outs, ins, asm, itin> {
|
2010-07-08 06:27:31 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
2010-02-13 06:27:07 +08:00
|
|
|
class Ii32PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: X86Inst<o, f, Imm32PCRel, outs, ins, asm, itin> {
|
2010-02-13 06:27:07 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
2007-07-31 16:04:03 +08:00
|
|
|
// FPStack Instruction Templates:
|
|
|
|
// FPI - Floating Point Instruction template.
|
2012-05-03 00:03:35 +08:00
|
|
|
class FPI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, [], itin> {}
|
2007-07-31 16:04:03 +08:00
|
|
|
|
2010-08-27 02:08:11 +08:00
|
|
|
// FpI_ - Floating Point Pseudo Instruction template. Not Predicated.
|
2012-02-02 07:20:51 +08:00
|
|
|
class FpI_<dag outs, dag ins, FPFormat fp, list<dag> pattern,
|
|
|
|
InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: X86Inst<0, Pseudo, NoImm, outs, ins, "", itin> {
|
2010-03-26 02:52:01 +08:00
|
|
|
let FPForm = fp;
|
2007-07-31 16:04:03 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
}
|
|
|
|
|
2009-09-15 08:35:17 +08:00
|
|
|
// Templates for instructions that use a 16- or 32-bit segmented address as
|
|
|
|
// their only operand: lcall (FAR CALL) and ljmp (FAR JMP)
|
|
|
|
//
|
|
|
|
// Iseg16 - 16-bit segment selector, 16-bit offset
|
|
|
|
// Iseg32 - 16-bit segment selector, 32-bit offset
|
|
|
|
|
|
|
|
class Iseg16 <bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: X86Inst<o, f, Imm16, outs, ins, asm, itin> {
|
2009-09-15 08:35:17 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Iseg32 <bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: X86Inst<o, f, Imm32, outs, ins, asm, itin> {
|
2009-09-15 08:35:17 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
2010-06-18 07:05:30 +08:00
|
|
|
// SI - SSE 1 & 2 scalar instructions
|
2012-02-02 07:20:51 +08:00
|
|
|
class SI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin> {
|
2010-07-13 08:38:47 +08:00
|
|
|
let Predicates = !if(hasVEXPrefix /* VEX */, [HasAVX],
|
2010-06-19 07:53:27 +08:00
|
|
|
!if(!eq(Prefix, 12 /* XS */), [HasSSE1], [HasSSE2]));
|
2010-06-18 07:05:30 +08:00
|
|
|
|
|
|
|
// AVX instructions have a 'v' prefix in the mnemonic
|
2010-06-24 08:32:06 +08:00
|
|
|
let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
|
|
|
|
}
|
|
|
|
|
|
|
|
// SIi8 - SSE 1 & 2 scalar instructions
|
|
|
|
class SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin> {
|
2010-07-13 08:38:47 +08:00
|
|
|
let Predicates = !if(hasVEXPrefix /* VEX */, [HasAVX],
|
2010-06-24 08:32:06 +08:00
|
|
|
!if(!eq(Prefix, 12 /* XS */), [HasSSE1], [HasSSE2]));
|
|
|
|
|
|
|
|
// AVX instructions have a 'v' prefix in the mnemonic
|
2010-06-23 06:38:56 +08:00
|
|
|
let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
|
2010-06-19 07:13:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// PI - SSE 1 & 2 packed instructions
|
|
|
|
class PI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
|
2012-02-02 07:20:51 +08:00
|
|
|
InstrItinClass itin, Domain d>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, d> {
|
2010-07-13 08:38:47 +08:00
|
|
|
let Predicates = !if(hasVEXPrefix /* VEX */, [HasAVX],
|
2010-06-19 07:13:35 +08:00
|
|
|
!if(hasOpSizePrefix /* OpSize */, [HasSSE2], [HasSSE1]));
|
|
|
|
|
|
|
|
// AVX instructions have a 'v' prefix in the mnemonic
|
2010-06-23 06:38:56 +08:00
|
|
|
let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
|
2010-06-18 07:05:30 +08:00
|
|
|
}
|
|
|
|
|
2010-06-23 07:37:59 +08:00
|
|
|
// PIi8 - SSE 1 & 2 packed instructions with immediate
|
|
|
|
class PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin, Domain d>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, d> {
|
2010-07-13 08:38:47 +08:00
|
|
|
let Predicates = !if(hasVEX_4VPrefix /* VEX */, [HasAVX],
|
2010-06-23 07:37:59 +08:00
|
|
|
!if(hasOpSizePrefix /* OpSize */, [HasSSE2], [HasSSE1]));
|
|
|
|
|
|
|
|
// AVX instructions have a 'v' prefix in the mnemonic
|
|
|
|
let AsmString = !if(hasVEX_4VPrefix, !strconcat("v", asm), asm);
|
|
|
|
}
|
|
|
|
|
2007-07-31 16:04:03 +08:00
|
|
|
// SSE1 Instruction Templates:
|
|
|
|
//
|
|
|
|
// SSI - SSE1 instructions with XS prefix.
|
|
|
|
// PSI - SSE1 instructions with TB prefix.
|
|
|
|
// PSIi8 - SSE1 instructions with ImmT == Imm8 and TB prefix.
|
2010-06-09 06:51:23 +08:00
|
|
|
// VSSI - SSE1 instructions with XS prefix in AVX form.
|
2010-06-12 09:23:26 +08:00
|
|
|
// VPSI - SSE1 instructions with TB prefix in AVX form.
|
2007-07-31 16:04:03 +08:00
|
|
|
|
2012-02-02 07:20:51 +08:00
|
|
|
class SSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[HasSSE1]>;
|
2010-03-26 01:25:00 +08:00
|
|
|
class SSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[HasSSE1]>;
|
|
|
|
class PSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, TB,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE1]>;
|
2007-07-31 16:04:03 +08:00
|
|
|
class PSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, TB,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE1]>;
|
2010-06-09 06:51:23 +08:00
|
|
|
class VSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XS,
|
2010-07-13 08:38:47 +08:00
|
|
|
Requires<[HasAVX]>;
|
2010-06-12 09:23:26 +08:00
|
|
|
class VPSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, !strconcat("v", asm), pattern, itin, SSEPackedSingle>, TB,
|
2010-07-13 08:38:47 +08:00
|
|
|
Requires<[HasAVX]>;
|
2007-07-31 16:04:03 +08:00
|
|
|
|
|
|
|
// SSE2 Instruction Templates:
|
|
|
|
//
|
2008-08-28 05:32:04 +08:00
|
|
|
// SDI - SSE2 instructions with XD prefix.
|
|
|
|
// SDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix.
|
2012-07-30 10:14:02 +08:00
|
|
|
// S2SI - SSE2 instructions with XS prefix.
|
2008-08-28 05:32:04 +08:00
|
|
|
// SSDIi8 - SSE2 instructions with ImmT == Imm8 and XS prefix.
|
|
|
|
// PDI - SSE2 instructions with TB and OpSize prefixes.
|
|
|
|
// PDIi8 - SSE2 instructions with ImmT == Imm8 and TB and OpSize prefixes.
|
2010-06-09 06:51:23 +08:00
|
|
|
// VSDI - SSE2 instructions with XD prefix in AVX form.
|
2010-06-12 09:23:26 +08:00
|
|
|
// VPDI - SSE2 instructions with TB and OpSize prefixes in AVX form.
|
2007-07-31 16:04:03 +08:00
|
|
|
|
2012-02-02 07:20:51 +08:00
|
|
|
class SDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[HasSSE2]>;
|
2007-12-21 03:57:09 +08:00
|
|
|
class SDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[HasSSE2]>;
|
2012-07-30 10:14:02 +08:00
|
|
|
class S2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
2012-06-06 14:45:27 +08:00
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[HasSSE2]>;
|
2012-07-30 10:14:02 +08:00
|
|
|
class S2SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-05-11 22:27:12 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
2008-08-28 05:32:04 +08:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[HasSSE2]>;
|
2012-02-02 07:20:51 +08:00
|
|
|
class PDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB, OpSize,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE2]>;
|
2007-07-31 16:04:03 +08:00
|
|
|
class PDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB, OpSize,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE2]>;
|
2010-06-09 06:51:23 +08:00
|
|
|
class VSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XD,
|
2010-07-13 08:38:47 +08:00
|
|
|
Requires<[HasAVX]>;
|
2012-07-30 10:14:02 +08:00
|
|
|
class VS2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XS,
|
|
|
|
Requires<[HasAVX]>;
|
2010-06-12 09:23:26 +08:00
|
|
|
class VPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, !strconcat("v", asm), pattern, itin, SSEPackedDouble>, TB,
|
2010-07-13 08:38:47 +08:00
|
|
|
OpSize, Requires<[HasAVX]>;
|
2007-07-31 16:04:03 +08:00
|
|
|
|
|
|
|
// SSE3 Instruction Templates:
|
|
|
|
//
|
|
|
|
// S3I - SSE3 instructions with TB and OpSize prefixes.
|
|
|
|
// S3SI - SSE3 instructions with XS prefix.
|
|
|
|
// S3DI - SSE3 instructions with XD prefix.
|
|
|
|
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class S3SI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, XS,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE3]>;
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class S3DI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, XD,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE3]>;
|
2012-02-02 07:20:51 +08:00
|
|
|
class S3I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB, OpSize,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE3]>;
|
2007-07-31 16:04:03 +08:00
|
|
|
|
|
|
|
|
2008-02-13 06:51:28 +08:00
|
|
|
// SSSE3 Instruction Templates:
|
|
|
|
//
|
|
|
|
// SS38I - SSSE3 instructions with T8 prefix.
|
|
|
|
// SS3AI - SSSE3 instructions with TA prefix.
|
|
|
|
//
|
|
|
|
// Note: SSSE3 instructions have 64-bit and 128-bit versions. The 64-bit version
|
2012-01-09 08:11:29 +08:00
|
|
|
// uses the MMX registers. The 64-bit versions are grouped with the MMX
|
|
|
|
// classes. They need to be enabled even if AVX is enabled.
|
2008-02-13 06:51:28 +08:00
|
|
|
|
|
|
|
class SS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSSE3]>;
|
2008-02-13 06:51:28 +08:00
|
|
|
class SS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSSE3]>;
|
2008-02-13 06:51:28 +08:00
|
|
|
|
|
|
|
// SSE4.1 Instruction Templates:
|
|
|
|
//
|
|
|
|
// SS48I - SSE 4.1 instructions with T8 prefix.
|
2008-03-14 15:39:27 +08:00
|
|
|
// SS41AIi8 - SSE 4.1 instructions with TA prefix and ImmT == Imm8.
|
2008-02-13 06:51:28 +08:00
|
|
|
//
|
|
|
|
class SS48I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE41]>;
|
2008-03-14 15:39:27 +08:00
|
|
|
class SS4AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE41]>;
|
2008-02-13 06:51:28 +08:00
|
|
|
|
2008-07-18 00:51:19 +08:00
|
|
|
// SSE4.2 Instruction Templates:
|
|
|
|
//
|
|
|
|
// SS428I - SSE 4.2 instructions with T8 prefix.
|
|
|
|
class SS428I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE42]>;
|
2008-02-13 06:51:28 +08:00
|
|
|
|
2011-10-17 00:50:08 +08:00
|
|
|
// SS42FI - SSE 4.2 instructions with T8XD prefix.
|
2009-08-09 05:55:08 +08:00
|
|
|
class SS42FI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, T8XD, Requires<[HasSSE42]>;
|
2012-01-02 03:51:58 +08:00
|
|
|
|
2009-08-19 06:50:32 +08:00
|
|
|
// SS42AI = SSE 4.2 instructions with TA prefix
|
|
|
|
class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
|
2010-03-26 01:25:00 +08:00
|
|
|
Requires<[HasSSE42]>;
|
2009-08-19 06:50:32 +08:00
|
|
|
|
2010-07-20 08:11:13 +08:00
|
|
|
// AVX Instruction Templates:
|
|
|
|
// Instructions introduced in AVX (no SSE equivalent forms)
|
|
|
|
//
|
|
|
|
// AVX8I - AVX instructions with T8 and OpSize prefix.
|
2010-07-21 03:44:51 +08:00
|
|
|
// AVXAIi8 - AVX instructions with TA, OpSize prefix and ImmT = Imm8.
|
2010-07-20 08:11:13 +08:00
|
|
|
class AVX8I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8, OpSize,
|
2010-07-20 08:11:13 +08:00
|
|
|
Requires<[HasAVX]>;
|
2010-07-21 03:44:51 +08:00
|
|
|
class AVXAIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA, OpSize,
|
2010-07-21 03:44:51 +08:00
|
|
|
Requires<[HasAVX]>;
|
2010-07-20 08:11:13 +08:00
|
|
|
|
2011-11-06 14:12:20 +08:00
|
|
|
// AVX2 Instruction Templates:
|
|
|
|
// Instructions introduced in AVX2 (no SSE equivalent forms)
|
|
|
|
//
|
|
|
|
// AVX28I - AVX2 instructions with T8 and OpSize prefix.
|
|
|
|
// AVX2AIi8 - AVX2 instructions with TA, OpSize prefix and ImmT = Imm8.
|
|
|
|
class AVX28I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8, OpSize,
|
2011-11-06 14:12:20 +08:00
|
|
|
Requires<[HasAVX2]>;
|
2011-11-07 07:04:08 +08:00
|
|
|
class AVX2AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA, OpSize,
|
2011-11-06 14:12:20 +08:00
|
|
|
Requires<[HasAVX2]>;
|
|
|
|
|
2010-04-03 05:54:27 +08:00
|
|
|
// AES Instruction Templates:
|
|
|
|
//
|
|
|
|
// AES8I
|
2010-04-06 05:14:32 +08:00
|
|
|
// These use the same encoding as the SSE4.2 T8 and TA encodings.
|
2010-04-03 05:54:27 +08:00
|
|
|
class AES8I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag>pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
|
2012-05-01 13:35:02 +08:00
|
|
|
Requires<[HasAES]>;
|
2010-04-03 05:54:27 +08:00
|
|
|
|
|
|
|
class AESAI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
|
2012-05-01 13:35:02 +08:00
|
|
|
Requires<[HasAES]>;
|
2010-04-03 05:54:27 +08:00
|
|
|
|
2012-05-31 22:34:17 +08:00
|
|
|
// PCLMUL Instruction Templates
|
|
|
|
class PCLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag>pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
|
2012-05-31 22:34:17 +08:00
|
|
|
OpSize, Requires<[HasPCLMUL]>;
|
2011-07-06 02:21:20 +08:00
|
|
|
|
2012-05-31 22:34:17 +08:00
|
|
|
class AVXPCLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag>pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
|
2012-05-31 22:34:17 +08:00
|
|
|
OpSize, VEX_4V, Requires<[HasAVX, HasPCLMUL]>;
|
2010-07-24 02:41:12 +08:00
|
|
|
|
2010-07-23 08:54:35 +08:00
|
|
|
// FMA3 Instruction Templates
|
|
|
|
class FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag>pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, T8,
|
2012-06-04 02:58:46 +08:00
|
|
|
OpSize, VEX_4V, Requires<[HasFMA]>;
|
2010-07-23 08:54:35 +08:00
|
|
|
|
2011-11-26 03:33:42 +08:00
|
|
|
// FMA4 Instruction Templates
|
|
|
|
class FMA4<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag>pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
|
2011-11-26 03:33:42 +08:00
|
|
|
OpSize, VEX_4V, VEX_I8IMM, Requires<[HasFMA4]>;
|
|
|
|
|
2011-12-13 03:37:49 +08:00
|
|
|
// XOP 2, 3 and 4 Operand Instruction Template
|
|
|
|
class IXOP<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>,
|
2011-12-13 03:37:49 +08:00
|
|
|
XOP, XOP9, Requires<[HasXOP]>;
|
|
|
|
|
|
|
|
// XOP 2, 3 and 4 Operand Instruction Templates with imm byte
|
|
|
|
class IXOPi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>,
|
2011-12-13 03:37:49 +08:00
|
|
|
XOP, XOP8, Requires<[HasXOP]>;
|
|
|
|
|
|
|
|
// XOP 5 operand instruction (VEX encoding!)
|
|
|
|
class IXOP5<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag>pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
|
2011-12-13 03:37:49 +08:00
|
|
|
OpSize, VEX_4V, VEX_I8IMM, Requires<[HasXOP]>;
|
|
|
|
|
2007-07-31 16:04:03 +08:00
|
|
|
// X86-64 Instruction templates...
|
|
|
|
//
|
|
|
|
|
2012-02-02 07:20:51 +08:00
|
|
|
class RI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
2007-07-31 16:04:03 +08:00
|
|
|
class RIi8 <bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
2007-07-31 16:04:03 +08:00
|
|
|
class RIi32 <bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii32<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
2007-07-31 16:04:03 +08:00
|
|
|
|
|
|
|
class RIi64<bits<8> o, Format f, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: X86Inst<o, f, Imm64, outs, ins, asm, itin>, REX_W {
|
2007-07-31 16:04:03 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
class RSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: SSI<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
2007-07-31 16:04:03 +08:00
|
|
|
class RSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: SDI<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
2007-07-31 16:04:03 +08:00
|
|
|
class RPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: PDI<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
2011-07-26 07:05:25 +08:00
|
|
|
class VRPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: VPDI<o, F, outs, ins, asm, pattern, itin>, VEX_W;
|
2007-07-31 16:04:03 +08:00
|
|
|
|
|
|
|
// MMX Instruction templates
|
|
|
|
//
|
|
|
|
|
|
|
|
// MMXI - MMX instructions with TB prefix.
|
2008-08-23 23:53:19 +08:00
|
|
|
// MMXI64 - MMX instructions with TB prefix valid only in 64 bit mode.
|
2007-07-31 16:04:03 +08:00
|
|
|
// MMX2I - MMX / SSE2 instructions with TB and OpSize prefixes.
|
|
|
|
// MMXIi8 - MMX instructions with ImmT == Imm8 and TB prefix.
|
|
|
|
// MMXIi8 - MMX instructions with ImmT == Imm8 and TB prefix.
|
|
|
|
// MMXID - MMX instructions with XD prefix.
|
|
|
|
// MMXIS - MMX instructions with XS prefix.
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class MMXI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, TB, Requires<[HasMMX]>;
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class MMXI64<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, TB, Requires<[HasMMX,In64BitMode]>;
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class MMXRI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, TB, REX_W, Requires<[HasMMX]>;
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class MMX2I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, itin>, TB, OpSize, Requires<[HasMMX]>;
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class MMXIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin>, TB, Requires<[HasMMX]>;
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class MMXID<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[HasMMX]>;
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
class MMXIS<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2012-02-02 07:20:51 +08:00
|
|
|
list<dag> pattern, InstrItinClass itin = IIC_DEFAULT>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[HasMMX]>;
|