mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-14 05:49:55 +00:00
Add support for OpenRISC in the rseq selftests. OpenRISC is 32-bit
only.
Tested this with:
Compiler: gcc version 14.2.0 (GCC)
Binutils: GNU assembler version 2.43.1 (or1k-smh-linux-gnu) using BFD version (GNU Binutils) 2.43.1.20241207
Linux: Linux buildroot 6.13.0-rc2-00005-g1fa73dd6c2d3-dirty #213 SMP Sat Dec 28 22:18:39 GMT 2024 openrisc GNU/Linux
Glibc: 2024-12-13 e4e49583d9 Stafford Horne or1k: Update libm-test-ulps
Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
14 lines
291 B
C
14 lines
291 B
C
/* SPDX-License-Identifier: LGPL-2.1-only OR MIT */
|
|
#ifndef _RSEQ_OR1K_THREAD_POINTER
|
|
#define _RSEQ_OR1K_THREAD_POINTER
|
|
|
|
static inline void *rseq_thread_pointer(void)
|
|
{
|
|
void *__thread_register;
|
|
|
|
__asm__ ("l.or %0, r10, r0" : "=r" (__thread_register));
|
|
return __thread_register;
|
|
}
|
|
|
|
#endif
|