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