1# RUN: llvm-mc -arch=mips -mcpu=mips32r2 %s -show-inst | FileCheck %s 2 3# Test that subu accepts constant operands and inverts them when 4# rendering the operand. 5 6 subu $4, $4, 4 # CHECK: ADDiu 7 # CHECK; Imm:-4 8 subu $gp, $gp, 4 # CHECK: ADDiu 9 # CHECK; Imm:-4 10 subu $sp, $sp, 4 # CHECK: ADDiu 11 # CHECK; Imm:-4 12 subu $4, $4, -4 # CHECK: ADDiu 13 # CHECK; Imm:4 14 subu $gp, $gp, -4 # CHECK: ADDiu 15 # CHECK; Imm:4 16 subu $sp, $sp, -4 # CHECK: ADDiu 17 # CHECK; Imm:4 18 subu $sp, $sp, -(4 + 4) # CHECK: ADDiu 19 # CHECK: Imm:8 20 21 subu $4, 8 # CHECK: ADDiu 22 # CHECK; Imm:-8 23 subu $gp, 8 # CHECK: ADDiu 24 # CHECK; Imm:-8 25 subu $sp, 8 # CHECK: ADDiu 26 # CHECK; Imm:-8 27 subu $4, -8 # CHECK: ADDiu 28 # CHECK; Imm:8 29 subu $gp, -8 # CHECK: ADDiu 30 # CHECK; Imm:8 31 subu $sp, -8 # CHECK: ADDiu 32 # CHECK; Imm:8 33 subu $sp, -(4 + 4) # CHECK: ADDiu 34 # CHECK: Imm:8 35 36