interrupt attribute

Guest #1172743
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
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
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
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

A question of your own? This thread is over 20 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.