[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / Mips / mips-noat.s
blob3a937c73eeb5a6393ab68a1627fa948f6a4b02d9
1 # RUN: not llvm-mc %s -triple=mips-unknown-linux 2>%t0 | FileCheck %s
2 # RUN: FileCheck -check-prefix=ERROR %s < %t0
3 # Check that using the assembler temporary when .set noat is in effect is an error.
5 # We start with the assembler temporary enabled
6 # CHECK-LABEL: test1:
7 # CHECK: lui $1, 1
8 # CHECK: addu $1, $1, $2
9 # CHECK: lw $2, 0($1)
10 # CHECK-LABEL: test2:
11 # CHECK: .set noat
12 test1:
13 lw $2, 65536($2)
15 test2:
16 .set noat
17 lw $2, 65536($2) # ERROR: mips-noat.s:[[@LINE]]:9: error: pseudo-instruction requires $at, which is not available
20 # Can we switch it back on successfully?
21 # CHECK-LABEL: test3:
22 # CHECK: lui $1, 1
23 # CHECK: addu $1, $1, $2
24 # CHECK: lw $2, 0($1)
25 # CHECK-LABEL: test4:
26 # CHECK: .set at=$0
27 test3:
28 .set at
29 lw $2, 65536($2)
31 test4:
32 .set at=$0
33 lw $2, 65536($2) # ERROR: mips-noat.s:[[@LINE]]:9: error: pseudo-instruction requires $at, which is not available