sim-se: Use CONFIG_CLONE_BACKWARDS for Arm
authorAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 9 Jan 2019 14:31:52 +0000 (14:31 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Thu, 10 Jan 2019 17:50:28 +0000 (17:50 +0000)
Linxu on Arm users the CLONE_BACKWARDS argument order for the clone
syscall.

Change-Id: I48deb4f03140c9d4ef7a89e3e33813e76777f999
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Cc: Giacomo Travaglini <giacomo.travaglini@arm.com>
Cc: Javier Setoain <javier.setoain@arm.com>
Cc: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15416
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

src/sim/syscall_emul.hh

index ba607c9cbed9377968882f5ccc54d5fb3b25b9c2..1ff046033c62d7f6d72ea8c5ea8b98b4ed359d0b 100644 (file)
@@ -1273,9 +1273,9 @@ cloneFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc)
     TheISA::IntReg newStack = p->getSyscallArg(tc, index);
     Addr ptidPtr = p->getSyscallArg(tc, index);
 
-#if THE_ISA == RISCV_ISA
+#if THE_ISA == RISCV_ISA or THE_ISA == ARM_ISA
     /**
-     * Linux kernel 4.15 sets CLONE_BACKWARDS flag for RISC-V.
+     * Linux sets CLONE_BACKWARDS flag for RISC-V and Arm.
      * The flag defines the list of clone() arguments in the following
      * order: flags -> newStack -> ptidPtr -> tlsPtr -> ctidPtr
      */