Re: MinGW x86_64 ABI problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 24, 2009 at 08:29:32AM -0500, John Fine wrote:
> There is no instruction to push or pop an xmm register.  The code seems 
> to expect to be able to push and pop.
> 
> If I knew more about gcc internals, I could invent a multi instruction 
> sequence to push or pop, but the result would be very inefficient 
> (because several xmm registers need to be saved and restored in the 
> typical function).

It should be relatively easy to peephole multiple such patterns into
a single one.

> There are architectures that don't have push/pop at all as well as some 
> where push/pop are slower than the alternative.  In many compilers (I 
> assume gcc, but haven't checked) the prolog code can sub the right 
> amount from rsp for both local variables and saving 
> callee-saved-registers, then move those registers into the right place 
> in the stack frame.

Look for ACCUMULATE_OUTGOING_ARGS.

> What/where do I change in gcc to tell it that is the way to save and 
> restore xmm registers.

Gcc either wants to push all register classes or use standard stores
for all.

> Any idea why I don't see this issue discussed on the net, and why 
> someone else hasn't fixed it already?  Or have they and I just haven't 
> looked in the right place?

Either you are looking not hard enough, or noone else has posted about
it yet.

> Doesn't anyone else try to create .lib or .dll files with MinGW that can 
> be called from standard win64 .exe's?

I don't know.  It's been some years since I last looked at MingW.

> As soon as the called function has a few float or double local 
> variables, plus any function up the call stack in the exe also has a few 
> float or double local variables, the result should malfunction.  I can't 
> believe I'm the only one seeing this.

Let's not forget the other preconditions: 64 bit computing,
MingW, and mixing GNU tools with another toolchain.
Each not that uncommon, but the intersection of all these may be small.
And someone has to be the first one to see anything that is to be seen.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux