All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] Broken floating-point varargs
@ 2000-08-25 21:36 David Huggins-Daines
  0 siblings, 0 replies; only message in thread
From: David Huggins-Daines @ 2000-08-25 21:36 UTC (permalink / raw)
  To: parisc-linux; +Cc: law

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-08-25 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-25 21:36 [parisc-linux] Broken floating-point varargs David Huggins-Daines

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.