brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 00940b7 Raw
48 lines · plain
1# REQUIRES: ppc2 3# RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t4# RUN: ld.lld -r %t -o %t25# RUN: llvm-objdump -s --section=.symtab %t2 | FileCheck %s6 7.text8.abiversion 29.globl  _start10.p2align	211.type   _start,@function12 13_start:14.Lfunc_begin0:15.Lfunc_gep0:16	addis 2, 12, .TOC.-.Lfunc_gep0@ha17	addi 2, 2, .TOC.-.Lfunc_gep0@l18.Lfunc_lep0:19	.localentry	_start, .Lfunc_lep0-.Lfunc_gep020	# The code below is not important, it just needs to access some21	# global data or function, in order to use the TOC.22	# In this case, it performs the following:23	# g += 10;24	# Also note that this code is not intended to be run, but only25	# to check if the linker will preserve the localentry info.26	addis 3, 2, g@toc@ha27	addi 3, 3, g@toc@l28	lwz 4, 0(3)29	addi 4, 4, 1030	stw 4, 0(3)31	blr32	.long	033	.quad	034.Lfunc_end0:35	.size   _start, .Lfunc_end0-.Lfunc_begin036 37	.type	g,@object               # @g38	.lcomm	g,4,439 40// We expect the st_other byte to be 0x60:41// localentry = 011 (gep + 2 instructions), reserved = 000,42// visibility = 00 (STV_DEFAULT)43// Currently, llvm-objdump does not support displaying44// st_other's PPC64 specific flags, thus we check the45// result of the hexdump of .symtab section.46 47// CHECK: 0060 00000003 12600001 00000000 0000000048