brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · b16f587 Raw
87 lines · plain
1// RUN: llvm-mc -filetype=obj -triple=mips64el-pc-linux -mcpu=mips64 %s -o - \2// RUN: | llvm-readobj -r - \3// RUN: | FileCheck %s4// RUN: llvm-mc -filetype=obj -triple=mips64-pc-linux -mcpu=mips64 %s -o - \5// RUN: | llvm-readobj -r - \6// RUN: | FileCheck %s7 8// Check that the appropriate relocations were created.9 10// R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE11// CHECK:      Relocations [12// CHECK:        Section ({{[a-z0-9]+}}) .rela.rodata {13// CHECK-NEXT:     0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE14// CHECK-NEXT:     0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE15// CHECK-NEXT:     0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE16// CHECK-NEXT:     0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE17// CHECK-NEXT:   }18// CHECK-NEXT: ]19 20	.text21	.abicalls22	.section	.mdebug.abi64,"",@progbits23	.file	"/home/espindola/llvm/llvm/test/MC/Mips/elf-gprel-32-64.ll"24	.text25	.globl	test26	.align	327	.type	test,@function28	.set	nomips1629	.ent	test30test:                                   # @test31	.frame	$sp,0,$ra32	.mask 	0x00000000,033	.fmask	0x00000000,034	.set	noreorder35	.set	nomacro36	.set	noat37# %bb.0:                                # %entry38	lui	$1, %hi(%neg(%gp_rel(test)))39	daddu	$2, $1, $2540	sltiu	$1, $4, 441	dsll	$3, $4, 3242	bnez	$1, $BB0_243	nop44$BB0_1:                                 # %sw.default45	b	$BB0_346	addiu	$2, $zero, -147$BB0_2:                                 # %entry48	daddiu	$1, $2, %lo(%neg(%gp_rel(test)))49	dsrl	$3, $3, 3250	daddiu	$4, $zero, 851	dmult	$3, $452	mflo	$353	ld	$4, %got_page($JTI0_0)($1)54	daddu	$3, $3, $455	ld	$3, %got_ofst($JTI0_0)($3)56	daddu	$1, $3, $157	jr	$158	addiu	$2, $zero, 159$BB0_3:                                 # %return60	jr	$ra61	nop62$BB0_4:                                 # %sw.bb263	jr	$ra64	addiu	$2, $zero, 365$BB0_5:                                 # %sw.bb566	jr	$ra67	addiu	$2, $zero, 268$BB0_6:                                 # %sw.bb869	jr	$ra70	addiu	$2, $zero, 771	.set	at72	.set	macro73	.set	reorder74	.end	test75$tmp0:76	.size	test, ($tmp0)-test77	.section	.rodata,"a",@progbits78	.align	379$JTI0_0:80	.gpdword	($BB0_3)81	.gpdword	($BB0_4)82	.gpdword	($BB0_5)83	.gpdword	($BB0_6)84 85 86	.text87