From: Joerg Sonnenberger Date: Mon, 10 Aug 2015 23:47:22 +0000 (+0000) Subject: Add lduw and lwua aliases for SPARCv9. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ec605efeddb15d3fe743e9e1e8e76516399b6ad9;p=oota-llvm.git Add lduw and lwua aliases for SPARCv9. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244535 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Sparc/SparcInstrAliases.td b/lib/Target/Sparc/SparcInstrAliases.td index 41a6fca75a5..ee202311d35 100644 --- a/lib/Target/Sparc/SparcInstrAliases.td +++ b/lib/Target/Sparc/SparcInstrAliases.td @@ -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]>; diff --git a/test/MC/Sparc/sparcv9-instructions.s b/test/MC/Sparc/sparcv9-instructions.s index 6125469b8e8..f9877dd1107 100644 --- a/test/MC/Sparc/sparcv9-instructions.s +++ b/test/MC/Sparc/sparcv9-instructions.s @@ -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