diff options
author | Doug Kwan <dougkwan@google.com> | 2014-05-29 09:12:20 -0500 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-06-16 13:24:40 +0200 |
commit | e22c357b3ec01c1141969ae81397d60d52e8c87b (patch) | |
tree | ea4aa04bb90ebfb07fdb0e1d5ad1344871eb3651 /linux-user | |
parent | d90b94cd78af672cdfd52dc3789ab249534c2f40 (diff) | |
download | qemu-e22c357b3ec01c1141969ae81397d60d52e8c87b.zip qemu-e22c357b3ec01c1141969ae81397d60d52e8c87b.tar.gz qemu-e22c357b3ec01c1141969ae81397d60d52e8c87b.tar.bz2 |
target-ppc: Allow little-endian user mode.
This allows running PPC64 little-endian in user mode if target is configured
that way. In PPC64 LE user mode we set MSR.LE during initialization.
Signed-off-by: Doug Kwan <dougkwan@google.com>
Signed-off-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 3e21024..f577e19 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1484,7 +1484,7 @@ static int do_store_exclusive(CPUPPCState *env) { target_ulong addr; target_ulong page_addr; - target_ulong val, val2 __attribute__((unused)); + target_ulong val, val2 __attribute__((unused)) = 0; int flags; int segv = 0; @@ -1527,6 +1527,12 @@ static int do_store_exclusive(CPUPPCState *env) case 8: segv = put_user_u64(val, addr); break; case 16: { if (val2 == env->reserve_val2) { + if (msr_le) { + val2 = val; + val = env->gpr[reg+1]; + } else { + val2 = env->gpr[reg+1]; + } segv = put_user_u64(val, addr); if (!segv) { segv = put_user_u64(val2, addr + 8); |