2 # Check setup of GP relative offsets in a function's prologue.
4 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t.o
5 # RUN: echo "SECTIONS { foo = 0x2000; _gp = 0x3000; }" > %t.script
6 # RUN: ld.lld %t.o --script %t.script -shared -o %t.so
7 # RUN: llvm-objdump -d -t --print-imm-hex --no-show-raw-insn %t.so | FileCheck %s
9 # CHECK: {{.*}} lui $gp, 0x0
10 # CHECK-NEXT: {{.*}} daddu $gp, $gp, $25
11 # CHECK-NEXT: {{.*}} daddiu $gp, $gp, 0x1000
14 lui $gp
,%hi
(%neg(%gp_rel
(foo
)))
16 daddiu $gp
,$gp
,%lo
(%neg(%gp_rel
(foo
)))