brintos

brintos / llvm-project-archived public Read only

0
0
Text · 596 B · c058332 Raw
17 lines · plain
1# REQUIRES: mips2# Check setup of GP relative offsets in a function's prologue.3 4# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t.o5# RUN: echo "SECTIONS { foo = 0x2000; _gp = 0x3000; }" > %t.script6# RUN: ld.lld %t.o --script %t.script -shared -o %t.so7# RUN: llvm-objdump -d -t --print-imm-hex --no-show-raw-insn %t.so | FileCheck %s8 9# CHECK:      {{.*}}  lui     $gp, 0x010# CHECK-NEXT: {{.*}}  daddu   $gp, $gp, $2511# CHECK-NEXT: {{.*}}  daddiu  $gp, $gp, 0x100012 13  .text14  lui     $gp,%hi(%neg(%gp_rel(foo)))15  daddu   $gp,$gp,$t916  daddiu  $gp,$gp,%lo(%neg(%gp_rel(foo)))17