[llvm-commits] [llvm] r104204 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/MC/AsmParser/X86/x86_32-bit_cat.s test/MC/AsmParser/X86/x86_32-new-encoder.s
Dan Gohman
gohman at apple.com
Wed May 19 18:35:51 PDT 2010
Author: djg
Date: Wed May 19 20:35:50 2010
New Revision: 104204
URL: http://llvm.org/viewvc/llvm-project?rev=104204&view=rev
Log:
Define the x86 pause instruction.
Modified:
llvm/trunk/lib/Target/X86/X86InstrSSE.td
llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s
llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s
Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=104204&r1=104203&r2=104204&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed May 19 20:35:50 2010
@@ -2417,6 +2417,10 @@
def MFENCE : I<0xAE, MRM_F0, (outs), (ins),
"mfence", [(int_x86_sse2_mfence)]>, TB, Requires<[HasSSE2]>;
+// Pause. This "instruction" is encoded as "rep; nop", so even though it
+// was introduced with SSE2, it's backward compabitle.
+def PAUSE : I<0x90, RawFrm, (outs), (ins), "pause", []>, REP;
+
//TODO: custom lower this so as to never even generate the noop
def : Pat<(membarrier (i8 imm), (i8 imm), (i8 imm), (i8 imm),
(i8 0)), (NOOP)>;
Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s?rev=104204&r1=104203&r2=104204&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Wed May 19 20:35:50 2010
@@ -2482,6 +2482,12 @@
// CHECK: clflush 305419896
clflush 0x12345678
+// CHECK: pause
+ pause
+
+// CHECK: sfence
+ sfence
+
// CHECK: lfence
lfence
Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s?rev=104204&r1=104203&r2=104204&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s Wed May 19 20:35:50 2010
@@ -1,5 +1,8 @@
// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
+ pause
+// CHECK: pause
+// CHECK: encoding: [0xf3,0x90]
sfence
// CHECK: sfence
// CHECK: encoding: [0x0f,0xae,0xf8]
More information about the llvm-commits
mailing list