This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

OS store and restore registers

Hi all,

There is a dedicated register for store and restoring the OS thread context informations in ARMV8. What is the advantage of it and what is the use case of the same ??

  • They are instead of a dedicated platform register in the ABI and would normally point to a thread local storage structure. When you've got threads in a single process they all share the same address space and you need a simple way of getting to thread local storage. The same sort of thing is also used in microcontrollers that don't have an MMU. One could set up a location that held the current pointer whenever the thread changed but really you want this sort of thing to be both fast and safe. On x86 they finally found a use for their old segment registers facility by using one for this purpose.