From: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
To: ebotcazou@adacore.com
Cc: gcc-patches@gcc.gnu.org
Subject: [RFC]: Fix Ada boostrap failure on S/390 with -mzarch
Date: Mon, 03 Apr 2017 14:23:00 -0000 [thread overview]
Message-ID: <20170403142327.GA29110@maggie> (raw)
Hi Eric,
I ran into a similiar problem as PR80117 on S/390 starting with your
patch merging the system*.ads files for some biarch plattforms.
Starting with that change GCC does not bootstrap on S/390 when
configured with --with-mode=zarch.
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).
More target hooks were needed for UNITS_PER_WORD uses in libgcc:
TARGET_LIBGCC_CMP_RETURN_MODE, and TARGET_LIBGCC_SHIFT_COUNT_MODE.
The use of the UNITS_PER_WORD in the system.ads files looks like
adding another ABI/API-relevant use to me.
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?
Bye,
-Andreas-
diff --git a/gcc/ada/system-linux-s390.ads b/gcc/ada/system-linux-s390.ads
index 485a8de..144c46d 100644
--- a/gcc/ada/system-linux-s390.ads
+++ b/gcc/ada/system-linux-s390.ads
@@ -69,7 +69,7 @@ package System is
Null_Address : constant Address;
Storage_Unit : constant := 8;
- Word_Size : constant := Standard'Word_Size;
+ Word_Size : constant := Long_Integer'Size;
Memory_Size : constant := 2 ** Word_Size;
-- Address comparison
next reply other threads:[~2017-04-03 14:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 14:23 Andreas Krebbel [this message]
2017-04-03 16:18 ` Eric Botcazou
2017-04-04 11:46 ` Andreas Krebbel
2017-04-04 17:42 ` Eric Botcazou
2017-05-10 2:54 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170403142327.GA29110@maggie \
--to=krebbel@linux.vnet.ibm.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).