All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Huggins-Daines <dhd@linuxcare.com>
To: parisc-linux@thepuffingroup.com
Cc: law@cygnus.com
Subject: [parisc-linux] Broken floating-point varargs
Date: 25 Aug 2000 17:36:53 -0400	[thread overview]
Message-ID: <87lmxlowei.fsf@linuxcare.com> (raw)

Hi,

The variadic function code in GCC for HPPA is slightly broken for
floating point arguments.  This only affects the first and second
arguments, as all other ones will be passed on the stack.

The problem is that if a function uses va_start(), GCC emits a
prologue which stores the first four argument words to their
respective stack slots (sp-36 .. sp-48).  Unfortunately it does this
by simply copying general purpose registers 26 to 23 (arg0-arg3) to
these slots, even if some of the first four argument words are (parts
of) floating point values and thus reside in floating point registers.

See hppa_builtin_saveregs() in gcc/config/pa/pa.c for the code in
question.

It looks like we could fix this by checking the parameters and saving
from floating point argument registers instead, I'm just not sure how :-)

I'm wondering whether or not this manifests itself on HP/UX - would it
have something to do with (gack) argument relocation?

-- 
dhd@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.

                 reply	other threads:[~2000-08-25 21:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lmxlowei.fsf@linuxcare.com \
    --to=dhd@linuxcare.com \
    --cc=law@cygnus.com \
    --cc=parisc-linux@thepuffingroup.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.