brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · c1d9bd0 Raw
66 lines · plain
1// RUN: llvm-mc -filetype=obj -triple=mips64el-pc-linux -mcpu=mips64  %s -o - | llvm-readobj -r - | FileCheck %s2// RUN: llvm-mc -filetype=obj -triple=mips64-pc-linux -mcpu=mips64  %s -o - | llvm-readobj -r - | FileCheck %s3 4// Check for N64 relocation production.5// Check that the appropriate relocations were created.6 7// CHECK: Relocations [8// CHECK:   0x{{[0-9,A-F]+}} R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI169// CHECK:   0x{{[0-9,A-F]+}} R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO1610// CHECK:   0x{{[0-9,A-F]+}} R_MIPS_GOT_PAGE/R_MIPS_NONE/R_MIPS_NONE11// CHECK:   0x{{[0-9,A-F]+}} R_MIPS_GOT_OFST/R_MIPS_NONE/R_MIPS_NONE12// CHECK: ]13 14 15	.text16	.abicalls17	.section	.mdebug.abi64,"",@progbits18	.file	"/home/espindola/llvm/llvm/test/MC/Mips/elf-N64.ll"19	.text20	.globl	main21	.align	322	.type	main,@function23	.set	nomips1624	.ent	main25main:                                   # @main26	.frame	$sp,16,$ra27	.mask 	0x00000000,028	.fmask	0x90000000,-429	.set	noreorder30	.set	nomacro31	.set	noat32# %bb.0:                                # %entry33	daddiu	$sp, $sp, -1634	sd	$ra, 8($sp)             # 8-byte Folded Spill35	sd	$gp, 0($sp)             # 8-byte Folded Spill36	lui	$1, %hi(%neg(%gp_rel(main)))37	daddu	$1, $1, $2538	daddiu	$gp, $1, %lo(%neg(%gp_rel(main)))39	ld	$1, %got_page($str)($gp)40	daddiu	$4, $1, %got_ofst($str)41	ld	$25, %call16(puts)($gp)42	jalr	$2543	nop44	addiu	$2, $zero, 045	ld	$gp, 0($sp)             # 8-byte Folded Reload46	ld	$ra, 8($sp)             # 8-byte Folded Reload47	daddiu	$sp, $sp, 1648	jr	$ra49	nop50	.set	at51	.set	macro52	.set	reorder53	.end	main54$tmp0:55	.size	main, ($tmp0)-main56 57	.type	$str,@object            # @str58	.section	.rodata.str1.4,"aMS",@progbits,159	.align	260$str:61	.asciz	"hello world"62	.size	$str, 1263 64 65	.text66