https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70220

--- Comment #5 from Wink Saville <wink at saville dot com> ---
(In reply to H.J. Lu from comment #4)
> (In reply to Wink Saville from comment #0)
> > I'm using the new C interrupt attribute for x86 and its working well. But
> > when I expanded its use to include handling thread context switches, I found
> > that its current implementation lacking.
> > 
> > When using an ISR for a thread context it is necessary to save and restore
> > all registers but by default it saves a few as it thinks are necessary. It
> > is possible to use the clobber list of inline assembly to tell the interrupt
> > attribute code to save additional registers but you can't seem to mention
> > the segment registers in that clobber list, thus to save these additional
> > registers you must manually save them manually.
> > 
> 
> Compiler doesn't use segment registers, except for TLS, which should
> be used in ISR.  ISR needs to save and restore any registers, which
> aren't used by compilers, if they are changed in ISR.

Is there a definitive list of the registers that the compiler uses and their
purpose? I did some searches but didn't come up with any good answers.

Reply via email to