summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/Mips
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2018-05-29 09:51:22 +0000
committerSimon Atanasyan <simon@atanasyan.com>2018-05-29 09:51:22 +0000
commit3535cb11309938511cc23c26e348e3deba6f0d53 (patch)
treefa47b39419390baf0800eead38c9d7aa065c0423 /llvm/test/MC/Mips
parent0bd19ead89e40aab47d04f8e56e9affa6ed29916 (diff)
downloadbcm5719-llvm-3535cb11309938511cc23c26e348e3deba6f0d53.tar.gz
bcm5719-llvm-3535cb11309938511cc23c26e348e3deba6f0d53.zip
[mips] Stop parsing a .set assignment if the first argument is not an identifier
Before this fix the following code triggers two error messages. The second one is at least useless: test.s:1:9: error: expected identifier after .set .set 123, $a0 ^ test-set.s:1:9: error: unexpected token, expected comma .set 123, $a0 ^ llvm-svn: 333402
Diffstat (limited to 'llvm/test/MC/Mips')
-rw-r--r--llvm/test/MC/Mips/mips_directives_bad.s10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/mips_directives_bad.s b/llvm/test/MC/Mips/mips_directives_bad.s
index a4512b5ae12..494333dd687 100644
--- a/llvm/test/MC/Mips/mips_directives_bad.s
+++ b/llvm/test/MC/Mips/mips_directives_bad.s
@@ -57,3 +57,13 @@
# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement
# CHECK-NEXT: .option pic2 pic3
# CHECK-NEXT: ^
+
+ .set 123, $a0
+# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: expected identifier after .set
+# CHECK-NEXT: .set 123
+# CHECK-NEXT: ^
+
+ .set reg.
+# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected comma
+# CHECK-NEXT: .set reg.
+# CHECK-NEXT: ^
OpenPOWER on IntegriCloud