1 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 \ 2 # RUN: 2>%t1 | FileCheck %s 3 # RUN: FileCheck -check-prefix=WARNINGS %s < %t1 4 # Check that the assembler can handle the documented syntax 5 # for ".set at" and set the correct value. The correct value for $at is always 6 # $1 when written by the user. 7 .text 8 foo: 9 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 10 # WARNINGS: :[[@LINE+2]]:11: warning: used $at without ".set noat" 11 .set at=$1 12 jr $at 13 14 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 15 # WARNINGS: :[[@LINE+2]]:11: warning: used $at without ".set noat" 16 .set at=$1 17 jr $1 18 19 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 20 # WARNINGS: :[[@LINE+2]]:11: warning: used $at without ".set noat" 21 .set at=$at 22 jr $at 23 24 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 25 # WARNINGS: :[[@LINE+2]]:11: warning: used $at without ".set noat" 26 .set at=$at 27 jr $1 28 # WARNINGS-NOT: warning: used $at without ".set noat" 29 30 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 31 .set at=$2 32 jr $at 33 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 34 .set at=$3 35 jr $at 36 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 37 .set noat 38 jr $at 39 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 40 .set at=$0 41 jr $at 42 43 # CHECK: jr $16 # encoding: [0x08,0x00,0x00,0x02] 44 # WARNINGS: :[[@LINE+2]]:11: warning: used $16 with ".set at=$16" 45 .set at=$16 46 jr $s0 47 48 # CHECK: jr $16 # encoding: [0x08,0x00,0x00,0x02] 49 # WARNINGS: :[[@LINE+2]]:11: warning: used $16 with ".set at=$16" 50 .set at=$16 51 jr $16 52 # WARNINGS-NOT: warning 53