Delivered-To: patches@linaro.org
Received: by 10.140.89.233 with SMTP id v96csp178062qgd;
Thu, 30 Mar 2017 03:52:35 -0700 (PDT)
X-Received: by 10.28.147.147 with SMTP id v141mr2986802wmd.110.1490871155010;
Thu, 30 Mar 2017 03:52:35 -0700 (PDT)
Return-Path: <pm215@archaic.org.uk>
Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2])
by mx.google.com with ESMTPS id
p8si2966205wrd.188.2017.03.30.03.52.34 for <patches@linaro.org>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Thu, 30 Mar 2017 03:52:34 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of
pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted
sender) client-ip=2001:8b0:1d0::2;
Authentication-Results: mx.google.com;
spf=pass (google.com: best guess record for domain of
pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted
sender) smtp.mailfrom=pm215@archaic.org.uk;
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org
Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2)
(envelope-from <pm215@archaic.org.uk>)
id 1ctXgu-00039O-Nf; Thu, 30 Mar 2017 11:52:32 +0100
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org, Richard Henderson <rth@twiddle.net>,
=?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= <f4bug@amsat.org>
Subject: [PATCH v2 for-2.9 0/2] tcg/sparc: zero extend ld/st helper args
Date: Thu, 30 Mar 2017 11:52:29 +0100
Message-Id: <1490871151-29029-1-git-send-email-peter.maydell@linaro.org>
X-Mailer: git-send-email 2.7.4
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