qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 for-2.9 0/2] tcg/sparc: zero extend ld/st helper args
@ 2017-03-30 10:52 Peter Maydell
  2017-03-30 10:52 ` [Qemu-devel] [PATCH v2 for-2.9 1/2] tcg/sparc: Zero extend data argument to store helpers Peter Maydell
  2017-03-30 10:52 ` [Qemu-devel] [PATCH v2 for-2.9 2/2] tcg/sparc: Zero extend address argument to ld/st helpers Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Maydell @ 2017-03-30 10:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches, Richard Henderson, Philippe Mathieu-Daudé

These patches fix problems with the SPARC TCG backend code
which calls the load and store helpers. Where the argument
being passed to the helper is narrower than the size of the
native register, the SPARC calling convention requires that
we extend it to the register size, but we weren't doing that.
This meant we passed the host code registers which might have
garbage in the high parts, and if the host code was built
with optimization this resulted in wrong behaviour.

Changes v1->v2:
 * fix argument order to emit_extend() in 32-bit host case
 * switch on (op & MO_SIZE) rather than just op

thanks
-- PMM

Peter Maydell (2):
  tcg/sparc: Zero extend data argument to store helpers
  tcg/sparc: Zero extend address argument to ld/st helpers

 tcg/sparc/tcg-target.inc.c | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-03-30 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-30 10:52 [Qemu-devel] [PATCH v2 for-2.9 0/2] tcg/sparc: zero extend ld/st helper args Peter Maydell
2017-03-30 10:52 ` [Qemu-devel] [PATCH v2 for-2.9 1/2] tcg/sparc: Zero extend data argument to store helpers Peter Maydell
2017-03-30 17:45   ` Philippe Mathieu-Daudé
2017-03-30 10:52 ` [Qemu-devel] [PATCH v2 for-2.9 2/2] tcg/sparc: Zero extend address argument to ld/st helpers Peter Maydell

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).