Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Carlo Bramini <carlo.bramix@libero.it>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] Aarch64-SIM: BLR opcode does not support XLR register properly.
Date: Wed, 05 Feb 2020 17:25:00 -0000	[thread overview]
Message-ID: <1213380262.792613.1580923536993@mail1.libero.it> (raw)
In-Reply-To: <1071809675.829947.1580922883716@mail1.libero.it>

[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]

Hello,
please excuse me, I just discovered that there are multiple ChangeLog files and probably I have to provide an entry for the right one. Sorry for my mistake in previous message.

Sincerely.

---

./sim/aarch64/ChangeLog:

2020-02-05 Carlo Bramini <carlo_bramini@users.sourceforge.net>

* simulator.c: Fix BLR opcode for supporting XLR register as source operand.

---


> ---------- Messaggio originale ----------Da: Carlo Bramini <carlo.bramix@libero.it>A: gdb-patches@sourceware.org
> Data: 5 febbraio 2020 alle 18.14Oggetto: Re: [PATCH] Aarch64-SIM: BLR opcode does not support XLR register properly.
> Hello,thank you very much for your quick reply.I made a new patch, which includes just the fix to BLR opcode. I'm also adding an entry for the ChangeLog file, as you requested.
> Sincerely.
> ---
> ./ChangeLog:
> 2020-02-05 Carlo Bramini <carlo_bramini@users.sourceforge.net>
> * sim/aarch64/simulator.c: Fix BLR opcode for supporting XLR register as source operand.
> 
> ---
> > Il 5 febbraio 2020 alle 12.39 Luis Machado <luis.machado@linaro.org> ha scritto:
> > 
> > Hi Carlo,
> > Thanks for the patch.
> > I'd include just the fix itself and not any other cosmetic changes tothe code, like moving/removing return statements. The statements areuseless, but it makes the patch cleaner that way.
> > It would also make it clear it is a reasonably obvious fix, which can bepushed without a FSF assignment. Though it would be nice to have one inplace for further contributions.
> > Other than that, it is missing a ChangeLog entry, but it is not a bigdeal for this particular change as one can quickly write one.
> > Luis
> > On 2/5/20 8:21 AM, Carlo Bramini wrote:> After a suggestion received at your bugzilla, I'm posting here a patch. Detailed explanation can be found here:
> > > https://sourceware.org/bugzilla/show_bug.cgi?id=25318
> > > 
> > > Thank you very much for your time and your support.Sincerely.

[-- Attachment #2: sim_aarch64.patch --]
[-- Type: application/octet-stream, Size: 669 bytes --]

diff --git a/sim/aarch64/simulator.c b/sim/aarch64/simulator.c
index 84919d6b1f..715a7f4b6b 100644
--- a/sim/aarch64/simulator.c
+++ b/sim/aarch64/simulator.c
@@ -13437,13 +13437,13 @@ br (sim_cpu *cpu)
 static void
 blr (sim_cpu *cpu)
 {
-  unsigned rn = INSTR (9, 5);
+  uint64_t target = aarch64_get_reg_u64 (cpu, INSTR (9, 5), NO_SP);
 
   TRACE_DECODE (cpu, "emulated at line %d", __LINE__);
   /* The pseudo code in the spec says we update LR before fetching.
      the value from the rn.  */
   aarch64_save_LR (cpu);
-  aarch64_set_next_PC (cpu, aarch64_get_reg_u64 (cpu, rn, NO_SP));
+  aarch64_set_next_PC (cpu, target);
 
   if (TRACE_BRANCH_P (cpu))
     {

  reply	other threads:[~2020-02-05 17:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 11:21 Carlo Bramini
2020-02-05 11:39 ` Luis Machado
2020-02-05 17:14   ` Carlo Bramini
2020-02-05 17:25     ` Carlo Bramini [this message]
2020-02-06 22:59       ` Andrew Burgess

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=1213380262.792613.1580923536993@mail1.libero.it \
    --to=carlo.bramix@libero.it \
    --cc=gdb-patches@sourceware.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