All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] tcg: aarch64: use 32-bit offset for 32-bit user-mode emulation
@ 2015-07-15 15:26 Paolo Bonzini
  2015-07-15 15:27 ` [Qemu-devel] [PATCH 1/2] tcg: aarch64: add ext argument to tcg_out_insn_3310 Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Paolo Bonzini @ 2015-07-15 15:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: claudio.fontana, aurelien, rth

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-23 21:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-15 15:26 [Qemu-devel] [PATCH 0/2] tcg: aarch64: use 32-bit offset for 32-bit user-mode emulation Paolo Bonzini
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.