[mips] [IAS] Add partial support for the ULHU pseudo-instruction.
[oota-llvm.git] / test / MC / Mips / mips-expansions-bad.s
1 # RUN: not llvm-mc %s -arch=mips -mcpu=mips32r2 2>%t1
2 # RUN: FileCheck %s < %t1 --check-prefix=32-BIT
3 # RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 2>&1 | \
4 # RUN:   FileCheck %s --check-prefix=64-BIT --check-prefix=N32-ONLY
5 # RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 2>&1 | \
6 # RUN:   FileCheck %s --check-prefix=64-BIT --check-prefix=N64-ONLY
7
8   .text
9   li $5, 0x100000000
10   # 32-BIT: :[[@LINE-1]]:3: error: instruction requires a 32-bit immediate
11   # 64-BIT: :[[@LINE-2]]:3: error: instruction requires a 32-bit immediate
12   la $5, 0x100000000
13   # 32-BIT: :[[@LINE-1]]:3: error: instruction requires a 32-bit immediate
14   # 64-BIT: :[[@LINE-2]]:3: error: instruction requires a 32-bit immediate
15   la $5, 0x100000000($6)
16   # 32-BIT: :[[@LINE-1]]:3: error: instruction requires a 32-bit immediate
17   # 64-BIT: :[[@LINE-2]]:3: error: instruction requires a 32-bit immediate
18   la $5, symbol
19   # N64-ONLY: :[[@LINE-1]]:3: warning: instruction loads the 32-bit address of a 64-bit symbol
20   # N32-ONLY-NOT: :[[@LINE-2]]:3: warning: instruction loads the 32-bit address of a 64-bit symbol
21   dli $5, 1
22   # 32-BIT: :[[@LINE-1]]:3: error: instruction requires a 64-bit architecture
23   bne $2, 0x100010001, 1332
24   # 32-BIT: :[[@LINE-1]]:3: error: instruction requires a 32-bit immediate
25   beq $2, 0x100010001, 1332
26   # 32-BIT: :[[@LINE-1]]:3: error: instruction requires a 32-bit immediate
27   .set mips32r6
28   ulhu $5, 0
29   # 32-BIT: :[[@LINE-1]]:3: error: instruction not supported on mips32r6 or mips64r6
30   # 64-BIT: :[[@LINE-2]]:3: error: instruction not supported on mips32r6 or mips64r6
31   .set mips32
32   ulhu $5, 1
33   # 32-BIT-NOT: :[[@LINE-1]]:3: error: instruction not supported on mips32r6 or mips64r6
34   # 64-BIT-NOT: :[[@LINE-2]]:3: error: instruction not supported on mips32r6 or mips64r6
35   .set mips64r6
36   ulhu $5, 2
37   # 32-BIT: :[[@LINE-1]]:3: error: instruction not supported on mips32r6 or mips64r6
38   # 64-BIT: :[[@LINE-2]]:3: error: instruction not supported on mips32r6 or mips64r6