llvm.org GIT mirror llvm / 3527e5f
[mips] '.set at=$0' should be equivalent to '.set noat' Differential Revision: http://llvm-reviews.chandlerc.com/D3171 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204714 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Sanders 6 years ago
3 changed file(s) with 15 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
23512351 return false;
23522352 }
23532353
2354 if (AtRegNo < 1 || AtRegNo > 31) {
2354 if (AtRegNo < 0 || AtRegNo > 31) {
23552355 reportParseError("unexpected token in statement");
23562356 return false;
23572357 }
0 # RUN: not llvm-mc %s -triple=mips-unknown-linux 2>%t0 | FileCheck %s
11 # RUN: FileCheck -check-prefix=ERROR %s < %t0
2 # Check that using the assembler temporary when .set noat is in effect is an error.
23
3 # We start with $at enabled
4 # We start with the assembler temporary enabled
45 # CHECK-LABEL: test1:
56 # CHECK: lui $1, 1
67 # CHECK: addu $1, $1, $2
89 test1:
910 lw $2, 65536($2)
1011
11 # Check that using $at when .set noat is in effect is an error.
1212 # FIXME: It would be better if the error pointed at the mnemonic instead of the newline
13 # ERROR: mips-noat.s:[[@LINE+5]]:1: error: Pseudo instruction requires $at, which is not available
14 # ERROR-NOT: error
13 # ERROR: mips-noat.s:[[@LINE+4]]:1: error: Pseudo instruction requires $at, which is not available
1514 test2:
1615 .set noat
1716 lw $2, 65536($2)
2423 test3:
2524 .set at
2625 lw $2, 65536($2)
26
27 # FIXME: It would be better if the error pointed at the mnemonic instead of the newline
28 # ERROR: mips-noat.s:[[@LINE+4]]:1: error: Pseudo instruction requires $at, which is not available
29 test4:
30 .set at=$0
31 lw $2, 65536($2)
32
33 # ERROR-NOT: error
2525 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00]
2626 .set noat
2727 jr $at
28 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00]
29 .set at=$0
30 jr $at
2831
2932 # CHECK: jr $16 # encoding: [0x08,0x00,0x00,0x02]
3033 # WARNINGS: :[[@LINE+2]]:12: warning: Used $16 with ".set at=$16"