[llvm] r200965 - [Sparc] Add support for parsing synthetic instruction 'mov'.
Venkatraman Govindaraju
venkatra at cs.wisc.edu
Fri Feb 7 01:06:53 PST 2014
Author: venkatra
Date: Fri Feb 7 03:06:52 2014
New Revision: 200965
URL: http://llvm.org/viewvc/llvm-project?rev=200965&view=rev
Log:
[Sparc] Add support for parsing synthetic instruction 'mov'.
Modified:
llvm/trunk/lib/Target/Sparc/SparcInstrAliases.td
llvm/trunk/test/MC/Sparc/sparc-alu-instructions.s
Modified: llvm/trunk/lib/Target/Sparc/SparcInstrAliases.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrAliases.td?rev=200965&r1=200964&r2=200965&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcInstrAliases.td (original)
+++ llvm/trunk/lib/Target/Sparc/SparcInstrAliases.td Fri Feb 7 03:06:52 2014
@@ -134,3 +134,9 @@ def : InstAlias<"retl", (RETL 8)>;
// ret -> RET 8
def : InstAlias<"ret", (RET 8)>;
+
+// mov reg, rd -> or %g0, reg, rd
+def : InstAlias<"mov $rs2, $rd", (ORrr IntRegs:$rd, G0, IntRegs:$rs2)>;
+
+// mov simm13, rd -> or %g0, simm13, rd
+def : InstAlias<"mov $simm13, $rd", (ORri IntRegs:$rd, G0, i32imm:$simm13)>;
Modified: llvm/trunk/test/MC/Sparc/sparc-alu-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Sparc/sparc-alu-instructions.s?rev=200965&r1=200964&r2=200965&view=diff
==============================================================================
--- llvm/trunk/test/MC/Sparc/sparc-alu-instructions.s (original)
+++ llvm/trunk/test/MC/Sparc/sparc-alu-instructions.s Fri Feb 7 03:06:52 2014
@@ -70,3 +70,8 @@
! CHECK: subxcc %g1, %g2, %g3 ! encoding: [0x86,0xe0,0x40,0x02]
subxcc %g1, %g2, %g3
+ ! CHECK: or %g0, %g1, %g3 ! encoding: [0x86,0x10,0x00,0x01]
+ mov %g1, %g3
+
+ ! CHECK: or %g0, 255, %g3 ! encoding: [0x86,0x10,0x20,0xff]
+ mov 0xff, %g3
More information about the llvm-commits
mailing list