From: Mike Frysinger <vapier@gentoo.org>
To: Jim Wilson <jim.wilson@linaro.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] aarch64 sim big-endian support
Date: Fri, 10 Jun 2016 18:06:00 -0000 [thread overview]
Message-ID: <20160610180645.GA4053@vapier.lan> (raw)
In-Reply-To: <CABXYE2UfwrSxRADdgFRuBJzTM-1_DPaP5LJSULSQ-808X8dccQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]
On 02 Jun 2016 19:36, Jim Wilson wrote:
> aarch64_step (sim_cpu *cpu)
> {
> uint64_t pc = aarch64_get_PC (cpu);
> + enum bfd_endian saved_target_byte_order;
>
> if (pc == TOP_LEVEL_RETURN_PC)
> return FALSE;
>
> aarch64_set_next_PC (cpu, pc + 4);
> +
> + /* Code is always little-endian. */
> + saved_target_byte_order = current_target_byte_order;
> + current_target_byte_order = BFD_ENDIAN_LITTLE;
> aarch64_get_instr (cpu) = aarch64_get_mem_u32 (cpu, pc);
> + current_target_byte_order = saved_target_byte_order;
i don't think you should be messing with global state. the sim core
has functions for reading raw opcodes if that's what you need.
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-06-10 18:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 2:36 Jim Wilson
2016-06-10 16:24 ` Jim Wilson
2016-06-13 12:38 ` Nick Clifton
2016-06-30 1:33 ` Jim Wilson
2016-06-30 8:13 ` Nick Clifton
2016-06-10 18:06 ` Mike Frysinger [this message]
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=20160610180645.GA4053@vapier.lan \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
--cc=jim.wilson@linaro.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