arch-riscv,sim: Support clone syscall in RISC-V
arch-riscv,sim: Support clone syscall in RISC-V

(1) This patch sets a correct order of clone syscall's arguments for
RISC-V. Linux kernel 4.15 uses CLONE_BACKWARDS flag by default for
RISC-V. The flag in the Linux kernel defines the list of clone syscall's
arguments in the following order:

  clone_flags   (flags)
  newsp         (newStack)
  parent_tidptr (ptidPtr)
  tls           (tlsPtr)
  child_tidptr  (ctidPtr)

Code reference:
  https://github.com/riscv/riscv-linux/blob/master/kernel/fork.c
  https://github.com/riscv/riscv-linux/blob/master/arch/riscv/Kconfig

(2) This patch copies a parent thread's register values to its child
thread in clone syscall.

Change-Id: I2eb1c8e80990861080ce7153503ed784fb2c7bdf
Reviewed-on: https://gem5-review.googlesource.com/6904
Maintainer: Brandon Potter <0c4047814a967fe28855a3d9d73d9b4959444c57@amd.com>
Reviewed-by: Alec Roelke <8e4f8facd4fb6c7d77135df4850f69a92e6a8660@virginia.edu>

gem5/gem5,TUD-OS/gem5-dtu,TUD-OS/gem5-dtu,TUD-OS/gem5-dtu,gem5/gem5,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,gem5/gem5,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,TUD-OS/gem5-dtu