xref: /illumos-gate/usr/src/test/elf-tests/tests/tls/amd64/ie/style1-func-with-r12.s (revision 4db555a5389470c6f15aa8b50a38ca5d533d0641)
1*4db555a5SRichard Lowe/*
2*4db555a5SRichard Lowe * This file and its contents are supplied under the terms of the
3*4db555a5SRichard Lowe * Common Development and Distribution License ("CDDL"), version 1.0.
4*4db555a5SRichard Lowe * You may only use this file in accordance with the terms of version
5*4db555a5SRichard Lowe * 1.0 of the CDDL.
6*4db555a5SRichard Lowe *
7*4db555a5SRichard Lowe * A full copy of the text of the CDDL should have accompanied this
8*4db555a5SRichard Lowe * source.  A copy of the CDDL is also available via the Internet at
9*4db555a5SRichard Lowe * http://www.illumos.org/license/CDDL.
10*4db555a5SRichard Lowe */
11*4db555a5SRichard Lowe
12*4db555a5SRichard Lowe/*
13*4db555a5SRichard Lowe * Copyright 2012, Richard Lowe.
14*4db555a5SRichard Lowe */
15*4db555a5SRichard Lowe
16*4db555a5SRichard Lowe	.section	.rodata.str1.1,"aMS",@progbits,1
17*4db555a5SRichard Lowe.LC0:
18*4db555a5SRichard Lowe	.string	"foo: %p bar: %p\n"
19*4db555a5SRichard Lowe	.text
20*4db555a5SRichard Lowe.globl func
21*4db555a5SRichard Lowe	.type	func, @function
22*4db555a5SRichard Lowefunc:
23*4db555a5SRichard Lowe.LFB0:
24*4db555a5SRichard Lowe	pushq	%rbp
25*4db555a5SRichard Lowe.LCFI0:
26*4db555a5SRichard Lowe	movq	%rsp, %rbp
27*4db555a5SRichard Lowe.LCFI1:
28*4db555a5SRichard Lowe	movq	%fs:0, %r12
29*4db555a5SRichard Lowe	movq	%r12, %rdx
30*4db555a5SRichard Lowe	addq	bar@GOTTPOFF(%rip), %rdx
31*4db555a5SRichard Lowe	addq	foo@GOTTPOFF(%rip), %r12
32*4db555a5SRichard Lowe	movq	%r12, %rsi
33*4db555a5SRichard Lowe	movl	$.LC0, %edi
34*4db555a5SRichard Lowe	movl	$0, %eax
35*4db555a5SRichard Lowe	call	printf
36*4db555a5SRichard Lowe	leave
37*4db555a5SRichard Lowe	ret
38*4db555a5SRichard Lowe.LFE0:
39*4db555a5SRichard Lowe	.size	func, .-func
40