public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Matthew Malcomson <matmal01@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/ARM/heads/morello)] In fake-capability, do not offset fake-capability DWARF register numbers
Date: Mon, 14 Mar 2022 10:36:23 +0000 (GMT)	[thread overview]
Message-ID: <20220314103623.5D422385E00F@sourceware.org> (raw)

https://gcc.gnu.org/g:a7849f966e784154b206d77bea5e139e798ab25f

commit a7849f966e784154b206d77bea5e139e798ab25f
Author: Stam Markianos-Wright <stam.markianos-wright@arm.com>
Date:   Tue Mar 8 16:19:01 2022 +0000

    In fake-capability, do not offset fake-capability DWARF register numbers
    
    A simple fix to fix an ICE that I previously introduced
    to fake-capability bootstrap and regression testing.
    
    The change here is to consider TARGET_CAPABILITY_FAKE as well
    as the machine mode when deciding if to offset a reg-no
    by 198. This is to exclude fake-cap from applying the
    offset (in fake-cap we could still get here with the mode
    as CADImode, so the offset would incorrectly be applied)

Diff:
---
 gcc/config/aarch64/aarch64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index c0cf20cbea4..1d07c4fc66d 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -2199,7 +2199,7 @@ aarch64_dbx_register_number (unsigned regno, machine_mode mode)
   /* For Morello capabilities we use a separate set of DWARF registers
      in the range of 198-228 (for the c0-c30 GP registers).  */
    if (GP_REGNUM_P (regno))
-     return (CAPABILITY_MODE_P (mode) ? 198 : 0)
+     return ((CAPABILITY_MODE_P (mode) && !TARGET_CAPABILITY_FAKE) ? 198 : 0)
 	      + AARCH64_DWARF_R0 + regno - R0_REGNUM;
     /* MORELLO TODO:
     I believe we do not need to do anything here for the PCC (r230) or the


                 reply	other threads:[~2022-03-14 10:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220314103623.5D422385E00F@sourceware.org \
    --to=matmal01@gcc.gnu.org \
    --cc=gcc-cvs@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).