https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125628
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-06-06
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
It is trying to do a 8bit atomic via 32bit atomic.
li $5,-4 (~0x3) # 0xfffffffffffffffc
and $5,$2,$5
andi $2,$2,0x3
$5 here is the 4 byte aligned addresss around v
$2 is the offset of v in that 4 bytes.
dsll $2,$2,3
Multipled by 8 to get the bit offset
So far looks good.
li $4,255 # 0xff
sll $4,$4,$2
nor $7,$0,$4
$4 is the mask starting at the bit offset
$7 is inverse mask; the part not part of v
...
xor $8,$8,$4
That looks wrong. Maybe it should be sub rather than xor.