public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Sébastien Michelland" <sebastien.michelland@lcis.grenoble-inp.fr>
To: Luis Machado <luis.machado@arm.com>, gdb-patches@sourceware.org
Cc: Simon Marchi <simark@simark.ca>
Subject: Re: [PATCH v2] gdb: specify sh pointer register types
Date: Wed, 10 Apr 2024 09:03:39 +0200	[thread overview]
Message-ID: <cf180080-362f-471e-b55b-021b27862944@lcis.grenoble-inp.fr> (raw)
In-Reply-To: <69b67287-9c0e-4ae6-9228-607aa0e34f91@arm.com>

Hi Luis,

> This looks OK to me. Unfortunately it doesn't look like we have
> an active maintainer for SH, so testing might be a bit limited.
> 
> Sounds like Simon had already OK-ed your approach. In any case,
> are you sure all the GPR's should also be typed as data pointer?

I'm not sure I understand; the only GPR that I make a data pointer is 
r15 (the stack pointer). The others remain signed int.

If you mean gbr then its only use (besides reading/writing it directly) 
is as the base for the so-called global addressing modes:

mov.{b,w,l} @(disp, gbr), r0    # r0 = *(gbr + disp)
mov.{b,w,l} r0, @(disp, gbr)    # *(gbr + disp) = r0

As the displacements have a very limited range, this requires gbr to be 
a pointer. My understanding is that it's intended for global pointers 
such as the thread pointer or GOT (for which there is no reserved 
register on SH).

Sébastien

  reply	other threads:[~2024-04-10  7:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01  9:55 Sébastien Michelland
2024-04-09 23:18 ` Luis Machado
2024-04-10  7:03   ` Sébastien Michelland [this message]
2024-04-10  8:01     ` Luis Machado
2024-04-26  8:13 ` [PING] " Sébastien Michelland
2024-04-26 14:00   ` Simon Marchi

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=cf180080-362f-471e-b55b-021b27862944@lcis.grenoble-inp.fr \
    --to=sebastien.michelland@lcis.grenoble-inp.fr \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado@arm.com \
    --cc=simark@simark.ca \
    /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).