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:14:00 -0000 [thread overview]
Message-ID: <1071809675.829947.1580922883716@mail1.libero.it> (raw)
In-Reply-To: <9c6afb97-dabc-3d2f-4980-db387930a8e6@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]
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 to
> the code, like moving/removing return statements. The statements are
> useless, but it makes the patch cleaner that way.
>
> It would also make it clear it is a reasonably obvious fix, which can be
> pushed without a FSF assignment. Though it would be nice to have one in
> place for further contributions.
>
> Other than that, it is missing a ChangeLog entry, but it is not a big
> deal 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))
{
next prev parent reply other threads:[~2020-02-05 17:14 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 [this message]
2020-02-05 17:25 ` Carlo Bramini
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=1071809675.829947.1580922883716@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