public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: "Sébastien Michelland"
	<sebastien.michelland@lcis.grenoble-inp.fr>,
	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:01:35 +0100	[thread overview]
Message-ID: <13e3b422-7785-4780-bb9f-9b4d9c30b96b@arm.com> (raw)
In-Reply-To: <cf180080-362f-471e-b55b-021b27862944@lcis.grenoble-inp.fr>

On 4/10/24 08:03, Sébastien Michelland wrote:
> 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.

Ah, sorry. I misread the code as handling all GPR's until 15. So you can ignore my comment.

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

Indeed.

> 
> Sébastien

  reply	other threads:[~2024-04-10  8:02 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
2024-04-10  8:01     ` Luis Machado [this message]
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=13e3b422-7785-4780-bb9f-9b4d9c30b96b@arm.com \
    --to=luis.machado@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sebastien.michelland@lcis.grenoble-inp.fr \
    --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).