[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/1] linux-user: AArch64: Fix exclusive store of
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH 1/1] linux-user: AArch64: Fix exclusive store of the zero register |
Date: |
Tue, 18 Feb 2014 17:26:17 +0000 |
User-agent: |
mu4e 0.9.9.6pre2; emacs 24.3.50.5 |
address@hidden writes:
> Signed-off-by: Janne Grunau <address@hidden>
> ---
> 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 <address@hidden>
--
Alex Bennée