Add lduw and lwua aliases for SPARCv9.
authorJoerg Sonnenberger <joerg@bec.de>
Mon, 10 Aug 2015 23:47:22 +0000 (23:47 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Mon, 10 Aug 2015 23:47:22 +0000 (23:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244535 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcInstrAliases.td
test/MC/Sparc/sparcv9-instructions.s

index 41a6fca75a56ebc16474fbb280fc017f3d1b441f..ee202311d35697253127ec665293f74eebbe7b44 100644 (file)
@@ -429,6 +429,9 @@ def : InstAlias<"wr $simm13, %tbr", (WRTBRri G0, i32imm:$simm13), 0>;
 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]>;
index 6125469b8e8c1c2b53d189e9279313fef4624410..f9877dd11073390ecad5a87a314cc5cdeb38b7af 100644 (file)
         ! 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