File: xgot.s

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (67 lines) | stat: -rw-r--r-- 1,618 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux  %s -o - | llvm-readobj -r - | FileCheck %s

// Check that the appropriate relocations were created.
// For the xgot case we want to see R_MIPS_[GOT|CALL]_[HI|LO]16.

// CHECK: Relocations [
// CHECK:   0x0 R_MIPS_HI16 _gp_disp
// CHECK:   0x4 R_MIPS_LO16 _gp_disp
// CHECK:   0x14 R_MIPS_GOT_HI16 ext_1
// CHECK:   0x1C R_MIPS_GOT_LO16 ext_1
// CHECK:   0x24 R_MIPS_CALL_HI16 printf
// CHECK:   0x30 R_MIPS_CALL_LO16 printf
// CHECK:   0x2C R_MIPS_GOT16 $.str
// CHECK:   0x38 R_MIPS_LO16 $.str
// CHECK: ]

	.text
	.abicalls
	.section	.mdebug.abi32,"",@progbits
	.file	"/home/espindola/llvm/llvm/test/MC/Mips/xgot.ll"
	.text
	.globl	fill
	.align	2
	.type	fill,@function
	.set	nomips16
	.ent	fill
fill:                                   # @fill
	.frame	$sp,24,$ra
	.mask 	0x80000000,-4
	.fmask	0x00000000,0
	.set	noreorder
	.set	nomacro
	.set	noat
# %bb.0:                                # %entry
	lui	$2, %hi(_gp_disp)
	addiu	$2, $2, %lo(_gp_disp)
	addiu	$sp, $sp, -24
	sw	$ra, 20($sp)            # 4-byte Folded Spill
	addu	$gp, $2, $25
	lui	$1, %got_hi(ext_1)
	addu	$1, $1, $gp
	lw	$1, %got_lo(ext_1)($1)
	lw	$5, 0($1)
	lui	$1, %call_hi(printf)
	addu	$1, $1, $gp
	lw	$2, %got($.str)($gp)
	lw	$25, %call_lo(printf)($1)
	jalr	$25
	addiu	$4, $2, %lo($.str)
	lw	$ra, 20($sp)            # 4-byte Folded Reload
	jr	$ra
	addiu	$sp, $sp, 24
	.set	at
	.set	macro
	.set	reorder
	.end	fill
$tmp0:
	.size	fill, ($tmp0)-fill

	.type	$.str,@object           # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
$.str:
	.asciz	"ext_1=%d, i=%d\n"
	.size	$.str, 16


	.text