https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81823
Bug ID: 81823
Summary: [RX] Improve support for atomics other than SImode
Product: gcc
Version: 7.1.0
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: rx*-*-*
Atomics that perform arithmetic are only implemented for SImode. It should be
extended to support QImode and HImode in the same way.
Moreover, when doing atomic ior, xor, and operations with constants that
consist of only one bit, the following instructions can be used:
ior -> bset
xor -> bnot
and -> bclr
Although the memory operand of those instructions is always a byte, it can also
be used on wider types by adjusting the byte offset (depending on the current
endian mode).
The bset, bnot and bclr instructions are very useful when dealing with GPIO
port registers.