SPARC Context Switch Code

Daniel Hellstrom daniel at
Fri Feb 7 13:20:08 UTC 2014


That sounds correct to me and I'm glad some one brings this up, haven't tested it though. And while we're at it, I would like to discuss the usage of G5-G7. I have had that on my TODO for quite some 
time to investigate... As they are system specific and RTEMS does not use them I see no point in saving them, do you? RTEMS never seems to use G6,G7 so would could instruct GCC to use them and break 
the ABI for speed ;)

And we could start using them to speed up trap handling? One thing is that is trap handlers use them then we must keep in mind that once we turn on traps again (and interrupt) we might get another 
trap/interrupt so care must be taken.

In a non-MMU and real-time system like RTEMS I think we could safely assume that the application does not destroy g5-g7. We could also use them to store current task pointer, per-cpu pointer or similar?


On 02/06/2014 09:36 AM, Sebastian Huber wrote:
> Hello,
> what do the RTEMS SPARC user think about the attached patch? Why did the SPARC context switch code save and restore volatile registers?
> _______________________________________________
> rtems-users mailing list
> rtems-users at

Daniel Hellstrom
Software Section Head
Aeroflex Gaisler AB
Aeroflex Microelectronic Solutions – HiRel
Kungsgatan 12
SE-411 19 Gothenburg, Sweden
Phone: +46 31 7758657
daniel at

More information about the users mailing list