This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/67660] New: [SH] Automatically insert atomic rewind code into ISR prologue
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Sep 2015 01:53:03 +0000
- Subject: [Bug target/67660] New: [SH] Automatically insert atomic rewind code into ISR prologue
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67660
Bug ID: 67660
Summary: [SH] Automatically insert atomic rewind code into ISR
prologue
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: olegendo at gcc dot gnu.org
Target Milestone: ---
Target: sh*-*-*
This has been originally mentioned here
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50457#c16
however it's not really SH2A specific, but rather specific to gUSA-like atomic
sequences which need rewinding.
The basic idea is to make the compiler automatically emit the proper atomic
rewind code into the ISR prologue, if it is actually needed. For example, if
the ISR doesn't touch anything atomic and contains no function calls, it can be
omitted, in a similar way as it's done for FP regs save/store.
This can be useful for bare-metal systems when atomics are used to access
shared state from normal code and ISRs. Probably the easiest way to do that is
via an additional function attribute, like "rewind_atomics".