From c39b18b306c7681cb155127096a56afbea24a08e Mon Sep 17 00:00:00 2001 From: Matheus Almeida Date: Wed, 18 Jun 2014 14:49:56 +0000 Subject: [mips] Fix expansion of memory operation if destination register is not a GPR. Summary: The assembler tries to reuse the destination register for memory operations whenever it can but it's not possible to do so if the destination register is not a GPR. Example: ldc1 $f0, sym should expand to: lui $at, %hi(sym) ldc1 $f0, %lo(sym)($at) It's entirely wrong to expand to: lui $f0, %hi(sym) ldc1 $f0, %lo(sym)($f0) Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D4173 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211169 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/Mips/mips-expansions.s | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/MC/Mips/mips-expansions.s b/test/MC/Mips/mips-expansions.s index 9925609ecd..f0a04a5a25 100644 --- a/test/MC/Mips/mips-expansions.s +++ b/test/MC/Mips/mips-expansions.s @@ -34,6 +34,11 @@ # CHECK: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] # CHECK: sw $10, 57920($1) # encoding: [0x40,0xe2,0x2a,0xac] +# CHECK: lui $1, %hi(symbol) +# CHECK: ldc1 $f0, %lo(symbol)($1) +# CHECK: lui $1, %hi(symbol) +# CHECK: sdc1 $f0, %lo(symbol)($1) + li $5,123 li $6,-2345 li $7,65538 @@ -51,3 +56,6 @@ lw $t2, 655483($a0) sw $t2, 123456($t1) + + ldc1 $f0, symbol + sdc1 $f0, symbol -- cgit v1.2.3