1 //===-- X86InstrVMX.td - TSX Instruction Set Extension -----*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file describes the instructions that make up the Intel TSX instruction
13 //===----------------------------------------------------------------------===//
15 //===----------------------------------------------------------------------===//
18 def X86xtest: SDNode<"X86ISD::XTEST", SDTypeProfile<1, 0, [SDTCisVT<0, i32>]>,
19 [SDNPHasChain, SDNPSideEffect]>;
21 let SchedRW = [WriteSystem] in {
23 let usesCustomInserter = 1 in
24 def XBEGIN : I<0, Pseudo, (outs GR32:$dst), (ins),
25 "# XBEGIN", [(set GR32:$dst, (int_x86_xbegin))]>,
28 let isBranch = 1, isTerminator = 1, Defs = [EAX] in {
29 def XBEGIN_2 : Ii16PCRel<0xc7, MRM_F8, (outs), (ins brtarget16:$dst),
30 "xbegin\t$dst", []>, OpSize16;
31 def XBEGIN_4 : Ii32PCRel<0xc7, MRM_F8, (outs), (ins brtarget32:$dst),
32 "xbegin\t$dst", []>, OpSize32;
35 // Psuedo instruction to fake the definition of EAX on the fallback code path.
36 let isPseudo = 1, Defs = [EAX] in {
37 def XABORT_DEF : I<0, Pseudo, (outs), (ins), "# XABORT DEF", []>;
40 def XEND : I<0x01, MRM_D5, (outs), (ins),
41 "xend", [(int_x86_xend)]>, TB, Requires<[HasRTM]>;
43 let Defs = [EFLAGS] in
44 def XTEST : I<0x01, MRM_D6, (outs), (ins),
45 "xtest", [(set EFLAGS, (X86xtest))]>, TB, Requires<[HasRTM]>;
47 def XABORT : Ii8<0xc6, MRM_F8, (outs), (ins i8imm:$imm),
49 [(int_x86_xabort imm:$imm)]>, Requires<[HasRTM]>;
53 let SchedRW = [WriteSystem] in {
55 let isAsmParserOnly = 1 in {
56 def XACQUIRE_PREFIX : I<0xF2, RawFrm, (outs), (ins), "xacquire", []>;
57 def XRELEASE_PREFIX : I<0xF3, RawFrm, (outs), (ins), "xrelease", []>;