public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Build gcc question
@ 2021-09-06 22:44 Gary Oblock
  2021-09-07  7:21 ` s390 port Joe Monk
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Oblock @ 2021-09-06 22:44 UTC (permalink / raw)
  To: gcc

I've got a really amazingly bizarre bug, when running my modified
gcc under gdb, I see some bewildering behavior. So, before I start
debugging at the assembly level, I'd like to see some .s files.
This led me to try adding "-save-temps" to the CFLAGS and
CXXFLAGS on the make command line. This in turn led to plethora
of different assembly errors. Is this supposed to happen
and is there another way to preserve .s files?

Thanks,

Gary


CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Ampere Computing or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. Any unauthorized review, copying, or distribution of this email (or any attachments thereto) is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: s390 port
  2021-09-06 22:44 Build gcc question Gary Oblock
@ 2021-09-07  7:21 ` Joe Monk
  2021-09-08  3:46   ` Paul Edwards
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Monk @ 2021-09-07  7:21 UTC (permalink / raw)
  To: Paul Edwards; +Cc: gcc

It is unclear how this would even work.

For instance, the LA instruction clears the top bit.

Also, instructions like LPR, LNR, BXLE, BXH all treat the value in the
register as signed, so the top bit is not available.

Joe

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: s390 port
  2021-09-07  7:21 ` s390 port Joe Monk
@ 2021-09-08  3:46   ` Paul Edwards
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Edwards @ 2021-09-08  3:46 UTC (permalink / raw)
  To: Joe Monk; +Cc: gcc

Hi Joe.

Thanks for your comments.

> It is unclear how this would even work. 

> For instance, the LA instruction clears the top bit.

In AM64, LA does not clear any bits.

> Also, instructions like LPR, LNR,

These operate on data registers, not addresses,
and will continue to work unchanged.

> BXLE, BXH all treat the value in the register as signed,
> so the top bit is not available.

These are already a problem if you are putting
addresses in them and it is approaching the 2 GiB
mark. The POP has a special mention of that.

Fun fact: The z/Arch POP has the same problem with
the G version of those instructions, when it hits the
63-bit mark, but the POP incorrectly states that the
problem occurs near the 64-bit mark. I reported the
problem with the POP but nothing seems to have
been done.

The solution is to drop these instructions from the
repertoire. C-generated assembler for both i370 and
s390 targets does not use these.

BFN. Paul.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-08  3:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 22:44 Build gcc question Gary Oblock
2021-09-07  7:21 ` s390 port Joe Monk
2021-09-08  3:46   ` Paul Edwards

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).