public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/108315] New: -mcpu=power10 changes ABI
@ 2023-01-06 11:23 amonakov at gcc dot gnu.org
  2023-02-28  2:57 ` [Bug target/108315] " bergner at gcc dot gnu.org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: amonakov at gcc dot gnu.org @ 2023-01-06 11:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108315
           Summary: -mcpu=power10 changes ABI
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ABI, wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amonakov at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc64le-*-*

Created attachment 54202
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54202&action=edit
testcase

At least the documentation should mention that if intentional.

In the attached example, the function bar is compiled to

bar:
        .localentry     bar,1
        mtctr 3
        mr 12,3
        bctr
        .long 0
        .byte 0,0,0,0,0,0,0,0

i.e. it does not preserve r2 (it's compiled with -mcpu=power10). If the caller
is not compiled with -mcpu=power10, it needs r2 preserved (bar has a
localentry, so the nop in the caller stays a nop after linking).

I verified the testcase misbehaves on Compile Farm's gcc135: as it does not use
any power10-specific instructions, it's runnable there.

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

end of thread, other threads:[~2023-10-13  1:23 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 11:23 [Bug target/108315] New: -mcpu=power10 changes ABI amonakov at gcc dot gnu.org
2023-02-28  2:57 ` [Bug target/108315] " bergner at gcc dot gnu.org
2023-02-28  5:07 ` linkw at gcc dot gnu.org
2023-02-28  6:15 ` amonakov at gcc dot gnu.org
2023-02-28  6:31 ` amonakov at gcc dot gnu.org
2023-02-28  8:05 ` amodra at gmail dot com
2023-02-28 15:33 ` marxin at gcc dot gnu.org
2023-02-28 16:01 ` segher at gcc dot gnu.org
2023-02-28 16:26 ` segher at gcc dot gnu.org
2023-03-01  1:24 ` rui314 at gmail dot com
2023-03-02 16:53 ` amonakov at gcc dot gnu.org
2023-03-03  1:06 ` rui314 at gmail dot com
2023-03-03  1:54 ` dje at gcc dot gnu.org
2023-03-03 17:30 ` segher at gcc dot gnu.org
2023-03-03 18:16 ` amonakov at gcc dot gnu.org
2023-03-03 19:31 ` segher at gcc dot gnu.org
2023-03-03 20:09 ` amonakov at gcc dot gnu.org
2023-03-03 21:45 ` segher at gcc dot gnu.org
2023-03-06 20:20 ` amonakov at gcc dot gnu.org
2023-10-12  4:09 ` bergner at gcc dot gnu.org
2023-10-12  4:34 ` rui314 at gmail dot com
2023-10-13  1:23 ` rui314 at gmail dot com

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).