[llvm] r185350 - [PowerPC] Add "wait" instruction
Ulrich Weigand
ulrich.weigand at de.ibm.com
Mon Jul 1 10:21:23 PDT 2013
Author: uweigand
Date: Mon Jul 1 12:21:23 2013
New Revision: 185350
URL: http://llvm.org/viewvc/llvm-project?rev=185350&view=rev
Log:
[PowerPC] Add "wait" instruction
This adds the "wait" instruction and its extended mnemonics.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
llvm/trunk/test/MC/PowerPC/ppc64-encoding-bookII.s
Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?rev=185350&r1=185349&r2=185350&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Mon Jul 1 12:21:23 2013
@@ -2260,6 +2260,9 @@ def ICBI : XForm_1a<31, 982, (outs), (in
def EIEIO : XForm_24_eieio<31, 854, (outs), (ins),
"eieio", LdStLoad, []>;
+def WAIT : XForm_24_sync<31, 62, (outs), (ins i32imm:$L),
+ "wait $L", LdStLoad, []>;
+
//===----------------------------------------------------------------------===//
// PowerPC Assembler Instruction Aliases
//
@@ -2286,6 +2289,10 @@ def : InstAlias<"sync", (SYNC 0)>;
def : InstAlias<"lwsync", (SYNC 1)>;
def : InstAlias<"ptesync", (SYNC 2)>;
+def : InstAlias<"wait", (WAIT 0)>;
+def : InstAlias<"waitrsv", (WAIT 1)>;
+def : InstAlias<"waitimpl", (WAIT 2)>;
+
def : InstAlias<"xnop", (XORI R0, R0, 0)>;
def : InstAlias<"mr $rA, $rB", (OR8 g8rc:$rA, g8rc:$rB, g8rc:$rB)>;
Modified: llvm/trunk/test/MC/PowerPC/ppc64-encoding-bookII.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/PowerPC/ppc64-encoding-bookII.s?rev=185350&r1=185349&r2=185350&view=diff
==============================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-encoding-bookII.s (original)
+++ llvm/trunk/test/MC/PowerPC/ppc64-encoding-bookII.s Mon Jul 1 12:21:23 2013
@@ -39,7 +39,8 @@
sync 2
# CHECK: eieio # encoding: [0x7c,0x00,0x06,0xac]
eieio
-# FIXME: wait 2
+# CHECK: wait 2 # encoding: [0x7c,0x40,0x00,0x7c]
+ wait 2
# Extended mnemonics
@@ -61,7 +62,10 @@
# CHECK: sync 2 # encoding: [0x7c,0x40,0x04,0xac]
ptesync
-# FIXME: wait
-# FIXME: waitrsv
-# FIXME: waitimpl
+# CHECK: wait 0 # encoding: [0x7c,0x00,0x00,0x7c]
+ wait
+# CHECK: wait 1 # encoding: [0x7c,0x20,0x00,0x7c]
+ waitrsv
+# CHECK: wait 2 # encoding: [0x7c,0x40,0x00,0x7c]
+ waitimpl
More information about the llvm-commits
mailing list