1 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \ 2 # RUN: FileCheck %s 3 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \ 4 # RUN: FileCheck %s 5 # RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r2 | \ 6 # RUN: FileCheck %s 7 8 # Check that the IAS expands macro instructions in the same way as GAS 9 10 .extern sym 11 # imm and rs are deliberately swapped to test whitespace separated arguments. 12 .macro EX2 insn, rd, imm, rs 13 .ex\@: \insn \rd, \rs, \imm 14 .endm 15 16 .option pic0 17 18 EX2 addiu $2, 1 $3 # CHECK: addiu $2, $3, 1 19 EX2 addiu $2, ~1 $3 # CHECK: addiu $2, $3, -2 20 EX2 addiu $2, ~ 1 $3 # CHECK: addiu $2, $3, -2 21 EX2 addiu $2, 1+1 $3 # CHECK: addiu $2, $3, 2 22 EX2 addiu $2, 1+ 1 $3 # CHECK: addiu $2, $3, 2 23 EX2 addiu $2, 1 +1 $3 # CHECK: addiu $2, $3, 2 24 EX2 addiu $2, 1 + 1 $3 # CHECK: addiu $2, $3, 2 25 EX2 addiu $2, 1+~1 $3 # CHECK: addiu $2, $3, -1 26 EX2 addiu $2, 1+~ 1 $3 # CHECK: addiu $2, $3, -1 27 EX2 addiu $2, 1+ ~1 $3 # CHECK: addiu $2, $3, -1 28 EX2 addiu $2, 1 +~1 $3 # CHECK: addiu $2, $3, -1 29 EX2 addiu $2, 1 +~ 1 $3 # CHECK: addiu $2, $3, -1 30 EX2 addiu $2, 1 + ~1 $3 # CHECK: addiu $2, $3, -1 31 EX2 addiu $2, 1 + ~ 1 $3 # CHECK: addiu $2, $3, -1 32 EX2 addiu $2, 1+(1) $3 # CHECK: addiu $2, $3, 2 33 EX2 addiu $2, 1 +(1) $3 # CHECK: addiu $2, $3, 2 34 EX2 addiu $2, 1+ (1) $3 # CHECK: addiu $2, $3, 2 35 EX2 addiu $2, 1 + (1) $3 # CHECK: addiu $2, $3, 2 36 EX2 addiu $2, 1+(1)+1 $3 # CHECK: addiu $2, $3, 3 37 EX2 addiu $2, 1 +(1)+1 $3 # CHECK: addiu $2, $3, 3 38 EX2 addiu $2, 1+ (1)+1 $3 # CHECK: addiu $2, $3, 3 39 EX2 addiu $2, 1 + (1)+1 $3 # CHECK: addiu $2, $3, 3 40 nop # CHECK: nop 41