mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-06 07:51:16 +08:00
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:
committed by
Kinsey Moore
parent
7cc3bb777c
commit
0b20605792
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user