6.58.24. SH Built-in Functions
6.58.24 SH Built-in Functions
The following built-in functions are supported on the SH1, SH2, SH3 and SH4 families of processors:
— Built-in Function: void __builtin_set_thread_pointer (void *ptr)
Sets the ‘
GBR
’ register to the specified value ptr. This is usually used by system code that manages threads and execution contexts. The compiler normally does not generate code that modifies the contents of ‘GBR
’ and thus the value is preserved across function calls. Changing the ‘GBR
’ value in user code must be done with caution, since the compiler might use ‘GBR
’ in order to access thread local variables.
— Built-in Function: void * __builtin_thread_pointer (void)
Returns the value that is currently set in the ‘
GBR
’ reg