]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: partially depessimize cpu_fetch_syscall_args and cpu_set_syscall_retval
authormjg <mjg@FreeBSD.org>
Sat, 13 Oct 2018 21:18:31 +0000 (21:18 +0000)
committermjg <mjg@FreeBSD.org>
Sat, 13 Oct 2018 21:18:31 +0000 (21:18 +0000)
commitc326e57b70c297b646af4a78f7f626357a9f4b4f
tree314feeded4ef2a84f71a5aae7dc9de095272c62f
parent422b26018fdd22bab6be9cec4e47a5af26185f27
amd64: partially depessimize cpu_fetch_syscall_args and cpu_set_syscall_retval

Vast majority of syscalls take 6 or less arguments. Move handling of other
cases to a fallback function. Similarly, special casing for _syscall
and __syscall
magic syscalls is moved away.

Return is almost always 0. The change replaces 3 branches with 1 in the common
case. Also the 'frame' variable convinces clang not to reload it on each access.

Reviewed by: kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17542
sys/amd64/amd64/trap.c
sys/amd64/amd64/vm_machdep.c
sys/amd64/include/proc.h