diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2018-10-13 21:18:31 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2018-10-13 21:18:31 +0000 |
commit | 6816c88458148993545f8f81a0fede3a247d715d (patch) | |
tree | 314feeded4ef2a84f71a5aae7dc9de095272c62f /sys/amd64/include/proc.h | |
parent | 9c7d70ee7d49cbc6b834ec0f6f606e7916dc4cd9 (diff) | |
download | src-6816c88458148993545f8f81a0fede3a247d715d.tar.gz src-6816c88458148993545f8f81a0fede3a247d715d.zip |
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
Notes
Notes:
svn path=/head/; revision=339349
Diffstat (limited to 'sys/amd64/include/proc.h')
-rw-r--r-- | sys/amd64/include/proc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/amd64/include/proc.h b/sys/amd64/include/proc.h index 54f5b416a7d4..2aebcf0da55a 100644 --- a/sys/amd64/include/proc.h +++ b/sys/amd64/include/proc.h @@ -101,6 +101,9 @@ int amd64_set_ldt_data(struct thread *td, int start, int num, extern struct mtx dt_lock; extern int max_ldt_segment; + +#define NARGREGS 6 + #endif /* _KERNEL */ #endif /* !_MACHINE_PROC_H_ */ |