From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [RFC] Streamlining endian handling in TCG
Date: Wed, 28 Aug 2013 18:28:47 +0100 [thread overview]
Message-ID: <CAFEAcA8Un3bLywmFoa4cFhigEtL7NGGOti2g9pA=AFmRzxSk5Q@mail.gmail.com> (raw)
In-Reply-To: <521E3086.1030003@twiddle.net>
On 28 August 2013 18:16, Richard Henderson <rth@twiddle.net> wrote:
> On 08/28/2013 09:38 AM, Peter Maydell wrote:
>>> (B) Add an additional bit to the "opc" to indicate which endianness is desired.
>>> E.g. 0 = LE, 8 = BE. Expose the opc interface to the translators. At which
>>> point generating a load becomes more like
>>>
>>> tcg_gen_qemu_ld_tl(dest, addr, size | sign | dc->big_endian);
>>>
>>> and the current endianness of the guest becomes a bit on the TB, to be copied
>>> into the DisasContext at the beginning of translation.
>>
>> I guess we deal with ARMv5-style BE32 by having the target
>> emit an explicit XOR TCG op?
>
> Yes. I see no other way to implement that.
>
>> Do we need to overhaul the C interface to the
>> memory system too? (ie ldl_p and friends).
>
> I don't think so, since we already have ldl_{le,be}_p.
Well, what do ldl_p or ldl_phys or any of the other functions
without an le/be qualifier mean any more if "is this CPU in
big endian mode?" now requires you to have a CPUState
to ask? I guess we can tackle that separately from getting
the assumptions on endianness out of the tcg backends
though.
-- PMM
next prev parent reply other threads:[~2013-08-28 17:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 4:39 [Qemu-devel] [PATCH] target-arm: Report unimplemented opcodes (LOG_UNIMP) Stefan Weil
2013-08-28 8:15 ` Peter Maydell
2013-08-28 14:31 ` Richard Henderson
2013-08-28 14:34 ` Peter Maydell
2013-08-28 15:26 ` [Qemu-devel] [RFC] Streamlining endian handling in TCG Richard Henderson
2013-08-28 16:38 ` Peter Maydell
2013-08-28 17:16 ` Richard Henderson
2013-08-28 17:28 ` Peter Maydell [this message]
2013-08-28 17:45 ` Richard Henderson
2013-08-28 17:41 ` Stefan Weil
2013-08-28 20:42 ` Edgar E. Iglesias
2013-08-28 21:06 ` Peter Maydell
2013-08-28 21:23 ` Richard Henderson
2013-09-02 23:42 ` Aurelien Jarno
2013-09-03 15:11 ` Richard Henderson
2013-09-01 15:35 ` [Qemu-devel] [Qemu-trivial] [PATCH] target-arm: Report unimplemented opcodes (LOG_UNIMP) Michael Tokarev
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='CAFEAcA8Un3bLywmFoa4cFhigEtL7NGGOti2g9pA=AFmRzxSk5Q@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 NNTP newsgroup(s).