[llvm] r183687 - [PowerPC] Support extended sc mnemonic
Ulrich Weigand
ulrich.weigand at de.ibm.com
Mon Jun 10 10:19:43 PDT 2013
Author: uweigand
Date: Mon Jun 10 12:19:43 2013
New Revision: 183687
URL: http://llvm.org/viewvc/llvm-project?rev=183687&view=rev
Log:
[PowerPC] Support extended sc mnemonic
A plain "sc" without argument is supposed to be treated like "sc 0"
by the assembler. This patch adds a corresponding alias.
Problem reported by Joerg Sonnenberger.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
llvm/trunk/test/MC/PowerPC/ppc64-encoding.s
Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?rev=183687&r1=183686&r2=183687&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Mon Jun 10 12:19:43 2013
@@ -2154,6 +2154,8 @@ class PPCAsmPseudo<string asm, dag iops>
let isPseudo = 1;
}
+def : InstAlias<"sc", (SC 0)>;
+
def : InstAlias<"mr $rA, $rB", (OR8 g8rc:$rA, g8rc:$rB, g8rc:$rB)>;
def SLWI : PPCAsmPseudo<"slwi $rA, $rS, $n",
Modified: llvm/trunk/test/MC/PowerPC/ppc64-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/PowerPC/ppc64-encoding.s?rev=183687&r1=183686&r2=183687&view=diff
==============================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-encoding.s (original)
+++ llvm/trunk/test/MC/PowerPC/ppc64-encoding.s Mon Jun 10 12:19:43 2013
@@ -43,6 +43,8 @@
# CHECK: sc 1 # encoding: [0x44,0x00,0x00,0x22]
sc 1
+# CHECK: sc 0 # encoding: [0x44,0x00,0x00,0x02]
+ sc
# Fixed-point facility
More information about the llvm-commits
mailing list