On Sun, Aug 13, 2017 at 9:13 AM, Mark Kettenis <mark.kette...@xs4all.nl> wrote: > Other architectures have this assignment in their setregs() > implementation. I don't fully understand why though. Diff below > makes arm64 consistent with the rest, but I don't think it fixes > anything.
It does, but I think there's a better way to fix it. As I read it, we're currently preserving %rdx across execve() because syscall() restores %rdx from retval[1]. Arguably, the better way is for LP64 archs to stop touching retval[1] at all, as it's completely unnecessary there. We eliminated the use of retval[1] in *fork making its only use for lseek()'s long long return value on ILP32 archs. Philip Guenther