3 # Check calculation of AHL addendums for R_MICROMIPS_HI16 / R_MICROMIPS_LO16
4 # relocations for a regular symbol.
6 # RUN: llvm-mc -triple=mipsel -mattr=micromips -filetype=obj -o=%t-obj %s
7 # RUN: lld -flavor gnu -target mipsel -e glob1 -o %t-exe %t-obj
8 # RUN: llvm-objdump -t -d -mattr=micromips %t-exe | FileCheck %s
10 # CHECK: Disassembly of section .text:
12 # CHECK-NEXT: 400130: a8 41 40 00 lui $8, 64
13 # CHECK-NEXT: 400134: 08 3d 6a 01 lh $8, 362($8)
14 # CHECK-NEXT: 400138: a8 41 41 00 lui $8, 65
15 # CHECK-NEXT: 40013c: 08 3d 68 81 lh $8, -32408($8)
16 # CHECK-NEXT: 400140: a8 41 41 00 lui $8, 65
17 # CHECK-NEXT: 400144: 08 3d e9 81 lh $8, -32279($8)
18 # CHECK-NEXT: 400148: a8 41 42 00 lui $8, 66
19 # CHECK-NEXT: 40014c: 08 3d 69 81 lh $8, -32407($8)
20 # CHECK-NEXT: 400150: a8 41 40 40 lui $8, 16448
21 # CHECK-NEXT: 400154: 08 3d 69 01 lh $8, 361($8)
22 # CHECK-NEXT: 400158: a8 41 40 80 lui $8, 32832
23 # CHECK-NEXT: 40015c: 08 3d 69 01 lh $8, 361($8)
24 # CHECK-NEXT: 400160: a8 41 c1 80 lui $8, 32961
25 # CHECK-NEXT: 400164: 08 3d e9 81 lh $8, -32279($8)
28 # CHECK-NEXT: 400168: a8 41 40 00 lui $8, 64
29 # CHECK-NEXT: 40016c: a8 41 40 00 lui $8, 64
30 # CHECK-NEXT: 400170: a8 41 41 00 lui $8, 65
31 # CHECK-NEXT: 400174: a8 41 42 00 lui $8, 66
32 # CHECK-NEXT: 400178: a8 41 40 40 lui $8, 16448
33 # CHECK-NEXT: 40017c: a8 41 40 80 lui $8, 32832
34 # CHECK-NEXT: 400180: a8 41 c1 80 lui $8, 32961
35 # CHECK-NEXT: 400184: 08 3d b1 81 lh $8, -32335($8)
37 # CHECK: SYMBOL TABLE:
38 # CHECK: 00400130 g F .text 00000038 glob1
39 # CHECK: 00400168 g F .text 00000020 glob2
42 .type glob1, @function
46 lui $t0,%hi(glob2+0x00000001)
47 lh $t0,%lo(glob2+0x00000001)($t0)
49 lui $t0,%hi(glob2+0x00007fff)
50 lh $t0,%lo(glob2+0x00007fff)($t0)
52 lui $t0,%hi(glob2+0x00008080)
53 lh $t0,%lo(glob2+0x00008080)($t0)
55 lui $t0,%hi(glob2+0x00018000)
56 lh $t0,%lo(glob2+0x00018000)($t0)
58 lui $t0,%hi(glob2+0x40000000)
59 lh $t0,%lo(glob2+0x40000000)($t0)
61 lui $t0,%hi(glob2+0x80000000)
62 lh $t0,%lo(glob2+0x80000000)($t0)
64 lui $t0,%hi(glob2+0x80808080)
65 lh $t0,%lo(glob2+0x80808080)($t0)
69 .type glob2, @function
73 lui $t0,%hi(glob1+0x00000001)
74 lui $t0,%hi(glob1+0x00007fff)
75 lui $t0,%hi(glob1+0x00008080)
76 lui $t0,%hi(glob1+0x00018000)
77 lui $t0,%hi(glob1+0x40000000)
78 lui $t0,%hi(glob1+0x80000000)
79 lui $t0,%hi(glob1+0x80808080)
80 lh $t0,%lo(glob1+0x80808080)($t0)