Send MinGW-Notify mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."
Please do not reply to this notification; the sender address is unable to
accept incoming e-mail. If you wish to unsubscribe you can do so at
https://lists.osdn.me/mailman/listinfo/mingw-notify.
Today's Topics:
1. [mingw] #37867: Create a 64bit build environment for the
MinGW.org project. (MinGW Notification List)
2. [mingw] #37867: Create a 64bit build environment for the
MinGW.org project. (MinGW Notification List)
3. [mingw] #37867: Create a 64bit build environment for the
MinGW.org project. (MinGW Notification List)
4. [mingw] #37867: Create a 64bit build environment for the
MinGW.org project. (MinGW Notification List)
----------------------------------------------------------------------
Message: 1
Date: Wed, 08 Jan 2020 09:47:59 -0300
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #37867: Create a 64bit build
environment for the MinGW.org project.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#37867: Create a 64bit build environment for the MinGW.org project.
Open Date: 2018-01-10 12:17
Last Update: 2020-01-08 09:47
URL for this Ticket:
https://osdn.net//projects/mingw/ticket/37867
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37867
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2020-01-08 09:47 Updated by: cstrauss
Comment:
Keith Apr 21st, 2019 at 7:41:50 AM
Here is my first patch: https://osdn.net/users/cstrauss/pf/
mingw-wsl-patches-win64/scm/blobs/tip/win64-context.patch
Should you not, rather, forward declare struct _CONTEXT, with CONTEXT being
typedef struct _CONTEXT CONTEXT? Doesn't https://docs.microsoft.com/en-gb/
windows/desktop/api/winnt/ns-winnt-context then provide the details of the
structure declaration you need?
Keith Apr 21st, 2019 at 8:00:24 AM
While we're discussing architecture specific CONTEXT declarations, some time
ago @Earnie Boyd suggested factoring the individual declarations out of
<winnt.h>, into architecture specific individual files. That seems to me to be
a very reasonable suggestion; maybe we should start by placing the _WIN64
specific declaration in its own stand-alone header file?
Cesar Strauss Apr 21st, 2019 at 8:17:45 AM
Was my patch, alone, sufficient? Or did you need to rework it?
I just had to correct one missing instance of ebx->rbx.
Cesar Strauss Apr 21st, 2019 at 8:27:45 AM
I guess I overlooked this. I will now update the patch to use the reference
CONTEXT declaration from MSDN.
Cesar Strauss Apr 21st, 2019 at 8:30:04 AM
Next failure is in cpu_features.sx. In this case, one of @Keith's patches
helps.
This file now builds, but I cannot properly test it until the compiler is able
to generate executables, which is later in the patch series.
Cesar Strauss Apr 21st, 2019 at 9:52:28 AM
Updated "cpu-features" patch at https://osdn.net/users/cstrauss/pf/
mingw-wsl-patches-win64/scm/blobs/tip/cpu-features-x86-64.patch
Cesar Strauss Apr 21st, 2019 at 1:00:56 PM
Doesn't https://docs.microsoft.com/en-gb/windows/desktop/api/winnt/
ns-winnt-context then provide the details of the structure declaration you
need?
It depends on missing declarations: XMM_SAVE_AREA32, NEON128 and M128A. I can't
find them in MSDN.
---------------------------------------------------------------------
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:
https://osdn.net/projects/mingw/ticket/37867
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37867
------------------------------
Message: 2
Date: Wed, 08 Jan 2020 09:48:36 -0300
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #37867: Create a 64bit build
environment for the MinGW.org project.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#37867: Create a 64bit build environment for the MinGW.org project.
Open Date: 2018-01-10 12:17
Last Update: 2020-01-08 09:48
URL for this Ticket:
https://osdn.net//projects/mingw/ticket/37867
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37867
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2020-01-08 09:48 Updated by: cstrauss
Comment:
Cesar Strauss Apr 21st, 2019 at 2:24:42 PM
Should you not, rather, forward declare struct _CONTEXT, with CONTEXT being
typedef struct _CONTEXT CONTEXT?
New version of the patch at https://osdn.net/users/cstrauss/pf/
mingw-wsl-patches-win64/scm/blobs/3659981a237068fbb53a235468d380237bfa40eb/
win64-context.patch
Cesar Strauss Apr 21st, 2019 at 3:12:32 PM
maybe we should start by placing the _WIN64 specific declaration in its own
stand-alone header file?
Proposed patch at https://osdn.net/users/cstrauss/pf/mingw-wsl-patches-win64/
scm/blobs/f9c7f78569e48728c628ab0157ddbcc3821089d7/winnt-decl-64.patch
Keith Apr 22nd, 2019 at 7:35:04 AM
@Cesar Strauss
I just had to correct one missing instance of ebx->rbx.
Clearly, an oversight on my part; thanks for catching it!
Keith Apr 23rd, 2019 at 5:21:21 AM
@Cesar Strauss, I've pulled current state from your mingw-wsl-patches-win64
fork, into my own mingw-wsl-patches. I've also applied your modified
cpu-features-x86-64.patch on to the tip of my 5.2-trunk development branch, and
reassembled for _WIN32; it generates identical object code to that from the
original _WIN32 only version, so that's looking good for _WIN32 releases. Do
you still want some extra time to verify it for _WIN64, before I hg qfinish it?
Cesar Strauss Apr 23rd, 2019 at 7:39:59 PM
Yes, I need a little more time to verify its behaviour at runtime. I'll quickly
forward port the remaining patches, create a compiler that can generate
executables, and run test programs.
Cesar Strauss Apr 23rd, 2019 at 10:48:08 AM
There's another issue: on Win64, C symbols don't get a leading underscore in
Assembly.
---------------------------------------------------------------------
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:
https://osdn.net/projects/mingw/ticket/37867
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37867
------------------------------
Message: 3
Date: Wed, 08 Jan 2020 09:49:00 -0300
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #37867: Create a 64bit build
environment for the MinGW.org project.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#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:
https://osdn.net//projects/mingw/ticket/37867
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37867
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2020-01-08 09:49 Updated by: cstrauss
Comment:
Keith Apr 24th, 2019 at 1:10:40 PM
on Win64, C symbols don't get a leading underscore in Assembly.
I think I knew this, but failed to fully appreciate its significance
:white_frowning_face: This is actually a rather annoying inconsistency; it
means that every assembly language module will need to be reviewed, and those
which are currently bare .s may need to become .sx, so that the C preprocessor
can handle the symbolic discrepancy.
Before we embark on this, in earnest, I've pushed a refresh of
cpu-features-win64.patch; does it address the issue adequately, for this
particular case?
Keith Apr 25th, 2019 at 7:08:20 AM
@Cesar Strauss
depends on missing declarations: XMM_SAVE_AREA32, NEON128 and M128A. I
can't find them in MSDN.
Neither can I; typical of Microsoft's woeful failure to provide adequate
documentation:white_frowning_face: However, I did find these (under BSD, or
X-Open/MIT licences):
http://winappdbg.sourceforge.net/doc/v1.3/
winappdbg.win32.context_amd64-pysrc.html#XMM_SAVE_AREA32
http://winappdbg.sourceforge.net/doc/v1.3/winappdbg.win32.defines-pysrc.html#
M128A
https://github.com/dotnet/coreclr/blob/master/src/inc/crosscomp.h
Keith Apr 25th, 2019 at 5:57:45 PM
on Win64, C symbols don't get a leading underscore in Assembly.
That's actually the least of the potential problems with assembly language
implementations; more significant, is the change in function calling
conventions, and in particular, the argument passing protocol: https://
docs.microsoft.com/en-gb/cpp/build/x64-calling-convention?view=vs-2017
Cesar Strauss Apr 25th, 2019 at 9:07:36 PM
Before we embark on this, in earnest, I've pushed a refresh of
cpu-features-win64.patch; does it address the issue adequately, for this
particular case?
Yes, it does.
Cesar Strauss Apr 26th, 2019 at 6:03:27 AM
I'll also look at the assembly output of the compiler to better understand the
calling conventions.
---------------------------------------------------------------------
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:
https://osdn.net/projects/mingw/ticket/37867
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37867
------------------------------
Message: 4
Date: Wed, 08 Jan 2020 09:49:32 -0300
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #37867: Create a 64bit build
environment for the MinGW.org project.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#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:
https://osdn.net//projects/mingw/ticket/37867
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37867
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2020-01-08 09:49 Updated by: cstrauss
Comment:
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:
https://osdn.net/projects/mingw/ticket/37867
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37867
------------------------------
Subject: Digest Footer
_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify
------------------------------
End of MinGW-Notify Digest, Vol 28, Issue 5
*******************************************