brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 4d8b3c3 Raw
72 lines · plain
1// This addresses bug 14456. We were not writing2// out the addend to the gprel16 relocation. The3// addend is stored in the instruction immediate4// field.5 6// RUN: llvm-mc -mcpu=mips32r2 -triple=mipsel-pc-linux -filetype=obj %s -o - \7// RUN: | llvm-objdump --no-print-imm-hex -d - | FileCheck %s8// RUN: llvm-mc -mcpu=mips32r2 -triple=mips-pc-linux -filetype=obj %s -o - \9// RUN: | llvm-objdump --no-print-imm-hex -d - | FileCheck %s10 11	.text12	.abicalls13	.option	pic014	.section	.mdebug.abi32,"",@progbits15	.file	"/home/espindola/llvm/llvm/test/MC/Mips/mips_gprel16.ll"16	.text17	.globl	testvar118	.align	219	.type	testvar1,@function20	.set	nomips1621	.ent	testvar122testvar1:                               # @testvar123	.frame	$sp,0,$ra24	.mask 	0x00000000,025	.fmask	0x00000000,026	.set	noreorder27	.set	nomacro28	.set	noat29# %bb.0:                                # %entry30// CHECK: lw ${{[0-9]+}}, 0($gp)31	lw	$1, %gp_rel(var1)($gp)32	jr	$ra33	sltu	$2, $zero, $134	.set	at35	.set	macro36	.set	reorder37	.end	testvar138$tmp0:39	.size	testvar1, ($tmp0)-testvar140 41	.globl	testvar242	.align	243	.type	testvar2,@function44	.set	nomips1645	.ent	testvar246testvar2:                               # @testvar247	.frame	$sp,0,$ra48	.mask 	0x00000000,049	.fmask	0x00000000,050	.set	noreorder51	.set	nomacro52	.set	noat53# %bb.0:                                # %entry54// CHECK: lw ${{[0-9]+}}, 4($gp)55	lw	$1, %gp_rel(var2)($gp)56	jr	$ra57	sltu	$2, $zero, $158	.set	at59	.set	macro60	.set	reorder61	.end	testvar262$tmp1:63	.size	testvar2, ($tmp1)-testvar264 65	.type	var1,@object            # @var166	.local	var167	.comm	var1,4,468	.type	var2,@object            # @var269	.local	var270	.comm	var2,4,471 72