1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 21:13:02 +02:00
llvm-mirror/test/MC/Mips/mips-abi-bad.s
Toma Tabacu 33566cf552 [mips] Add new error message and improve testing for parsing the .module directive.
Summary:
We used to silently ignore any empty .module's and we used to give an error saying that we found
an "unexpected token at start of statement" when the value of the option wasn't an identifier (e.g. if it was a number).

We now give an error saying that we "expected .module option identifier" in both of those cases.

I also fixed the other tests in mips-abi-bad.s, which all seemed to be broken.


Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7095

llvm-svn: 226905
2015-01-23 10:40:19 +00:00

31 lines
916 B
ArmAsm

# RUN: not llvm-mc -triple mips-unknown-unknown %s 2>&1 | FileCheck %s
# Error checking for malformed .module directives (and .set fp=...).
.module fp=3
# CHECK: :[[@LINE-1]]:17: error: unsupported value, expected 'xx', '32' or '64'
# CHECK-NEXT: .module fp=3
# CHECK-NEXT: ^
# FIXME: Add separate test for .set fp=xx/32/64.
.set fp=xx,6
# CHECK: :[[@LINE-1]]:15: error: unexpected token, expected end of statement
# CHECK-NEXT: .set fp=xx,6
# CHECK-NEXT: ^
.module
# CHECK: :[[@LINE-1]]:12: error: expected .module option identifier
# CHECK-NEXT: .module
# CHECK-NEXT: ^
.module 34
# CHECK: :[[@LINE-1]]:13: error: expected .module option identifier
# CHECK-NEXT: .module 34
# CHECK-NEXT: ^
.set mips16
.module fp=32
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code
# CHECK-NEXT: .module fp=32
# CHECK-NEXT: ^