summaryrefslogtreecommitdiffstats
path: root/test/MC/Mips/cpsetup.s
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2016-06-23 10:54:09 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2016-06-23 10:54:09 +0000
commit47c3c00ec301357d340dbc5f0b1e6f4c209c4e85 (patch)
treec1c24a47fdb813d178220feeab6d2bc9ce960b3e /test/MC/Mips/cpsetup.s
parentc412e39cb6d12120ece35675faf627615caa001d (diff)
[mips][ias] Integers are not registers.
Summary: When parseAnyRegister() encounters a symbol alias, it parses integers and adds a corresponding expression to the operand list. This is clearly wrong since the only operands that parseAnyRegister() should be accepting are registers. It's not clear why this code was added and there are no test cases that cover it. I think it might be leftover from when searchSymbolAlias() was more widely used. Reviewers: sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D21377 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Mips/cpsetup.s')
-rw-r--r--test/MC/Mips/cpsetup.s30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/MC/Mips/cpsetup.s b/test/MC/Mips/cpsetup.s
index f858b21ee872..155ed6beeb49 100644
--- a/test/MC/Mips/cpsetup.s
+++ b/test/MC/Mips/cpsetup.s
@@ -160,3 +160,33 @@ t5:
# ALL-NEXT: nop
+t1b:
+IMM_8 = 8
+ .cpsetup $25, IMM_8, __cerror
+ nop
+ .cpreturn
+ nop
+
+# ALL-LABEL: t1b:
+# ASM-NEXT: IMM_8 = 8
+
+# O32-NOT: __cerror
+
+# NXX-NEXT: sd $gp, 8($sp)
+# NXX-NEXT: lui $gp, 0
+# N32-NEXT: R_MIPS_HI16/R_MIPS_NONE/R_MIPS_NONE __gnu_local_gp
+# N64-NEXT: R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16 __cerror
+# NXX-NEXT: addiu $gp, $gp, 0
+# N32-NEXT: R_MIPS_LO16/R_MIPS_NONE/R_MIPS_NONE __gnu_local_gp
+# N64-NEXT: R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO16 __cerror
+# N64-NEXT: daddu $gp, $gp, $25
+
+# ASM-NEXT: .cpsetup $25, 8, __cerror
+
+# ALL-NEXT: nop
+
+# ASM-NEXT: .cpreturn
+# NXX-NEXT: ld $gp, 8($sp)
+
+# ALL-NEXT: nop
+