public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/115188] New: [14/15 regression] invalid Thumb assembly for atomic store in loop on ARMv6
@ 2024-05-22 14:06 ebotcazou at gcc dot gnu.org
  2024-05-22 14:07 ` [Bug target/115188] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-05-22 14:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115188

            Bug ID: 115188
           Summary: [14/15 regression] invalid Thumb assembly for atomic
                    store in loop on ARMv6
           Product: gcc
           Version: 14.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ebotcazou at gcc dot gnu.org
  Target Milestone: ---

This apparently comes from the fix for PR target/111235: the following code:

int data[4];

void init (unsigned int lb, unsigned int hb)
{
  for (unsigned int i = lb; i < hb; i++)
    __atomic_store_4 (&data[i], 0, __ATOMIC_RELAXED);
}

yields invalid assembly when compiled with -mthumb -mcpu=cortex-m0 -O2:

t.s: Assembler messages:
t.s:35: Warning: missing operand; zero assumed
t.s:35: Error: cannot use register index with PC-relative addressing -- `str
r1,r0!'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/115188] [14/15 regression] invalid Thumb assembly for atomic store in loop on ARMv6
  2024-05-22 14:06 [Bug target/115188] New: [14/15 regression] invalid Thumb assembly for atomic store in loop on ARMv6 ebotcazou at gcc dot gnu.org
@ 2024-05-22 14:07 ` rguenth at gcc dot gnu.org
  2024-05-22 18:39 ` pinskia at gcc dot gnu.org
  2024-05-23 14:22 ` wilco at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-22 14:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115188

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |arm
           Keywords|                            |wrong-code
   Target Milestone|---                         |14.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/115188] [14/15 regression] invalid Thumb assembly for atomic store in loop on ARMv6
  2024-05-22 14:06 [Bug target/115188] New: [14/15 regression] invalid Thumb assembly for atomic store in loop on ARMv6 ebotcazou at gcc dot gnu.org
  2024-05-22 14:07 ` [Bug target/115188] " rguenth at gcc dot gnu.org
@ 2024-05-22 18:39 ` pinskia at gcc dot gnu.org
  2024-05-23 14:22 ` wilco at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-22 18:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115188

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=115153,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=111235
             Target|arm                         |arm-eabi

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
At first I thought it was the same failure as PR 115153 but it is different.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/115188] [14/15 regression] invalid Thumb assembly for atomic store in loop on ARMv6
  2024-05-22 14:06 [Bug target/115188] New: [14/15 regression] invalid Thumb assembly for atomic store in loop on ARMv6 ebotcazou at gcc dot gnu.org
  2024-05-22 14:07 ` [Bug target/115188] " rguenth at gcc dot gnu.org
  2024-05-22 18:39 ` pinskia at gcc dot gnu.org
@ 2024-05-23 14:22 ` wilco at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: wilco at gcc dot gnu.org @ 2024-05-23 14:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115188

Wilco <wilco at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |wilco at gcc dot gnu.org
   Last reconfirmed|                            |2024-05-23

--- Comment #2 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> At first I thought it was the same failure as PR 115153 but it is different.

It's similar in that 'm' apparently allows LDMIA/STMIA with writeback in
Thumb-1. The correct constraint is 'Uw'.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-23 14:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-22 14:06 [Bug target/115188] New: [14/15 regression] invalid Thumb assembly for atomic store in loop on ARMv6 ebotcazou at gcc dot gnu.org
2024-05-22 14:07 ` [Bug target/115188] " rguenth at gcc dot gnu.org
2024-05-22 18:39 ` pinskia at gcc dot gnu.org
2024-05-23 14:22 ` wilco at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).