forked from OSchip/llvm-project
45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
# REQUIRES: mips
|
|
|
|
# Check handling multiple HI16 relocation followed by a single LO16 relocation.
|
|
#
|
|
# RUN: llvm-mc -triple=mipsel -filetype=obj -o=%t-obj %s
|
|
# RUN: lld -flavor gnu -target mipsel -e glob1 -o %t-exe %t-obj
|
|
# RUN: llvm-objdump -t -disassemble %t-exe | FileCheck %s
|
|
|
|
# CHECK: Disassembly of section .text:
|
|
# CHECK: glob1:
|
|
# CHECK-NEXT: {{[0-9a-f]+}}: 40 00 08 3c lui $8, 64
|
|
# CHECK-NEXT: {{[0-9a-f]+}}: 40 00 08 3c lui $8, 64
|
|
# CHECK-NEXT: {{[0-9a-f]+}}: 40 00 08 3c lui $8, 64
|
|
# CHECK-NEXT: {{[0-9a-f]+}}: 40 00 08 3c lui $8, 64
|
|
# CHECK-NEXT: {{[0-9a-f]+}}: 42 00 08 3c lui $8, 66
|
|
# CHECK-NEXT: {{[0-9a-f]+}}: 3e 00 08 3c lui $8, 62
|
|
# CHECK-NEXT: {{[0-9a-f]+}}: 40 02 08 3c lui $8, 576
|
|
# CHECK-NEXT: {{[0-9a-f]+}}: 40 fe 08 3c lui $8, 65088
|
|
# CHECK-NEXT: {{[0-9a-f]+}}: 65 01 08 85 lh $8, 357($8)
|
|
|
|
# CHECK: SYMBOL TABLE:
|
|
# CHECK: {{[0-9a-f]+}} g F .text 00000024 glob1
|
|
# CHECK: {{[0-9a-f]+}} g F .text 00000004 glob2
|
|
|
|
.global glob1
|
|
.ent glob1
|
|
glob1:
|
|
lui $t0,%hi(glob2+0x1)
|
|
lui $t0,%hi(glob2+(-0x1))
|
|
lui $t0,%hi(glob2+0x1ff)
|
|
lui $t0,%hi(glob2+(-0x1ff))
|
|
lui $t0,%hi(glob2+0x1ffff)
|
|
lui $t0,%hi(glob2+(-0x1ffff))
|
|
lui $t0,%hi(glob2+0x1ffffff)
|
|
lui $t0,%hi(glob2+(-0x1ffffff))
|
|
|
|
lh $t0,%lo(glob2+(-0x1ffffff))($t0)
|
|
.end glob1
|
|
|
|
.global glob2
|
|
.ent glob2
|
|
glob2:
|
|
nop
|
|
.end glob2
|