This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC]: Fix Ada boostrap failure on S/390 with -mzarch
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 03 Apr 2017 18:18:09 +0200
- Subject: Re: [RFC]: Fix Ada boostrap failure on S/390 with -mzarch
- Authentication-results: sourceware.org; auth=none
- References: <20170403142327.GA29110@maggie>
> On S/390 UNITS_PER_WORD is:
> 8 with -m64
> 4 with -m31
> 8 with -m31 -mzarch
>
> This has been chosen to support use of 64 bit registers also in 32 bit
> code. Code compiled with -m31 -mzarch is supposed to adhere to the 32
> bit ABI. In order to make that work it was required to prevent
> UNITS_PER_WORD from being used in ABI-relevant contexts. That's why
> Ulrich added the TARGET_UNWIND_WORD_MODE in 2008 (for SPU).
We do that for 32-bit SPARC on Solaris (-mv8plus) but UNITS_PER_WORD is 4.
> Now I could either fix this by reverting that change for S/390
> (similiar to what Andreas Schwab did to fix the BZ) or I could just
> use the size of the long data type (as we do in the ABI-relevant parts
> of the backend as well). Which one do you prefer?
Having System.Word_Size != Standard'Word_Size is a bit disturbing. Does it
work to change only Memory_Size to 2 ** Long_Integer'Size? This will also
correct the definition of Address below.
--
Eric Botcazou