linux-user: AArch64: Fix exclusive store of the zero register
Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
60510aed69
commit
2ea5a2ca1f
@ -953,7 +953,8 @@ static int do_strex_a64(CPUARMState *env)
|
|||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val = env->xregs[rt];
|
/* handle the zero register */
|
||||||
|
val = rt == 31 ? 0 : env->xregs[rt];
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 0:
|
case 0:
|
||||||
segv = put_user_u8(val, addr);
|
segv = put_user_u8(val, addr);
|
||||||
@ -972,7 +973,8 @@ static int do_strex_a64(CPUARMState *env)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (is_pair) {
|
if (is_pair) {
|
||||||
val = env->xregs[rt2];
|
/* handle the zero register */
|
||||||
|
val = rt2 == 31 ? 0 : env->xregs[rt2];
|
||||||
if (size == 2) {
|
if (size == 2) {
|
||||||
segv = put_user_u32(val, addr + 4);
|
segv = put_user_u32(val, addr + 4);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user