RTEMS | sparc/include/.../cpuimpl.h: Correct global file scope register use (!488)
Kinsey Moore (@opticron)
gitlab at rtems.org
Thu May 29 23:18:10 UTC 2025
Kinsey Moore started a new discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/488#note_122997
So...this is technically correct as register g6 is reserved by the SPARC ABI for OS use and the header declaration allows direct access to g6 as if it were a variable, but this particular type of declaration is fragile since it uses a GCC extension which could go away in the future (especially given how the `register` keyword has been declining over time).
A better long-term solution is to convert this declaration to a little snippet of inline assembler that stores into or retrieves from g6 as necessary.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/488#note_122997
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250529/3794b3ef/attachment.htm>
More information about the bugs
mailing list