[llvm] r244535 - Add lduw and lwua aliases for SPARCv9.

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 16:47:22 PDT 2015


Author: joerg
Date: Mon Aug 10 18:47:22 2015
New Revision: 244535

URL: http://llvm.org/viewvc/llvm-project?rev=244535&view=rev
Log:
Add lduw and lwua aliases for SPARCv9.

Modified:
    llvm/trunk/lib/Target/Sparc/SparcInstrAliases.td
    llvm/trunk/test/MC/Sparc/sparcv9-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=244535&r1=244534&r2=244535&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcInstrAliases.td (original)
+++ llvm/trunk/lib/Target/Sparc/SparcInstrAliases.td Mon Aug 10 18:47:22 2015
@@ -429,6 +429,9 @@ def : InstAlias<"wr $simm13, %tbr", (WRT
 def : InstAlias<"flush", (FLUSH), 0>;
 
 
+def : MnemonicAlias<"lduw", "ld">, Requires<[HasV9]>;
+def : MnemonicAlias<"lduwa", "lda">, Requires<[HasV9]>;
+
 def : MnemonicAlias<"return", "rett">, Requires<[HasV9]>;
 
 def : MnemonicAlias<"addc", "addx">, Requires<[HasV9]>;

Modified: llvm/trunk/test/MC/Sparc/sparcv9-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Sparc/sparcv9-instructions.s?rev=244535&r1=244534&r2=244535&view=diff
==============================================================================
--- llvm/trunk/test/MC/Sparc/sparcv9-instructions.s (original)
+++ llvm/trunk/test/MC/Sparc/sparcv9-instructions.s Mon Aug 10 18:47:22 2015
@@ -35,3 +35,20 @@
         ! V8-NEXT: signx %g1
         ! V9: sra %g1, %g0, %g1               ! encoding: [0x83,0x38,0x40,0x00]
         signx %g1
+
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: lduw [%i0 + %l6], %o2
+        ! V9: ld [%i0+%l6], %o2    ! encoding: [0xd4,0x06,0x00,0x16]
+        lduw [%i0 + %l6], %o2
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: lduw [%i0 + 32], %o2
+        ! V9: ld [%i0+32], %o2     ! encoding: [0xd4,0x06,0x20,0x20]
+        lduw [%i0 + 32], %o2
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: lduw [%g1], %o2
+        ! V9: ld [%g1], %o2        ! encoding: [0xd4,0x00,0x40,0x00]
+        lduw [%g1], %o2
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: lduwa [%i0 + %l6] 131, %o2
+        ! V9: lda [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
+        lduwa [%i0 + %l6] 131, %o2




More information about the llvm-commits mailing list