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