[MinGW-Notify] [mingw] #37867: Create a 64bit build environment for the MinGW.org project.

Back to archive index
MinGW Notification List mingw****@lists*****
Wed Jan 8 21:49:32 JST 2020

#37867: Create a 64bit build environment for the MinGW.org project.

  Open Date: 2018-01-10 12:17
Last Update: 2020-01-08 09:49

URL for this Ticket:
RSS feed for this Ticket:


Last Changes/Comment on this Ticket:
2020-01-08 09:49 Updated by: cstrauss


Keith Apr 26th, 2019 at 3:50:53 PM

    I'll also look at the assembly output of the compiler to better understand
    the calling conventions.

That's how I initially became aware of the problem — looking at the -S output
from a stage one build of a Linux hosted mingw64 cross-compiler. It's
instructive, but it needs some further reading for adequate understanding. So
far, I've deduced:

* The stack organization is as if all parameters are passed there; on ix86,
they are; on x86-64 the first three or (normally) four are passed in registers,
with reserved, but uninitialized stack space where they might have been passed,
(and where the called function may choose to save them). * On ix86, all
floating point values are returned in the ix87 st(0) register; on x86-64, float
and double are returned in xmm0, while GCC long double is returned in
caller-reserved stack memory, to which a pointer is returned in rax, (this
address is initially passed by the caller, as a "hidden" first argument, in
rcx, leaving only three registers for the first three formal arguments, rather
than the usual four). * On x86-64, formal arguments which exceed eight bytes in
size appear to be passed by reference — presumably to an ephemeral copy of the
original data — where C conventionally assumes pass-by-value; AFAICT, ix86
passes such arguments strictly by value, copying the original data directly
into the stack frame passed to the called function. * GCC long double occupies
one TBYTE (i.e. ten-byte) storage element; on ix86, that gets pushed over three
DWORD elements of stack frame; on x86-64, it would (presumably) occupy only one
QWORD of stack frame space (for the reference pointer), with a further two
QWORD (or maybe, just three DWORD) allocations, elsewhere, for the copied data
— I haven't explored that in detail.

Ticket Status:

      Reporter: earnie
         Owner: earnie
          Type: Issues
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: Create a 64bit build environment for the MinGW.org project.
     Component: WSL
      Severity: 5 - Medium
    Resolution: None

Ticket details:

This is the primary ticket for controlling this milestone. Status of the
milestone will be added as comments to this ticket.

Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
RSS feed for this Ticket:

More information about the MinGW-Notify mailing list
Back to archive index