1# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding \ 2# RUN: -mcpu=mips32r2 -mattr=micromips | FileCheck %s 3# Check that the assembler can handle the expressions as operands. 4# CHECK: .text 5# CHECK: .globl foo 6# CHECK: foo: 7# CHECK: lw $4, %lo(foo)($4) # encoding: [0x84'A',0xfc'A',0x00,0x00] 8# CHECK: # fixup A - offset: 0, 9# CHECK: value: foo@ABS_LO, 10# CHECK: kind: fixup_MICROMIPS_LO16 11# CHECK: lw $4, 56($4) # encoding: [0x84,0xfc,0x38,0x00] 12# CHECK: lw $4, %lo(foo+8)($4) # encoding: [0x84'A',0xfc'A',0x08,0x00] 13# CHECK: # fixup A - offset: 0, 14# CHECK: value: foo@ABS_LO, 15# CHECK: kind: fixup_MICROMIPS_LO16 16# CHECK: lw $4, %lo(foo+8)($4) # encoding: [0x84'A',0xfc'A',0x08,0x00] 17# CHECK: # fixup A - offset: 0, 18# CHECK: value: foo@ABS_LO, 19# CHECK: kind: fixup_MICROMIPS_LO16 20# CHECK: lw $4, %lo(foo+8)($4) # encoding: [0x84'A',0xfc'A',0x08,0x00] 21# CHECK: # fixup A - offset: 0, 22# CHECK: value: foo@ABS_LO, 23# CHECK: kind: fixup_MICROMIPS_LO16 24# CHECK: .space 64 25 26 .globl foo 27 .ent foo 28foo: 29 lw $4,%lo(foo)($4) 30 lw $4,((10 + 4) * 4)($4) 31 lw $4,%lo (2 * 4) + foo($4) 32 lw $4,%lo((2 * 4) + foo)($4) 33 lw $4,(((%lo ((2 * 4) + foo))))($4) 34 .space 64 35 .end foo 36