This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] MIPS function attributes for interrupt handlers


"Maciej W. Rozycki" wrote:
> On Wed, 25 Feb 2009, Fu, Chao-Ying wrote:
>
> > > I have one question: does the patch cause GCC to generate eret?  If
> > > so, is there another attribute needed for deret?
> >
> >   Yes, from the current patch GCC generates "eret" for return.
> > So, we may need another attribute as "use_debug_exception_return".
>
>  Please note that "eret" is not supported for -march=mips1 and
> -march=mips2 in GAS as those ISAs did not have this instrution ("rfe" in
> the delay slot of a "jr" was used instead).  While, if I understand
> correctly, the interrupt function attribute makes sense for the EIC mode
> only, I suggest that you make sure the compiler does not produce code GAS
> will refuse to swallow for older ISAs.  Perhaps the attribute should only
> be supported for ISAs which can actually run the resulting code
> ("-march=mips32" and above?).

  It can be used for the original mode (single,ilp0.. ilp7) and the EIC
mode.
People just need  to put GCC-generated handlers to the address they want
in the linker script, and provide some bootup code.

  Maybe we just emit "jr" and "ref", when mips1 or mips2 is used to compile
code.
Thanks!

Regards,
Chao-ying


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]