[h8/300] peepholes vs interrupts

Anatoly Sokolov aesok@post.ru
Thu Jul 17 18:53:00 GMT 2008


Hello.

 
> 
> Some of the peephole2 patterns require a scratch register, but
> allocating one within an interrupt function is bad - normally, some
> unused (and unsaved) register is chosen, corrupting whatever the
> interrupt function interrupted.  Since peephole2 is after the prolog
> is emitted, there's nothing we can do about this.  So, this patch
> disables any peephole2s that require a scratch register whenever we're
> compiling an interrupt function.  OK?
> 

Look on TARGET_HARD_REGNO_SCRATCH_OK target hook:

http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01111.html
http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01275.html
http://gcc.gnu.org/ml/gcc-patches/2008-07/msg00865.html

Anatoly.


More information about the Gcc-patches mailing list