public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: John Fine <johnsfine@verizon.net>
To: gcc-help@gcc.gnu.org
Subject: MinGW x86_64 ABI problem
Date: Mon, 23 Feb 2009 22:33:00 -0000	[thread overview]
Message-ID: <49A32428.8020607@verizon.net> (raw)
In-Reply-To: <20090223162016.GB30071@NANO-66-21.grenoble.cnrs.fr>

The Windows version of the x86_64 ABI specifies that registers 
xmm6-xmm15 be callee saved.

I'm building a .dll with MinGW used by an .exe from a different compiler.

I debugged a failure to the point of determining that the code produced 
by MinGW clobbers xmm9 in violation of the ABI.

I tried a bunch of Google searches, expecting this problem would be 
discussed somewhere, but couldn't find it.

I'm using a downloaded binary copy of MinGW for x86_64.  I expect I will 
need to download source code and figure out how to build it, in order to 
deal with this problem.

But I don't know where to look in the gcc source code included in MinGW 
for the registers that should be callee saved.

1) Can you tell me where callee saved registers are specified in the gcc 
source code.

2) I tried adding "-f-call-saved-xmm9" to the g++ command to see if that 
would fix the problem for one register.  That compile aborted with
internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:1590
Is that switch so incorrect?  I understand it would generate .obj code 
incompatible with anything generated without that switch.  But why 
should it crash gcc?

  reply	other threads:[~2009-02-23 22:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-23 15:10 friendly operator overloading Bernd Prager
2009-02-23 16:14 ` Axel Freyn
2009-02-23 22:33   ` John Fine [this message]
2009-02-24 17:00     ` MinGW x86_64 ABI problem NightStrike
2009-02-24 17:35       ` John Fine
2009-02-24 18:26         ` NightStrike
2009-02-24 12:45 Joern Rennecke
2009-02-24 13:30 ` John Fine
2009-02-24 14:00   ` Joern Rennecke

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=49A32428.8020607@verizon.net \
    --to=johnsfine@verizon.net \
    --cc=gcc-help@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).