sparc: Remove redundant 'register' specifier from cpuimpl.h

This patch removes the redundant register keyword and switches to inline
assembly for g7 assignment as per review feedback.
This commit is contained in:
Karthikey Kadati
2025-11-24 11:04:14 +05:30
committed by Kinsey Moore
parent 7cc3bb777c
commit 0b20605792

View File

@@ -249,12 +249,11 @@ static inline void _CPU_Use_thread_local_storage(
const Context_Control *context
)
{
register uint32_t g7 __asm__( "g7" );
g7 = context->g7;
/* Make sure that the register assignment is not optimized away */
__asm__ volatile ( "" : : "r" ( g7 ) );
/* Load the thread pointer into g7 */
__asm__ volatile( "mov %0, %%g7"
:
: "r"( context->g7 )
: "g7" );
}
static inline void *_CPU_Get_TLS_thread_pointer(