Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: lib/Target/X86/X86InstrInfo.td

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Target/X86/X86InstrInfo.cpp ('k') | lib/Target/X86/X86InstrNaCl.td » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- X86InstrInfo.td - Main X86 Instruction Definition --*- tablegen -*-===// 1 //===-- X86InstrInfo.td - Main X86 Instruction Definition --*- tablegen -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file describes the X86 instruction set, defining the instructions, and 10 // This file describes the X86 instruction set, defining the instructions, and
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 def SDTX86Void : SDTypeProfile<0, 0, []>; 96 def SDTX86Void : SDTypeProfile<0, 0, []>;
97 97
98 def SDTX86Wrapper : SDTypeProfile<1, 1, [SDTCisSameAs<0, 1>, SDTCisPtrTy<0>]>; 98 def SDTX86Wrapper : SDTypeProfile<1, 1, [SDTCisSameAs<0, 1>, SDTCisPtrTy<0>]>;
99 99
100 def SDT_X86TLSADDR : SDTypeProfile<0, 1, [SDTCisInt<0>]>; 100 def SDT_X86TLSADDR : SDTypeProfile<0, 1, [SDTCisInt<0>]>;
101 101
102 def SDT_X86TLSBASEADDR : SDTypeProfile<0, 1, [SDTCisInt<0>]>; 102 def SDT_X86TLSBASEADDR : SDTypeProfile<0, 1, [SDTCisInt<0>]>;
103 103
104 def SDT_X86TLSCALL : SDTypeProfile<0, 1, [SDTCisInt<0>]>; 104 def SDT_X86TLSCALL : SDTypeProfile<0, 1, [SDTCisInt<0>]>;
105 105
106 // @LOCALMOD-BEGIN
107 def SDT_X86ThreadPointer : SDTypeProfile<1, 0, [SDTCisPtrTy<0>]>;
108 // @LOCALMOD-END
109
106 def SDT_X86SEG_ALLOCA : SDTypeProfile<1, 1, [SDTCisVT<0, iPTR>, SDTCisVT<1, iPTR >]>; 110 def SDT_X86SEG_ALLOCA : SDTypeProfile<1, 1, [SDTCisVT<0, iPTR>, SDTCisVT<1, iPTR >]>;
107 111
108 def SDT_X86WIN_FTOL : SDTypeProfile<0, 1, [SDTCisFP<0>]>; 112 def SDT_X86WIN_FTOL : SDTypeProfile<0, 1, [SDTCisFP<0>]>;
109 113
110 def SDT_X86EHRET : SDTypeProfile<0, 1, [SDTCisInt<0>]>; 114 def SDT_X86EHRET : SDTypeProfile<0, 1, [SDTCisInt<0>]>;
111 115
112 def SDT_X86TCRET : SDTypeProfile<0, 2, [SDTCisPtrTy<0>, SDTCisVT<1, i32>]>; 116 def SDT_X86TCRET : SDTypeProfile<0, 2, [SDTCisPtrTy<0>, SDTCisVT<1, i32>]>;
113 117
114 def SDT_X86MEMBARRIER : SDTypeProfile<0, 0, []>; 118 def SDT_X86MEMBARRIER : SDTypeProfile<0, 0, []>;
115 119
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 196
193 def X86Wrapper : SDNode<"X86ISD::Wrapper", SDTX86Wrapper>; 197 def X86Wrapper : SDNode<"X86ISD::Wrapper", SDTX86Wrapper>;
194 def X86WrapperRIP : SDNode<"X86ISD::WrapperRIP", SDTX86Wrapper>; 198 def X86WrapperRIP : SDNode<"X86ISD::WrapperRIP", SDTX86Wrapper>;
195 199
196 def X86tlsaddr : SDNode<"X86ISD::TLSADDR", SDT_X86TLSADDR, 200 def X86tlsaddr : SDNode<"X86ISD::TLSADDR", SDT_X86TLSADDR,
197 [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>; 201 [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
198 202
199 def X86tlsbaseaddr : SDNode<"X86ISD::TLSBASEADDR", SDT_X86TLSBASEADDR, 203 def X86tlsbaseaddr : SDNode<"X86ISD::TLSBASEADDR", SDT_X86TLSBASEADDR,
200 [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>; 204 [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
201 205
206 // @LOCALMOD-BEGIN
207 def X86tlsaddr_le : SDNode<"X86ISD::TLSADDR_LE", SDT_X86TLSADDR,
208 [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
209
210 def X86tlsaddr_ie : SDNode<"X86ISD::TLSADDR_IE", SDT_X86TLSADDR,
211 [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
212
213 def X86thread_pointer_from_gs :
214 SDNode<"X86ISD::THREAD_POINTER_FROM_GS", SDT_X86ThreadPointer>;
215 // @LOCALMOD-END
216
202 def X86ehret : SDNode<"X86ISD::EH_RETURN", SDT_X86EHRET, 217 def X86ehret : SDNode<"X86ISD::EH_RETURN", SDT_X86EHRET,
203 [SDNPHasChain]>; 218 [SDNPHasChain]>;
204 219
205 def X86eh_sjlj_setjmp : SDNode<"X86ISD::EH_SJLJ_SETJMP", 220 def X86eh_sjlj_setjmp : SDNode<"X86ISD::EH_SJLJ_SETJMP",
206 SDTypeProfile<1, 1, [SDTCisInt<0>, 221 SDTypeProfile<1, 1, [SDTCisInt<0>,
207 SDTCisPtrTy<1>]>, 222 SDTCisPtrTy<1>]>,
208 [SDNPHasChain, SDNPSideEffect]>; 223 [SDNPHasChain, SDNPSideEffect]>;
209 def X86eh_sjlj_longjmp : SDNode<"X86ISD::EH_SJLJ_LONGJMP", 224 def X86eh_sjlj_longjmp : SDNode<"X86ISD::EH_SJLJ_LONGJMP",
210 SDTypeProfile<0, 1, [SDTCisPtrTy<0>]>, 225 SDTypeProfile<0, 1, [SDTCisPtrTy<0>]>,
211 [SDNPHasChain, SDNPSideEffect]>; 226 [SDNPHasChain, SDNPSideEffect]>;
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 def IsLP64 : Predicate<"Subtarget->isTarget64BitLP64()">; 766 def IsLP64 : Predicate<"Subtarget->isTarget64BitLP64()">;
752 def NotLP64 : Predicate<"!Subtarget->isTarget64BitLP64()">; 767 def NotLP64 : Predicate<"!Subtarget->isTarget64BitLP64()">;
753 def In16BitMode : Predicate<"Subtarget->is16Bit()">, 768 def In16BitMode : Predicate<"Subtarget->is16Bit()">,
754 AssemblerPredicate<"Mode16Bit", "16-bit mode">; 769 AssemblerPredicate<"Mode16Bit", "16-bit mode">;
755 def Not16BitMode : Predicate<"!Subtarget->is16Bit()">, 770 def Not16BitMode : Predicate<"!Subtarget->is16Bit()">,
756 AssemblerPredicate<"!Mode16Bit", "Not 16-bit mode"> ; 771 AssemblerPredicate<"!Mode16Bit", "Not 16-bit mode"> ;
757 def In32BitMode : Predicate<"Subtarget->is32Bit()">, 772 def In32BitMode : Predicate<"Subtarget->is32Bit()">,
758 AssemblerPredicate<"Mode32Bit", "32-bit mode">; 773 AssemblerPredicate<"Mode32Bit", "32-bit mode">;
759 def IsWin64 : Predicate<"Subtarget->isTargetWin64()">; 774 def IsWin64 : Predicate<"Subtarget->isTargetWin64()">;
760 def IsNaCl : Predicate<"Subtarget->isTargetNaCl()">; 775 def IsNaCl : Predicate<"Subtarget->isTargetNaCl()">;
761 def NotNaCl : Predicate<"!Subtarget->isTargetNaCl()">; 776 def IsNotNaCl : Predicate<"!Subtarget->isTargetNaCl()">;
762 def SmallCode : Predicate<"TM.getCodeModel() == CodeModel::Small">; 777 def SmallCode : Predicate<"TM.getCodeModel() == CodeModel::Small">;
763 def KernelCode : Predicate<"TM.getCodeModel() == CodeModel::Kernel">; 778 def KernelCode : Predicate<"TM.getCodeModel() == CodeModel::Kernel">;
764 def FarData : Predicate<"TM.getCodeModel() != CodeModel::Small &&" 779 def FarData : Predicate<"TM.getCodeModel() != CodeModel::Small &&"
765 "TM.getCodeModel() != CodeModel::Kernel">; 780 "TM.getCodeModel() != CodeModel::Kernel">;
766 def NearData : Predicate<"TM.getCodeModel() == CodeModel::Small ||" 781 def NearData : Predicate<"TM.getCodeModel() == CodeModel::Small ||"
767 "TM.getCodeModel() == CodeModel::Kernel">; 782 "TM.getCodeModel() == CodeModel::Kernel">;
768 def IsStatic : Predicate<"TM.getRelocationModel() == Reloc::Static">; 783 def IsStatic : Predicate<"TM.getRelocationModel() == Reloc::Static">;
769 def IsNotPIC : Predicate<"TM.getRelocationModel() != Reloc::PIC_">; 784 def IsNotPIC : Predicate<"TM.getRelocationModel() != Reloc::PIC_">;
770 def OptForSize : Predicate<"OptForSize">; 785 def OptForSize : Predicate<"OptForSize">;
771 def OptForSpeed : Predicate<"!OptForSize">; 786 def OptForSpeed : Predicate<"!OptForSize">;
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 (TZMSK32rr GR32:$src)>; 2373 (TZMSK32rr GR32:$src)>;
2359 def : Pat<(and (not GR64:$src), (add GR64:$src, -1)), 2374 def : Pat<(and (not GR64:$src), (add GR64:$src, -1)),
2360 (TZMSK64rr GR64:$src)>; 2375 (TZMSK64rr GR64:$src)>;
2361 } // HasTBM 2376 } // HasTBM
2362 2377
2363 //===----------------------------------------------------------------------===// 2378 //===----------------------------------------------------------------------===//
2364 // Subsystems. 2379 // Subsystems.
2365 //===----------------------------------------------------------------------===// 2380 //===----------------------------------------------------------------------===//
2366 2381
2367 include "X86InstrArithmetic.td" 2382 include "X86InstrArithmetic.td"
2383
2384 //===----------------------------------------------------------------------===//
2385 // NaCl support (@LOCALMOD)
2386 //===----------------------------------------------------------------------===//
2387
2388 include "X86InstrNaCl.td"
2368 include "X86InstrCMovSetCC.td" 2389 include "X86InstrCMovSetCC.td"
2369 include "X86InstrExtension.td" 2390 include "X86InstrExtension.td"
2370 include "X86InstrControl.td" 2391 include "X86InstrControl.td"
2371 include "X86InstrShiftRotate.td" 2392 include "X86InstrShiftRotate.td"
2372 2393
2373 // X87 Floating Point Stack. 2394 // X87 Floating Point Stack.
2374 include "X86InstrFPStack.td" 2395 include "X86InstrFPStack.td"
2375 2396
2376 // SIMD support (SSE, MMX and AVX) 2397 // SIMD support (SSE, MMX and AVX)
2377 include "X86InstrFragmentsSIMD.td" 2398 include "X86InstrFragmentsSIMD.td"
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
2851 def : InstAlias<"xchg{q}\t{$mem, $val|$val, $mem}", 2872 def : InstAlias<"xchg{q}\t{$mem, $val|$val, $mem}",
2852 (XCHG64rm GR64:$val, i64mem:$mem), 0>; 2873 (XCHG64rm GR64:$val, i64mem:$mem), 0>;
2853 2874
2854 // xchg: We accept "xchgX <reg>, %eax" and "xchgX %eax, <reg>" as synonyms. 2875 // xchg: We accept "xchgX <reg>, %eax" and "xchgX %eax, <reg>" as synonyms.
2855 def : InstAlias<"xchg{w}\t{%ax, $src|$src, ax}", (XCHG16ar GR16:$src), 0>; 2876 def : InstAlias<"xchg{w}\t{%ax, $src|$src, ax}", (XCHG16ar GR16:$src), 0>;
2856 def : InstAlias<"xchg{l}\t{%eax, $src|$src, eax}", 2877 def : InstAlias<"xchg{l}\t{%eax, $src|$src, eax}",
2857 (XCHG32ar GR32:$src), 0>, Requires<[Not64BitMode]>; 2878 (XCHG32ar GR32:$src), 0>, Requires<[Not64BitMode]>;
2858 def : InstAlias<"xchg{l}\t{%eax, $src|$src, eax}", 2879 def : InstAlias<"xchg{l}\t{%eax, $src|$src, eax}",
2859 (XCHG32ar64 GR32_NOAX:$src), 0>, Requires<[In64BitMode]>; 2880 (XCHG32ar64 GR32_NOAX:$src), 0>, Requires<[In64BitMode]>;
2860 def : InstAlias<"xchg{q}\t{%rax, $src|$src, rax}", (XCHG64ar GR64:$src), 0>; 2881 def : InstAlias<"xchg{q}\t{%rax, $src|$src, rax}", (XCHG64ar GR64:$src), 0>;
OLDNEW
« no previous file with comments | « lib/Target/X86/X86InstrInfo.cpp ('k') | lib/Target/X86/X86InstrNaCl.td » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698