Swap the r10 and rcx registers in the amd64 trapframe so that the
authorguenther <guenther@openbsd.org>
Wed, 31 Jan 2024 06:06:28 +0000 (06:06 +0000)
committerguenther <guenther@openbsd.org>
Wed, 31 Jan 2024 06:06:28 +0000 (06:06 +0000)
commit3b697b3f3b7c3ab2824322d0329e12df82df41a4
treeea4df87b83646ce2fa7f86178e6b17212b2d0915
parent7d13b9d97f0bb94501100f764f91d485a6d4c156
Swap the r10 and rcx registers in the amd64 trapframe so that the
first six entries are in the same order as syscall arguments, such
that syscall() can just use the trapframe as the argument vector
for mi_syscall() and not need to reorder into another buffer on the
stack.  This doesn't affect coredump layout or ptrace(2), but does
affect kernel crash dumps.

Possibility noted during miod@'s cleanup of the MD syscall()
implementations

ok mlarkin@ kurt@
gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c
sys/arch/amd64/amd64/trap.c
sys/arch/amd64/include/frame.h