summaryrefslogtreecommitdiffstats
path: root/linux-user/i386
diff options
context:
space:
mode:
authorPeter Maydell2013-07-16 19:44:57 +0200
committerRiku Voipio2013-07-22 20:54:36 +0200
commit4ce6243dc6216e35b5b691078ffa856463bfa8db (patch)
tree766e18e8257a50fa1aead446fe6178be9b9c4f56 /linux-user/i386
parentlinux-user: Add missing 'break' in i386 get_thread_area syscall (diff)
downloadqemu-4ce6243dc6216e35b5b691078ffa856463bfa8db.tar.gz
qemu-4ce6243dc6216e35b5b691078ffa856463bfa8db.tar.xz
qemu-4ce6243dc6216e35b5b691078ffa856463bfa8db.zip
linux-user: Clean up handling of clone() argument order
Linux manages to have three separate orderings of the arguments to the clone() syscall on different architectures. In the kernel these are selected via CONFIG_CLONE_BACKWARDS and CONFIG_CLONE_BACKWARDS2. Clean up our implementation of this to use similar #define names rather than a TARGET_* ifdef ladder. This includes behaviour changes fixing bugs on cris, x86-64, m68k, openrisc and unicore32. cris had explicit but wrong handling; the others were just incorrectly using QEMU's default, which happened to be the equivalent of CONFIG_CLONE_BACKWARDS. (unicore32 appears to be broken in the mainline kernel in that it tries to use arg3 for both parent_tidptr and newtls simultaneously -- we don't attempt to emulate this bug...) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/i386')
-rw-r--r--linux-user/i386/syscall.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-user/i386/syscall.h b/linux-user/i386/syscall.h
index 266e2c4c83..12b8c3b672 100644
--- a/linux-user/i386/syscall.h
+++ b/linux-user/i386/syscall.h
@@ -144,3 +144,5 @@ struct target_vm86plus_struct {
};
#define UNAME_MACHINE "i686"
+
+#define TARGET_CLONE_BACKWARDS