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 # WARNINGS-NOT: warning: Used $at without ".set noat" 19 20 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 21 .set at=$2 22 jr $at 23 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 24 .set at=$3 25 jr $at 26 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 27 .set noat 28 jr $at 29 # CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00] 30 .set at=$0 31 jr $at 32 33 # CHECK: jr $16 # encoding: [0x08,0x00,0x00,0x02] 34 # WARNINGS: :[[@LINE+2]]:11: warning: Used $16 with ".set at=$16" 35 .set at=$16 36 jr $s0 37 38 # CHECK: jr $16 # encoding: [0x08,0x00,0x00,0x02] 39 # WARNINGS: :[[@LINE+2]]:11: warning: Used $16 with ".set at=$16" 40 .set at=$16 41 jr $16 42 # WARNINGS-NOT: warning 43