From: Peter Maydell <peter.maydell@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] target-arm: crypto: fix BE host support
Date: Fri, 2 Jan 2015 17:36:05 +0000 [thread overview]
Message-ID: <CAFEAcA8OdONLG9m_n7jTorPLYp8hGVRx1+=S-oQwNhUsB2_Y-Q@mail.gmail.com> (raw)
In-Reply-To: <54A6B6A3.9070208@redhat.com>
On 2 January 2015 at 15:17, Laszlo Ersek <lersek@redhat.com> wrote:
> On 01/02/15 15:18, Ard Biesheuvel wrote:
>> (ie if you store 0x112233445566778899aabbccddeeff00 as a 64 bit write
>> to VFP register D0 then regs[0] will be
>> 0x112233445566778899aabbccddeeff00 regardless of host endianness. That
>> is, the least significant 8 bits of D0 will be (regs[0] & 0xff). (This
>> isn't the same number as if you do the union-type-punning thing with
>> union { uint64_t l; uint8_t b[8]; } and look at b[0].)
This example is confusing because I carefully said "64 bit write"
and then used a 128 bit constant. What I meant was:
ie if you store 0x1122334455667788 as a 64 bit write
to VFP register D0 then regs[0] will be
0x1122334455667788 regardless of host endianness.
For 128 bit vectors, if you store
0x112233445566778899aabbccddeeff00 to Q0 then you get
regs[0] == 0x99aabbccddeeff00
regs[1] == 0x1122334455667788
(as is required architecturally in order for a subsequent guest
read from D0 to do the right thing).
-- PMM
next prev parent reply other threads:[~2015-01-02 17:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-02 14:18 [Qemu-devel] [PATCH] target-arm: crypto: fix BE host support Ard Biesheuvel
2015-01-02 15:17 ` Laszlo Ersek
2015-01-02 17:36 ` Peter Maydell [this message]
2015-01-02 19:18 ` Laszlo Ersek
2015-01-02 19:21 ` Ard Biesheuvel
2015-01-05 12:34 ` Peter Maydell
2015-01-05 13:47 ` Ard Biesheuvel
2015-01-05 13:58 ` Peter Maydell
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='CAFEAcA8OdONLG9m_n7jTorPLYp8hGVRx1+=S-oQwNhUsB2_Y-Q@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).