public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/63596] New: Saving of GPR/FPRs for stdarg even though the variable argument is not used
@ 2014-10-19 18:59 pinskia at gcc dot gnu.org
  2014-10-20 12:51 ` [Bug target/63596] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-10-19 18:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63596
           Summary: Saving of GPR/FPRs for stdarg even though the variable
                    argument is not used
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
            Target: aarch64

Take a function like:
int f(int a, ...)
{
  return a;
}

Currently with the top of the trunk we get:
f:
    sub    sp, sp, #192
    stp    x1, x2, [sp, 136]
    stp    x3, x4, [sp, 152]
    stp    x5, x6, [sp, 168]
    str    x7, [sp, 184]
    str    q0, [sp]
    str    q1, [sp, 16]
    str    q2, [sp, 32]
    str    q3, [sp, 48]
    str    q4, [sp, 64]
    str    q5, [sp, 80]
    str    q6, [sp, 96]
    str    q7, [sp, 112]
    add    sp, sp, 192
    ret
--- CUT ---
But we can optimize this down to just 
f:
    ret
--- CUT ---
The .stdarg debug dump says:
f: va_list escapes 0, needs to save 0 GPR units and 0 FPR units.

But nowhere in aarch64.c uses cfun->va_list_gpr_size or cfun->va_list_fpr_size
to figure out how many registers need to be saved.


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

end of thread, other threads:[~2015-01-06 18:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-19 18:59 [Bug target/63596] New: Saving of GPR/FPRs for stdarg even though the variable argument is not used pinskia at gcc dot gnu.org
2014-10-20 12:51 ` [Bug target/63596] " rguenth at gcc dot gnu.org
2014-12-30 17:00 ` jiwang at gcc dot gnu.org
2014-12-30 18:24 ` pinskia at gcc dot gnu.org
2015-01-03 22:01 ` pinskia at gcc dot gnu.org
2015-01-06 18:26 ` jiwang 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).