This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/71493] [6/7 regression] accidental ABI change for structure return on PowerPC
- From: "segher at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 17 Jul 2016 19:56:26 +0000
- Subject: [Bug target/71493] [6/7 regression] accidental ABI change for structure return on PowerPC
- Auto-submitted: auto-generated
- References: <bug-71493-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71493
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Is there a testcase? I cannot reproduce the problem. powerpc-elf-gcc
on both trunk and gcc-6-branch returns a struct in registers if it needs
at most two registers for that, in float regs if it needs just one, exactly
like GCC 5 does.
===
struct sd { double a; };
struct sf { float a; };
struct sdd { double a; double b; };
struct sff { float a; float b; };
struct sd fd(void) { return (struct sd){ .a = 42 }; }
struct sf ff(void) { return (struct sf){ .a = 42 }; }
struct sdd fdd(void) { return (struct sdd){ .a = 42, .b = 31 }; }
struct sff fff(void) { return (struct sff){ .a = 42, .b = 31 }; }
===
fd,ff return in FPR1. fdd does an indirect return (stores values in
the struct pointed to by its GPR3). fff returns in GPR3,GPR4.