xref: /aosp_15_r20/external/llvm/test/MC/Mips/sym-expr.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# Check parsing symbol expressions
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc -triple=mipsel -show-inst-operands %s 2> %t0
4*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s < %t0
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker    .global __start
7*9880d681SAndroid Build Coastguard Worker    .ent    __start
8*9880d681SAndroid Build Coastguard Worker__start:
9*9880d681SAndroid Build Coastguard Worker    nop
10*9880d681SAndroid Build Coastguard Workerloc:
11*9880d681SAndroid Build Coastguard Worker    jal     __start + 0x4       # CHECK: instruction: [jal, Imm<__start+4>]
12*9880d681SAndroid Build Coastguard Worker    jal     __start + (-0x10)   # CHECK: instruction: [jal, Imm<__start-16>]
13*9880d681SAndroid Build Coastguard Worker    jal     (__start + (-0x10)) # CHECK: instruction: [jal, Imm<__start-16>]
14*9880d681SAndroid Build Coastguard Worker    .end    __start
15