Define the x86 pause instruction.

llvm-svn: 104204
This commit is contained in:
Dan Gohman 2010-05-20 01:35:50 +00:00
parent a3b7570a3a
commit 1e19eab963
3 changed files with 13 additions and 0 deletions

View File

@ -2417,6 +2417,10 @@ def LFENCE : I<0xAE, MRM_E8, (outs), (ins),
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)>;

View File

@ -2482,6 +2482,12 @@
// CHECK: clflush 305419896
clflush 0x12345678
// CHECK: pause
pause
// CHECK: sfence
sfence
// CHECK: lfence
lfence

View File

@ -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]