public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/12007] Multiple inheritance float pass by value fails
Date: Mon, 19 Jan 2004 20:36:00 -0000	[thread overview]
Message-ID: <20040119203608.19823.qmail@sources.redhat.com> (raw)
In-Reply-To: <20030821123016.12007.bill.wade@advantica.biz>


------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  2004-01-19 20:36 -------
Subject: Re:  Multiple inheritance float pass by value f

> The testcase fails on 3.4 hpux 10.20 and 3.5 hpux 11.11, 32-bit SOM
> port.

Ok, the problem is understood.  An indirect call is used to transfer
to the thunk.  Under the HP-UX 32-bit runtime, the first arguments
are passed in general registers.  However, myGv::PutVal(float)
expects its second argument in %fr5.  The linker is supposed to
provide a stub to copy the argument.  However, the .PARAM statement
for the thunk doesn't provide argument location information.  As
a result, the float argument doesn't get copied from %r25 to %fr5.
We also don't provide a .CALL for the transfer from the thunk to
the function.  This is also another potential place where argument
relocation might occur.  The linker doesn't relocate arguments
for this branch as it assumes the arguments are in their default
locations.

The .PARAM statement is generated by ASM_DECLARE_FUNCTION_NAME.
It would appear that the declaration for the thunk doesn't contain
any argument information.  The proper fix is to provide appropriate
argument for the thunk (DECL_ARGUMENTS) as the thunk has no way
of knowing whether it is being called directly or not.  This will
allow the linker to appropriately relocate arguments for both direct
and indirect calls to the thunk.

The hppa-linux ABI is slightly different.  The linker doesn't relocate
arguments.  To compensate, we put floating arguments in both general
and floating point registers for indirect calls.  This avoids the
above problem.  However, the sibcall issue needs fixing.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12007


  parent reply	other threads:[~2004-01-19 20:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-21 12:30 [Bug c++/12007] New: " bill dot wade at advantica dot biz
2003-08-21 13:21 ` [Bug target/12007] " pinskia at gcc dot gnu dot org
2003-08-23 17:47 ` pinskia at gcc dot gnu dot org
2004-01-17 23:48 ` dhazeghi at yahoo dot com
2004-01-18  0:22 ` dave at hiauly1 dot hia dot nrc dot ca
2004-01-18  1:34 ` dhazeghi at yahoo dot com
2004-01-19 16:42 ` dave at hiauly1 dot hia dot nrc dot ca
2004-01-19 18:58 ` dave at hiauly1 dot hia dot nrc dot ca
2004-01-19 20:36 ` dave at hiauly1 dot hia dot nrc dot ca [this message]
2004-01-19 20:56 ` dave at hiauly1 dot hia dot nrc dot ca
2004-02-20 23:03 ` [Bug c++/12007] " cvs-commit at gcc dot gnu dot org
2004-02-20 23:10 ` cvs-commit at gcc dot gnu dot org
2004-02-20 23:16 ` danglin at gcc dot gnu dot org
2004-02-20 23:24 ` pinskia at gcc dot gnu dot org

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=20040119203608.19823.qmail@sources.redhat.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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 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).