This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/67260] [sh] Register spill bug for sibcall+complex+softfloat
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 07 Feb 2016 12:34:22 +0000
- Subject: [Bug target/67260] [sh] Register spill bug for sibcall+complex+softfloat
- Auto-submitted: auto-generated
- References: <bug-67260-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67260
--- Comment #11 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Alexander Monakov from comment #10)
> If always using r0 is not an issue, I think it's possible to just use
> operands[0] (casting it to the right size with subreg:SI, if needed) to
> avoid using a potentially-reserved hardreg. This would allow to remove the
> clobber from the pattern altogether.
I'm not sure it's a good idea. All the call patterns are written with "=rf"
for operand[0], i.e. it could be a floating point register. Under the current
ABI all function calls always clobber GP regs r0..r3 though. To avoid more
potential r0-spill-failure cases, I'd rather put the explicit r1 clobber.
> (I also imagine that sh.md could benefit from a rework of call patterns, I
> don't understand why it's done this way with postreload splits)
Do you have anything in particular in mind? I guess some of the things are
tied to the way constant/literal pools work on SH.