2007-07-31 08:04:03 +00:00
|
|
|
//===- X86InstrFormats.td - X86 Instruction Formats --------*- tablegen -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2007-07-31 08:04:03 +00: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 02:06:33 +00:00
|
|
|
def MRM_C1 : Format<33>;
|
2010-02-13 00:41:14 +00: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 02:06:11 +00:00
|
|
|
def MRM_F9 : Format<42>;
|
2010-09-17 18:02:29 +00:00
|
|
|
def RawFrmImm8 : Format<43>;
|
|
|
|
def RawFrmImm16 : Format<44>;
|
2007-07-31 08:04:03 +00: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-12 22:27:07 +00:00
|
|
|
def NoImm : ImmType<0>;
|
|
|
|
def Imm8 : ImmType<1>;
|
|
|
|
def Imm8PCRel : ImmType<2>;
|
|
|
|
def Imm16 : ImmType<3>;
|
2010-07-07 22:27:31 +00:00
|
|
|
def Imm16PCRel : ImmType<4>;
|
|
|
|
def Imm32 : ImmType<5>;
|
|
|
|
def Imm32PCRel : ImmType<6>;
|
|
|
|
def Imm64 : ImmType<7>;
|
2007-07-31 08:04:03 +00: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-25 17:25:00 +00:00
|
|
|
// Class specifying the SSE execution domain, used by the SSEDomainFix pass.
|
2010-03-30 22:46:53 +00:00
|
|
|
// Keep in sync with tables in X86InstrInfo.cpp.
|
2010-03-25 17:25:00 +00:00
|
|
|
class Domain<bits<2> val> {
|
|
|
|
bits<2> Value = val;
|
|
|
|
}
|
|
|
|
def GenericDomain : Domain<0>;
|
2010-03-30 22:46:53 +00:00
|
|
|
def SSEPackedSingle : Domain<1>;
|
|
|
|
def SSEPackedDouble : Domain<2>;
|
|
|
|
def SSEPackedInt : Domain<3>;
|
2010-03-25 17:25:00 +00:00
|
|
|
|
2007-07-31 08:04:03 +00: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 13:37:02 +00:00
|
|
|
class LOCK { bit hasLockPrefix = 1; }
|
2008-10-11 19:09:15 +00:00
|
|
|
class SegFS { bits<2> SegOvrBits = 1; }
|
|
|
|
class SegGS { bits<2> SegOvrBits = 2; }
|
2007-07-31 08:04:03 +00:00
|
|
|
class TB { bits<4> Prefix = 1; }
|
|
|
|
class REP { bits<4> Prefix = 2; }
|
|
|
|
class D8 { bits<4> Prefix = 3; }
|
|
|
|
class D9 { bits<4> Prefix = 4; }
|
|
|
|
class DA { bits<4> Prefix = 5; }
|
|
|
|
class DB { bits<4> Prefix = 6; }
|
|
|
|
class DC { bits<4> Prefix = 7; }
|
|
|
|
class DD { bits<4> Prefix = 8; }
|
|
|
|
class DE { bits<4> Prefix = 9; }
|
|
|
|
class DF { bits<4> Prefix = 10; }
|
|
|
|
class XD { bits<4> Prefix = 11; }
|
|
|
|
class XS { bits<4> Prefix = 12; }
|
|
|
|
class T8 { bits<4> Prefix = 13; }
|
|
|
|
class TA { bits<4> Prefix = 14; }
|
2009-08-08 21:55:08 +00:00
|
|
|
class TF { bits<4> Prefix = 15; }
|
2010-06-22 22:38:56 +00:00
|
|
|
class VEX { bit hasVEXPrefix = 1; }
|
2010-07-01 01:20:06 +00:00
|
|
|
class VEX_W { bit hasVEX_WPrefix = 1; }
|
2010-06-22 22:38:56 +00:00
|
|
|
class VEX_4V : VEX { bit hasVEX_4VPrefix = 1; }
|
2010-07-06 22:36:24 +00:00
|
|
|
class VEX_I8IMM { bit hasVEX_i8ImmReg = 1; }
|
2010-07-13 21:07:28 +00:00
|
|
|
class VEX_L { bit hasVEX_L = 1; }
|
2010-10-03 18:08:05 +00:00
|
|
|
class Has3DNow0F0FOpcode { bit has3DNow0F0FOpcode = 1; }
|
2007-07-31 08:04:03 +00:00
|
|
|
|
|
|
|
class X86Inst<bits<8> opcod, Format f, ImmType i, dag outs, dag ins,
|
2010-03-25 17:25:00 +00:00
|
|
|
string AsmStr, Domain d = GenericDomain>
|
2007-07-31 08:04:03 +00: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-10-31 19:22:57 +00:00
|
|
|
// If this is a pseudo instruction, mark it isCodeGenOnly.
|
|
|
|
let isCodeGenOnly = !eq(!cast<string>(f), "Pseudo");
|
|
|
|
|
2007-07-31 08:04:03 +00: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?
|
|
|
|
|
|
|
|
bits<4> Prefix = 0; // Which prefix byte does this inst have?
|
|
|
|
bit hasREX_WPrefix = 0; // Does this inst requires the REX.W prefix?
|
2010-03-25 18:52:01 +00:00
|
|
|
FPFormat FPForm = NotFP; // What flavor of FP instruction is this?
|
2008-08-20 13:46:21 +00:00
|
|
|
bit hasLockPrefix = 0; // Does this inst have a 0xF0 prefix?
|
2008-10-11 19:09:15 +00:00
|
|
|
bits<2> SegOvrBits = 0; // Segment override prefix.
|
2010-03-25 18:52:01 +00:00
|
|
|
Domain ExeDomain = d;
|
2010-07-01 01:20:06 +00:00
|
|
|
bit hasVEXPrefix = 0; // Does this inst requires a VEX prefix?
|
|
|
|
bit hasVEX_WPrefix = 0; // Does this inst set the VEX_W field?
|
|
|
|
bit hasVEX_4VPrefix = 0; // Does this inst requires the VEX.VVVV field?
|
2010-07-06 22:36:24 +00:00
|
|
|
bit hasVEX_i8ImmReg = 0; // Does this inst requires the last source register
|
|
|
|
// to be encoded in a immediate field?
|
2010-07-13 21:07:28 +00:00
|
|
|
bit hasVEX_L = 0; // Does this inst uses large (256-bit) registers?
|
2010-10-03 18:08:05 +00:00
|
|
|
bit has3DNow0F0FOpcode =0;// Wacky 3dNow! encoding?
|
2010-04-05 03:10:20 +00:00
|
|
|
|
|
|
|
// TSFlags layout should be kept in sync with X86InstrInfo.h.
|
|
|
|
let TSFlags{5-0} = FormBits;
|
|
|
|
let TSFlags{6} = hasOpSizePrefix;
|
|
|
|
let TSFlags{7} = hasAdSizePrefix;
|
|
|
|
let TSFlags{11-8} = Prefix;
|
|
|
|
let TSFlags{12} = hasREX_WPrefix;
|
|
|
|
let TSFlags{15-13} = ImmT.Value;
|
|
|
|
let TSFlags{18-16} = FPForm.Value;
|
|
|
|
let TSFlags{19} = hasLockPrefix;
|
|
|
|
let TSFlags{21-20} = SegOvrBits;
|
|
|
|
let TSFlags{23-22} = ExeDomain.Value;
|
|
|
|
let TSFlags{31-24} = Opcode;
|
2010-06-22 22:38:56 +00:00
|
|
|
let TSFlags{32} = hasVEXPrefix;
|
2010-07-01 01:20:06 +00:00
|
|
|
let TSFlags{33} = hasVEX_WPrefix;
|
|
|
|
let TSFlags{34} = hasVEX_4VPrefix;
|
2010-07-06 22:36:24 +00:00
|
|
|
let TSFlags{35} = hasVEX_i8ImmReg;
|
2010-07-13 21:07:28 +00:00
|
|
|
let TSFlags{36} = hasVEX_L;
|
2010-10-03 18:08:05 +00:00
|
|
|
let TSFlags{37} = has3DNow0F0FOpcode;
|
2007-07-31 08:04:03 +00:00
|
|
|
}
|
|
|
|
|
2010-03-25 17:25:00 +00:00
|
|
|
class I<bits<8> o, Format f, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, Domain d = GenericDomain>
|
|
|
|
: X86Inst<o, f, NoImm, outs, ins, asm, d> {
|
2007-07-31 08:04:03 +00: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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class Ii8 <bits<8> o, Format f, dag outs, dag ins, string asm,
|
2010-03-25 17:25:00 +00:00
|
|
|
list<dag> pattern, Domain d = GenericDomain>
|
|
|
|
: X86Inst<o, f, Imm8, outs, ins, asm, d> {
|
2007-07-31 08:04:03 +00:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
2010-02-12 22:27:07 +00:00
|
|
|
class Ii8PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: X86Inst<o, f, Imm8PCRel, outs, ins, asm> {
|
|
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class Ii16<bits<8> o, Format f, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2007-07-31 08:04:03 +00:00
|
|
|
: X86Inst<o, f, Imm16, outs, ins, asm> {
|
|
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class Ii32<bits<8> o, Format f, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2007-07-31 08:04:03 +00:00
|
|
|
: X86Inst<o, f, Imm32, outs, ins, asm> {
|
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
2010-07-07 22:27:31 +00:00
|
|
|
class Ii16PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: X86Inst<o, f, Imm16PCRel, outs, ins, asm> {
|
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
2010-02-12 22:27:07 +00:00
|
|
|
class Ii32PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: X86Inst<o, f, Imm32PCRel, outs, ins, asm> {
|
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
2007-07-31 08:04:03 +00:00
|
|
|
// FPStack Instruction Templates:
|
|
|
|
// FPI - Floating Point Instruction template.
|
|
|
|
class FPI<bits<8> o, Format F, dag outs, dag ins, string asm>
|
|
|
|
: I<o, F, outs, ins, asm, []> {}
|
|
|
|
|
2010-08-26 18:08:11 +00:00
|
|
|
// FpI_ - Floating Point Pseudo Instruction template. Not Predicated.
|
2007-07-31 08:04:03 +00:00
|
|
|
class FpI_<dag outs, dag ins, FPFormat fp, list<dag> pattern>
|
|
|
|
: X86Inst<0, Pseudo, NoImm, outs, ins, ""> {
|
2010-03-25 18:52:01 +00:00
|
|
|
let FPForm = fp;
|
2007-07-31 08:04:03 +00:00
|
|
|
let Pattern = pattern;
|
|
|
|
}
|
|
|
|
|
2009-09-15 00:35:17 +00: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,
|
2010-08-19 01:00:34 +00:00
|
|
|
list<dag> pattern> : X86Inst<o, f, Imm16, outs, ins, asm> {
|
2009-09-15 00:35:17 +00:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Iseg32 <bits<8> o, Format f, dag outs, dag ins, string asm,
|
2010-08-19 01:00:34 +00:00
|
|
|
list<dag> pattern> : X86Inst<o, f, Imm32, outs, ins, asm> {
|
2009-09-15 00:35:17 +00:00
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
2010-06-17 23:05:30 +00:00
|
|
|
// SI - SSE 1 & 2 scalar instructions
|
|
|
|
class SI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern>
|
|
|
|
: I<o, F, outs, ins, asm, pattern> {
|
2010-07-13 00:38:47 +00:00
|
|
|
let Predicates = !if(hasVEXPrefix /* VEX */, [HasAVX],
|
2010-06-18 23:53:27 +00:00
|
|
|
!if(!eq(Prefix, 12 /* XS */), [HasSSE1], [HasSSE2]));
|
2010-06-17 23:05:30 +00:00
|
|
|
|
|
|
|
// AVX instructions have a 'v' prefix in the mnemonic
|
2010-06-24 00:32:06 +00: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,
|
|
|
|
list<dag> pattern>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern> {
|
2010-07-13 00:38:47 +00:00
|
|
|
let Predicates = !if(hasVEXPrefix /* VEX */, [HasAVX],
|
2010-06-24 00:32:06 +00:00
|
|
|
!if(!eq(Prefix, 12 /* XS */), [HasSSE1], [HasSSE2]));
|
|
|
|
|
|
|
|
// AVX instructions have a 'v' prefix in the mnemonic
|
2010-06-22 22:38:56 +00:00
|
|
|
let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
|
2010-06-18 23:13:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PI - SSE 1 & 2 packed instructions
|
|
|
|
class PI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
|
|
|
|
Domain d>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, d> {
|
2010-07-13 00:38:47 +00:00
|
|
|
let Predicates = !if(hasVEXPrefix /* VEX */, [HasAVX],
|
2010-06-18 23:13:35 +00:00
|
|
|
!if(hasOpSizePrefix /* OpSize */, [HasSSE2], [HasSSE1]));
|
|
|
|
|
|
|
|
// AVX instructions have a 'v' prefix in the mnemonic
|
2010-06-22 22:38:56 +00:00
|
|
|
let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
|
2010-06-17 23:05:30 +00:00
|
|
|
}
|
|
|
|
|
2010-06-22 23:37:59 +00:00
|
|
|
// PIi8 - SSE 1 & 2 packed instructions with immediate
|
|
|
|
class PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern, Domain d>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, d> {
|
2010-07-13 00:38:47 +00:00
|
|
|
let Predicates = !if(hasVEX_4VPrefix /* VEX */, [HasAVX],
|
2010-06-22 23:37:59 +00: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 08:04:03 +00: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-08 22:51:23 +00:00
|
|
|
// VSSI - SSE1 instructions with XS prefix in AVX form.
|
2010-06-12 01:23:26 +00:00
|
|
|
// VPSI - SSE1 instructions with TB prefix in AVX form.
|
2007-07-31 08:04:03 +00:00
|
|
|
|
|
|
|
class SSI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern>
|
|
|
|
: I<o, F, outs, ins, asm, pattern>, XS, Requires<[HasSSE1]>;
|
2010-03-25 17:25:00 +00:00
|
|
|
class SSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
list<dag> pattern>
|
2007-12-16 20:12:41 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[HasSSE1]>;
|
2007-07-31 08:04:03 +00:00
|
|
|
class PSI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedSingle>, TB,
|
|
|
|
Requires<[HasSSE1]>;
|
2007-07-31 08:04:03 +00:00
|
|
|
class PSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedSingle>, TB,
|
|
|
|
Requires<[HasSSE1]>;
|
2010-06-08 22:51:23 +00:00
|
|
|
class VSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2010-06-25 23:33:42 +00:00
|
|
|
: I<o, F, outs, ins, !strconcat("v", asm), pattern>, XS,
|
2010-07-13 00:38:47 +00:00
|
|
|
Requires<[HasAVX]>;
|
2010-06-12 01:23:26 +00:00
|
|
|
class VPSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: I<o, F, outs, ins, !strconcat("v", asm), pattern, SSEPackedSingle>,
|
2010-07-13 00:38:47 +00:00
|
|
|
Requires<[HasAVX]>;
|
2007-07-31 08:04:03 +00:00
|
|
|
|
|
|
|
// SSE2 Instruction Templates:
|
|
|
|
//
|
2008-08-27 21:32:04 +00:00
|
|
|
// SDI - SSE2 instructions with XD prefix.
|
|
|
|
// SDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix.
|
|
|
|
// 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-08 22:51:23 +00:00
|
|
|
// VSDI - SSE2 instructions with XD prefix in AVX form.
|
2010-06-12 01:23:26 +00:00
|
|
|
// VPDI - SSE2 instructions with TB and OpSize prefixes in AVX form.
|
2007-07-31 08:04:03 +00:00
|
|
|
|
|
|
|
class SDI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern>
|
|
|
|
: I<o, F, outs, ins, asm, pattern>, XD, Requires<[HasSSE2]>;
|
2007-12-20 19:57:09 +00:00
|
|
|
class SDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern>, XD, Requires<[HasSSE2]>;
|
2008-08-27 21:32:04 +00:00
|
|
|
class SSDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[HasSSE2]>;
|
2007-07-31 08:04:03 +00:00
|
|
|
class PDI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedDouble>, TB, OpSize,
|
|
|
|
Requires<[HasSSE2]>;
|
2007-07-31 08:04:03 +00:00
|
|
|
class PDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedDouble>, TB, OpSize,
|
|
|
|
Requires<[HasSSE2]>;
|
2010-06-08 22:51:23 +00:00
|
|
|
class VSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2010-06-25 23:33:42 +00:00
|
|
|
: I<o, F, outs, ins, !strconcat("v", asm), pattern>, XD,
|
2010-07-13 00:38:47 +00:00
|
|
|
Requires<[HasAVX]>;
|
2010-06-12 01:23:26 +00:00
|
|
|
class VPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: I<o, F, outs, ins, !strconcat("v", asm), pattern, SSEPackedDouble>,
|
2010-07-13 00:38:47 +00:00
|
|
|
OpSize, Requires<[HasAVX]>;
|
2007-07-31 08:04:03 +00: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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class S3SI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedSingle>, XS,
|
|
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class S3DI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedDouble>, XD,
|
|
|
|
Requires<[HasSSE3]>;
|
2007-07-31 08:04:03 +00:00
|
|
|
class S3I<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedDouble>, TB, OpSize,
|
|
|
|
Requires<[HasSSE3]>;
|
2007-07-31 08:04:03 +00:00
|
|
|
|
|
|
|
|
2008-02-12 22:51:28 +00: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
|
|
|
|
// uses the MMX registers. We put those instructions here because they better
|
|
|
|
// fit into the SSSE3 instruction category rather than the MMX category.
|
|
|
|
|
|
|
|
class SS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8,
|
|
|
|
Requires<[HasSSSE3]>;
|
2008-02-12 22:51:28 +00:00
|
|
|
class SS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TA,
|
|
|
|
Requires<[HasSSSE3]>;
|
2008-02-12 22:51:28 +00:00
|
|
|
|
|
|
|
// SSE4.1 Instruction Templates:
|
|
|
|
//
|
|
|
|
// SS48I - SSE 4.1 instructions with T8 prefix.
|
2008-03-14 07:39:27 +00:00
|
|
|
// SS41AIi8 - SSE 4.1 instructions with TA prefix and ImmT == Imm8.
|
2008-02-12 22:51:28 +00:00
|
|
|
//
|
|
|
|
class SS48I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8,
|
|
|
|
Requires<[HasSSE41]>;
|
2008-03-14 07:39:27 +00:00
|
|
|
class SS4AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
2008-02-12 22:51:28 +00:00
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TA,
|
|
|
|
Requires<[HasSSE41]>;
|
2008-02-12 22:51:28 +00:00
|
|
|
|
2008-07-17 16:51:19 +00: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,
|
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8,
|
|
|
|
Requires<[HasSSE42]>;
|
2008-02-12 22:51:28 +00:00
|
|
|
|
2009-08-08 21:55:08 +00:00
|
|
|
// SS42FI - SSE 4.2 instructions with TF prefix.
|
|
|
|
class SS42FI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: I<o, F, outs, ins, asm, pattern>, TF, Requires<[HasSSE42]>;
|
|
|
|
|
2009-08-18 22:50:32 +00:00
|
|
|
// SS42AI = SSE 4.2 instructions with TA prefix
|
|
|
|
class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
list<dag> pattern>
|
2010-03-25 17:25:00 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TA,
|
|
|
|
Requires<[HasSSE42]>;
|
2009-08-18 22:50:32 +00:00
|
|
|
|
2010-07-20 00:11:13 +00:00
|
|
|
// AVX Instruction Templates:
|
|
|
|
// Instructions introduced in AVX (no SSE equivalent forms)
|
|
|
|
//
|
|
|
|
// AVX8I - AVX instructions with T8 and OpSize prefix.
|
2010-07-20 19:44:51 +00:00
|
|
|
// AVXAIi8 - AVX instructions with TA, OpSize prefix and ImmT = Imm8.
|
2010-07-20 00:11:13 +00:00
|
|
|
class AVX8I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8, OpSize,
|
|
|
|
Requires<[HasAVX]>;
|
2010-07-20 19:44:51 +00:00
|
|
|
class AVXAIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TA, OpSize,
|
|
|
|
Requires<[HasAVX]>;
|
2010-07-20 00:11:13 +00:00
|
|
|
|
2010-04-02 21:54:27 +00:00
|
|
|
// AES Instruction Templates:
|
|
|
|
//
|
|
|
|
// AES8I
|
2010-04-05 21:14:32 +00:00
|
|
|
// These use the same encoding as the SSE4.2 T8 and TA encodings.
|
2010-04-02 21:54:27 +00:00
|
|
|
class AES8I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag>pattern>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8,
|
|
|
|
Requires<[HasAES]>;
|
|
|
|
|
|
|
|
class AESAI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TA,
|
|
|
|
Requires<[HasAES]>;
|
|
|
|
|
2010-07-23 18:41:12 +00:00
|
|
|
// CLMUL Instruction Templates
|
|
|
|
class CLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag>pattern>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TA,
|
|
|
|
OpSize, VEX_4V, Requires<[HasAVX, HasCLMUL]>;
|
|
|
|
|
2010-07-23 00:54:35 +00:00
|
|
|
// FMA3 Instruction Templates
|
|
|
|
class FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag>pattern>
|
|
|
|
: I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8,
|
|
|
|
OpSize, VEX_4V, Requires<[HasFMA3]>;
|
|
|
|
|
2007-07-31 08:04:03 +00:00
|
|
|
// X86-64 Instruction templates...
|
|
|
|
//
|
|
|
|
|
|
|
|
class RI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern>
|
|
|
|
: I<o, F, outs, ins, asm, pattern>, REX_W;
|
|
|
|
class RIi8 <bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: Ii8<o, F, outs, ins, asm, pattern>, REX_W;
|
|
|
|
class RIi32 <bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: Ii32<o, F, outs, ins, asm, pattern>, REX_W;
|
|
|
|
|
|
|
|
class RIi64<bits<8> o, Format f, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: X86Inst<o, f, Imm64, outs, ins, asm>, REX_W {
|
|
|
|
let Pattern = pattern;
|
|
|
|
let CodeSize = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
class RSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: SSI<o, F, outs, ins, asm, pattern>, REX_W;
|
|
|
|
class RSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: SDI<o, F, outs, ins, asm, pattern>, REX_W;
|
|
|
|
class RPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
|
|
|
: PDI<o, F, outs, ins, asm, pattern>, REX_W;
|
|
|
|
|
|
|
|
// MMX Instruction templates
|
|
|
|
//
|
|
|
|
|
|
|
|
// MMXI - MMX instructions with TB prefix.
|
2008-08-23 15:53:19 +00:00
|
|
|
// MMXI64 - MMX instructions with TB prefix valid only in 64 bit mode.
|
2007-07-31 08:04:03 +00: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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class MMXI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2007-07-31 08:04:03 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern>, 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class MMXI64<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2008-08-23 15:53:19 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern>, 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class MMXRI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2007-07-31 08:04:03 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern>, 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class MMX2I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2007-07-31 08:04:03 +00:00
|
|
|
: I<o, F, outs, ins, asm, pattern>, 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class MMXIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2007-07-31 08:04:03 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern>, 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class MMXID<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2007-07-31 08:04:03 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern>, 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 00:01:26 +00:00
|
|
|
class MMXIS<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
|
|
list<dag> pattern>
|
2007-07-31 08:04:03 +00:00
|
|
|
: Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[HasMMX]>;
|