From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: claudio.fontana@huawei.com, aurelien@aurel32.net, rth@twiddle.net
Subject: [Qemu-devel] [PATCH 0/2] tcg: aarch64: use 32-bit offset for 32-bit user-mode emulation
Date: Wed, 15 Jul 2015 17:26:59 +0200 [thread overview]
Message-ID: <1436974021-28978-1-git-send-email-pbonzini@redhat.com> (raw)
The register allocator may sometimes pass a 64-bit value to a 32-bit
operation if truncations are considered no-ops by the backend.
When this happens, user-mode emulation may use an incorrect offset
for loads and stores. This affects aarch64 and x86, because other
architectures already zero-extend the offset before using it for a
load or store.
To fix this for aarch64, use the uxtw modifier on load and store
instructions.
Paolo
Paolo Bonzini (2):
tcg: aarch64: add ext argument to tcg_out_insn_3310
tcg: aarch64: use 32-bit offset for 32-bit user-mode emulation
tcg/aarch64/tcg-target.c | 63 +++++++++++++++++++++++++++---------------------
1 file changed, 36 insertions(+), 27 deletions(-)
--
2.4.3
next reply other threads:[~2015-07-15 15:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 15:26 Paolo Bonzini [this message]
2015-07-15 15:27 ` [Qemu-devel] [PATCH 1/2] tcg: aarch64: add ext argument to tcg_out_insn_3310 Paolo Bonzini
2015-07-15 16:09 ` Aurelien Jarno
2015-07-15 15:27 ` [Qemu-devel] [PATCH 2/2] tcg: aarch64: use 32-bit offset for 32-bit user-mode emulation Paolo Bonzini
2015-07-15 16:10 ` Aurelien Jarno
2015-07-23 21:19 ` [Qemu-devel] [PATCH 0/2] " Richard Henderson
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=1436974021-28978-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=aurelien@aurel32.net \
--cc=claudio.fontana@huawei.com \
--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).