[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 Lokesh Janghel changed: What|Removed |Added CC||lokeshjanghel91 at gmail dot com --- Comment #15 from Lokesh Janghel --- Created attachment 45639 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45639=edit Patch with new option for LSB & MSB
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 --- Comment #14 from Segher Boessenkool --- -msvr4-struct-return=standard and -msvr4-struct-return=compat, perhaps?
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 --- Comment #13 from Franz Sirl --- Yes, I can do a patch for GCC-9. Any idea for the option naming? Like -msvr4-struct-return-msb? Or should I consolidate -maix-struct-return and -msvr4-struct-return into -maggr-return-mode={aix,svr4,svr4gnu}?
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 --- Comment #12 from Segher Boessenkool --- Yeah, but it is too late to make GCC 8. Do you want to do the patch for GCC 9? Ideally it goes into binutils, first.
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 Franz Sirl changed: What|Removed |Added Known to fail||3.1.1 --- Comment #11 from Franz Sirl --- It is wrong since the introduction of -msvr4-struct-return during the gcc-3.1 development. Before that GCC followed a draft ABI spec and returned all aggregates in memory for ABI_V4. A quick check reveals that a fix is probably easy to implement with a new option (non-default for backwards compatibility), a small change in rs6000_return_in_msb() and an additional value in rs6000_elf_file_end() for ".gnu_attribute 12".
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 --- Comment #10 from Segher Boessenkool --- I reopened PR85123 for the regression. Let's keep this bug for purely the SYSV ABI non-compliance. This is not a regression (it is ancient).
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 --- Comment #9 from rguenther at suse dot de --- On Tue, 3 Apr 2018, segher at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 > > --- Comment #8 from Segher Boessenkool --- > It is. This PR is about us not following the ABI. On trunk this code > is miscompiled; there is at least one other PR for that. So this is a [8 Regression] then? Please fill out known-to-work/fail for me to more easily classify PRs.
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 --- Comment #8 from Segher Boessenkool --- It is. This PR is about us not following the ABI. On trunk this code is miscompiled; there is at least one other PR for that.
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 Richard Biener changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment #7 from Richard Biener --- Isn't this two different bugs? From the description it looks like all of 4.6+ behave like this? But the bisect points to sth that would be a 8+ regression? Also I fail to see how this expand patch can cause this ABI issue.
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 Peter Bergner changed: What|Removed |Added CC||bergner at gcc dot gnu.org --- Comment #6 from Peter Bergner --- Adding a link to Alan's comment about why that patch is wrong: https://gcc.gnu.org/ml/gcc-patches/2018-03/msg01547.html
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 Peter Bergner changed: What|Removed |Added CC||seurer at gcc dot gnu.org --- Comment #5 from Peter Bergner --- *** Bug 85123 has been marked as a duplicate of this bug. ***
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 Alan Modra changed: What|Removed |Added CC||tamar.christina at arm dot com --- Comment #4 from Alan Modra --- Mainline regressed with svn rev 254862 (git commit e0da09896). 2017-11-17 Tamar Christina* expr.c (copy_blkmode_to_reg): Fix bitsize for targets with fast unaligned access. * doc/sourcebuild.texi (word_mode_no_slow_unalign): New.
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 --- Comment #3 from Segher Boessenkool --- The problem in trunk happens at expand time already: it loads the 32-bit word it created from stack, and then shifts it left by -8 bits.
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 --- Comment #2 from Segher Boessenkool --- 4.6 .. 7.x behave like you say (I don't have older compilers handy).
[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 Segher Boessenkool changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-03-22 Ever confirmed|0 |1 --- Comment #1 from Segher Boessenkool --- On Linux, with trunk, with -msvr4-struct-return I get f: stwu 1,-32(1) li 10,4386 li 9,51 sth 10,8(1) stb 9,10(1) ori 2,2,0 lwz 3,8(1) addi 1,1,32 slwi 3,3,24 blr which is simply incorrect (it returns only the undefined byte!) and without the flag it generates f: li 8,4386 li 10,51 sth 8,0(3) stb 10,2(3) blr (which is correct behaviour for this ABI, not sure if it is documented that way though). powerpc-eabi does the same thing, but with the other default.