* [Qemu-devel] [PATCH 1/1] linux-user: AArch64: Fix exclusive store of the zero register
@ 2014-02-18 16:46 Janne Grunau
2014-02-18 16:48 ` Peter Maydell
2014-02-18 17:26 ` Alex Bennée
0 siblings, 2 replies; 3+ messages in thread
From: Janne Grunau @ 2014-02-18 16:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Alex Bennée
Signed-off-by: Janne Grunau <j@jannau.net>
---
linux-user/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index cabc9e1..9192977 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -953,7 +953,8 @@ static int do_strex_a64(CPUARMState *env)
goto finish;
}
}
- val = env->xregs[rt];
+ /* handle the zero register */
+ val = rt == 31 ? 0 : env->xregs[rt];
switch (size) {
case 0:
segv = put_user_u8(val, addr);
@@ -972,7 +973,8 @@ static int do_strex_a64(CPUARMState *env)
goto error;
}
if (is_pair) {
- val = env->xregs[rt2];
+ /* handle the zero register */
+ val = rt2 == 31 ? 0 : env->xregs[rt2];
if (size == 2) {
segv = put_user_u32(val, addr + 4);
} else {
--
1.8.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] linux-user: AArch64: Fix exclusive store of the zero register
2014-02-18 16:46 [Qemu-devel] [PATCH 1/1] linux-user: AArch64: Fix exclusive store of the zero register Janne Grunau
@ 2014-02-18 16:48 ` Peter Maydell
2014-02-18 17:26 ` Alex Bennée
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2014-02-18 16:48 UTC (permalink / raw)
To: Janne Grunau; +Cc: Alex Bennée, QEMU Developers
On 18 February 2014 16:46, Janne Grunau <j@jannau.net> wrote:
> Signed-off-by: Janne Grunau <j@jannau.net>
> ---
> linux-user/main.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] linux-user: AArch64: Fix exclusive store of the zero register
2014-02-18 16:46 [Qemu-devel] [PATCH 1/1] linux-user: AArch64: Fix exclusive store of the zero register Janne Grunau
2014-02-18 16:48 ` Peter Maydell
@ 2014-02-18 17:26 ` Alex Bennée
1 sibling, 0 replies; 3+ messages in thread
From: Alex Bennée @ 2014-02-18 17:26 UTC (permalink / raw)
To: Janne Grunau; +Cc: Peter Maydell, qemu-devel
j@jannau.net writes:
> Signed-off-by: Janne Grunau <j@jannau.net>
> ---
> linux-user/main.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/linux-user/main.c b/linux-user/main.c
> index cabc9e1..9192977 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -953,7 +953,8 @@ static int do_strex_a64(CPUARMState *env)
> goto finish;
> }
> }
> - val = env->xregs[rt];
> + /* handle the zero register */
> + val = rt == 31 ? 0 : env->xregs[rt];
> switch (size) {
> case 0:
> segv = put_user_u8(val, addr);
> @@ -972,7 +973,8 @@ static int do_strex_a64(CPUARMState *env)
> goto error;
> }
> if (is_pair) {
> - val = env->xregs[rt2];
> + /* handle the zero register */
> + val = rt2 == 31 ? 0 : env->xregs[rt2];
> if (size == 2) {
> segv = put_user_u32(val, addr + 4);
> } else {
Looks good to me. I'll have a scan through the other helpers to see if
we've missed any other similar thinkos.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-18 17:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18 16:46 [Qemu-devel] [PATCH 1/1] linux-user: AArch64: Fix exclusive store of the zero register Janne Grunau
2014-02-18 16:48 ` Peter Maydell
2014-02-18 17:26 ` Alex Bennée
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).