brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · caeae4f Raw
32 lines · plain
1# RUN: rm -rf %t && mkdir -p %t2# RUN: llvm-mc -triple=x86_64-apple-macos10.9 -filetype=obj \3# RUN:     -o %t/helper.o %S/Inputs/MachO_GOTAndStubsOptimizationHelper.s4# RUN: llvm-mc -triple=x86_64-apple-macos10.9 -filetype=obj \5# RUN:     -o %t/testcase.o %s6# RUN: llvm-jitlink -noexec -slab-allocate 64Kb -slab-page-size 4096 \7# RUN:     -entry=bypass_stub -check %s %t/testcase.o %t/helper.o8#9# Test that references to in-range GOT and stub targets can be bypassed.10# The helper file contains a function that uses the GOT for _x, and this file11# contains an external call to that function. By slab allocating the JIT memory12# we can ensure that the references and targets will be in-range of one another,13# which should cause both the GOT load and stub to be bypassed.14 15        .section	__TEXT,__text,regular,pure_instructions16	.macosx_version_min 10, 1417	.globl bypass_stub18	.p2align	4, 0x9019 20# jitlink-check: decode_operand(bypass_got, 4) = _x - next_pc(bypass_got)21# jitlink-check: decode_operand(bypass_stub, 0) = bypass_got - next_pc(bypass_stub)22bypass_stub:23	callq	bypass_got24 25	.section	__DATA,__data26	.globl	_x27	.p2align	228_x:29	.long	4230 31.subsections_via_symbols32