xref: /linux/tools/testing/selftests/x86/clang_helpers_32.S (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1*11586553SJohn Hubbard/* SPDX-License-Identifier: GPL-2.0-only */
2*11586553SJohn Hubbard/*
3*11586553SJohn Hubbard * 32-bit assembly helpers for asm operations that lack support in both gcc and
4*11586553SJohn Hubbard * clang. For example, clang asm does not support segment prefixes.
5*11586553SJohn Hubbard */
6*11586553SJohn Hubbard.global dereference_seg_base
7*11586553SJohn Hubbarddereference_seg_base:
8*11586553SJohn Hubbard	mov %fs:(0), %eax
9*11586553SJohn Hubbard	ret
10*11586553SJohn Hubbard
11*11586553SJohn Hubbard.section .note.GNU-stack,"",%progbits
12