Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / testing / selftests / x86 / clang_helpers_64.S
blob185a69dbf39cced1dea6f70109f73541b7b1b904
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * 64-bit assembly helpers for asm operations that lack support in both gcc and
4  * clang. For example, clang asm does not support segment prefixes.
5  */
6 .global dereference_seg_base
8 dereference_seg_base:
9         mov %gs:(0), %rax
10         ret
12 .global test_page
13 .global test_syscall_insn
15 .pushsection ".text", "ax"
16 .balign 4096
17 test_page: .globl test_page
18         .fill 4094,1,0xcc
20 test_syscall_insn:
21         syscall
23 .ifne . - test_page - 4096
24         .error "test page is not one page long"
25 .endif
26 .popsection
28 .section .note.GNU-stack,"",%progbits