interrupt attribute

Guest #1172743
Rate this post
useful
not useful
outer_space wrote:
> Why doesnt the gcc interrupt attribute work?  Is anyone working on
> fixing it?

The attribute works if the code is compiled in "arm-only"-mode. There
are known issues when using the attribute together with interwork, maybe
just when optimization is enabled. The problems is known and there are
patches in the gcc-bugzilla. As far as I know the patches are not
included in gcc 4.1.1. The gcc-bugzilla provides further information.
IRC the topic has been discussed in the GNUARM-yahoo-group and in this
forum some time ago. I have mentioned some "workarounds" an this forum
some days ago.

This forum is not the best place for a question about the state of the
gcc-development (better: gcc mailing-list).

Martin Thomas
#1172744
Rate this post
useful
not useful
Martin Thomas wrote:
> outer_space wrote:
>> Why doesnt the gcc interrupt attribute work?  Is anyone working on
>> fixing it?
>
> The attribute works if the code is compiled in "arm-only"-mode. There
> are known issues when using the attribute together with interwork, maybe
> just when optimization is enabled. The problems is known and there are
> patches in the gcc-bugzilla. As far as I know the patches are not
> included in gcc 4.1.1. The gcc-bugzilla provides further information.
> IRC the topic has been discussed in the GNUARM-yahoo-group and in this
> forum some time ago. I have mentioned some "workarounds" an this forum
> some days ago.
>
> This forum is not the best place for a question about the state of the
> gcc-development (better: gcc mailing-list).
>
> Martin Thomas

What is the purpose of the attribute? Some code uses it, some doesn't.
Guest #1172745
Rate this post
useful
not useful
Pete Gasper wrote:

> What is the purpose of the attribute? Some code uses it, some doesn't.

For example the compiler should generate instructions to "adjust" the
return-address when this attribute is used. See ARM technical manual
about return-addresses of exceptions.

Martin Thomas
#1172746
Rate this post
useful
not useful
Martin Thomas wrote:
> outer_space wrote:
>> Why doesnt the gcc interrupt attribute work?  Is anyone working on
>> fixing it?
>
> The attribute works if the code is compiled in "arm-only"-mode. There
> are known issues when using the attribute together with interwork, maybe
> just when optimization is enabled. The problems is known and there are
> patches in the gcc-bugzilla. As far as I know the patches are not
> included in gcc 4.1.1. The gcc-bugzilla provides further information.
> IRC the topic has been discussed in the GNUARM-yahoo-group and in this
> forum some time ago. I have mentioned some "workarounds" an this forum
> some days ago.
>
> This forum is not the best place for a question about the state of the
> gcc-development (better: gcc mailing-list).
>
> Martin Thomas

The problem is still there. Any chance to use
__attribute__((interrupt("irq")) without workarounds? It is quite
annoying took me a whole day to figure out that wrong code is generated.

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now