1# Check that llvm-mc accepts arithmetic expression
2# as an argument of the %got relocation.
3
4# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s \
5# RUN:   | llvm-objdump -d -r - | FileCheck %s
6
7  .text
8foo:
9  lw      $t0,%got($loc+0x10004)($gp)
10# CHECK: 0:       8f 88 00 01     lw      $8, 1($gp)
11# CHECK:                  00000000:  R_MIPS_GOT16 .data
12  addi    $t0,$t0,%lo($loc+0x10004)
13# CHECK: 4:       21 08 00 04     addi    $8, $8, 4
14# CHECK:                  00000004:  R_MIPS_LO16  .data
15
16  .data
17$loc:
18  .word 0
19  .space 0x10000
20  .word 0
21