From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54892 invoked by alias); 29 Nov 2018 08:58:23 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 54880 invoked by uid 89); 29 Nov 2018 08:58:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-100.9 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=yselkowiredhatcom, yselkowi@redhat.com, medical, Medical X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.134) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Nov 2018 08:58:20 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N7Qkv-1fKdIC1TZN-017oRb; Thu, 29 Nov 2018 09:58:17 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id EBC84A805AD; Thu, 29 Nov 2018 09:58:16 +0100 (CET) Date: Thu, 29 Nov 2018 08:58:00 -0000 From: Corinna Vinschen To: Sam Habiel , cygwin@cygwin.com Subject: Re: 32 bit vs 64 bit Cygwin, followup Message-ID: <20181129085816.GV30649@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: Sam Habiel , cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/0P/MvzTfyTu5j9Q" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-11/txt/msg00232.txt.bz2 --/0P/MvzTfyTu5j9Q Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2026 Please, no top-posting. On Nov 28 11:06, Sam Habiel wrote: > Yaakov, >=20 > On Wed, Nov 28, 2018 at 11:01 AM Yaakov Selkowitz w= rote: > > > > On Mon, 2018-11-26 at 14:07 -0500, Sam Habiel wrote: > > > Hello everybody, > > > > > > In this message > > > (https://www.sourceware.org/ml/cygwin/2018-11/msg00190.html), Corinna > > > (Hi Corinna!) says: > > > > > > "Don't do that. Use 64 bit Cygwin whenever possible. 32 bit is a lo= st cause." > > > > > > I would like to mention why I am still using 32 bit Cygwin. > > > > > > I maintain a port of a database called GT.M > > > (https://en.wikipedia.org/wiki/GT.M) on Cygwin. I work with Electronic > > > Medical Records that run on this database. GT.M contains a large > > > amount of assembly code, written to run on the x32 Linux ABI and the > > > AMD x64 ABI. It's was very easy to get the x32 Linux ABI to run on > > > Cygwin x32; Cygwin x64 on the other hand uses the Windows x64 ABI, > > > which is very different than the AMD ABI (more detail here: > > > https://eli.thegreenplace.net/2011/09/06/stack-frame-layout-on-x86-64= /). > > > I don't have the expertise nor the time to rewrite a lot of assembly > > > code to use the Windows x64 ABI. There are about 100 source code files > > > that are in assembly. > > > > -mabi=3Dsysv ? > > > Are you telling me that gcc has a flag to support AMD ABI on Cygwin > x64? The assembly code is not standalone; it gets called from C code > and calls C code. That's what he's telling you. However, you have to interact with the MS ABI(*) as well as soon as you call external library functions so it makes sense to keep your C code in MS ABI. For the assembler functions, you can just tell the compiler they are in SYSV ABI by adding a function attribute to the declaration: int asm_func (args) __attribute__ ((sysv_abi)) Good luck, Corinna (*) Just keep in mind that Cygwin is LP64, not LLP64: https://cygwin.com/faq/faq.html#faq.programming.64bitporting --=20 Corinna Vinschen Cygwin Maintainer --/0P/MvzTfyTu5j9Q Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlv/qigACgkQ9TYGna5E T6APzQ//cAOBdFAV1Dn4b49lG/9FSnWjurIkzEZejvzKyXQBeL2b/etHkfFB+Vmc /Ej2vAQRfotVrYwNxjIA76OOgDRZ/r6Isx5Ms1El/XSM9fBiQ371QMiSsGwQ7vvP MkNEh1P5eMY0Wrt+d85InBy0t1Eu6DaM9TYRIX+wt71ULOILTSziEiRyg6DIvzqn 3oaN3wIRz8a90y2odOObXWOvmoJgz0DVsLyduC585UBMm9sr5Jfl4w2jbnWBY4RS nD2zWjFJz/vO1CYErWRZO1jOBIHGuB68HXl4Jp/4upuS53ALAuJbVYLqBTQ2ZdXh CsYajH0Q1u9/bCeQ/g7Gzwrf0YmjxOV+GZ9+M9gQ0/CaFM3B+h+wvsMZTlXUE1bz WKvZckDcltAlvss0kWojmm4u4+A3HiiUlTn7ctZewSEXnfmPslevLG9EM+lE8X3/ 2MfBxmV32QUqnwusEN0Bh9bA+P4y/mRYzlOaJUGUb0PoXNMJsOuy2OKzDAHNOCKy XT195A4E594aWiiaq+9YBgRBJjOoZcBHpPBycnXC1gc6ICO4T5kiNiVbRxrzU36v MdvVPGotPFkBDc5j1VtXNVwgEQIiu8IbA50wmZRCV6N+3g1JxJVkn11NWExINSvu HKnrDLfuSzUGyE+scpJ1CoFOGJhU4O9OtPZ1AhKeNUDQMJFbnuI= =7zoy -----END PGP SIGNATURE----- --/0P/MvzTfyTu5j9Q--