[llvm] r247940 - [SPARC] Add mulscc.

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 13:54:26 PDT 2015


Author: joerg
Date: Thu Sep 17 15:54:26 2015
New Revision: 247940

URL: http://llvm.org/viewvc/llvm-project?rev=247940&view=rev
Log:
[SPARC] Add mulscc.

Modified:
    llvm/trunk/lib/Target/Sparc/SparcInstrInfo.td
    llvm/trunk/test/MC/Sparc/sparc-alu-instructions.s

Modified: llvm/trunk/lib/Target/Sparc/SparcInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.td?rev=247940&r1=247939&r2=247940&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Sparc/SparcInstrInfo.td Thu Sep 17 15:54:26 2015
@@ -628,6 +628,10 @@ let Defs = [Y, ICC] in {
   defm SMULCC : F3_12np<"smulcc", 0b011011>;
 }
 
+let Defs = [Y, ICC], Uses = [Y, ICC] in {
+  defm MULSCC : F3_12np<"mulscc", 0b100100>;
+}
+
 // Section B.19 - Divide Instructions, p. 115
 let Uses = [Y], Defs = [Y] in {
   defm UDIV : F3_12np<"udiv", 0b001110>;

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=247940&r1=247939&r2=247940&view=diff
==============================================================================
--- llvm/trunk/test/MC/Sparc/sparc-alu-instructions.s (original)
+++ llvm/trunk/test/MC/Sparc/sparc-alu-instructions.s Thu Sep 17 15:54:26 2015
@@ -91,6 +91,12 @@
         ! CHECK:  smulcc %g2, %g1, %g3            ! encoding: [0x86,0xd8,0x80,0x01]
         smulcc %g2, %g1, %g3
 
+        ! CHECK:  mulscc %g2, %g1, %g3            ! encoding: [0x87,0x20,0x80,0x01]
+        mulscc %g2, %g1, %g3
+
+        ! CHECK:  mulscc %g2, 254, %g3            ! encoding: [0x87,0x20,0xa0,0xfe]
+        mulscc %g2, 254, %g3
+
         ! CHECK:  udivcc %g2, %g1, %g3            ! encoding: [0x86,0xf0,0x80,0x01]
         udivcc %g2, %g1, %g3
 




More information about the llvm-commits mailing list