diff options
| author | Yawning Angel <yawning@schwanenlied.me> | 2021-11-13 20:21:52 +0000 |
|---|---|---|
| committer | Yawning Angel <yawning@schwanenlied.me> | 2021-11-13 20:40:27 +0000 |
| commit | 6ea68869c934807f1ecdc411e58bdce6b64ee7e2 (patch) | |
| tree | 0dc02ea2d1996cb6559006c949d136d359cdfb6e /src/parser.cpp | |
| parent | bfa23f1352d0df719b84e467d9c7df29f98c7834 (diff) | |
src: "Fix" the system call intrinsic for FreeBSD
FreeBSD's systemcall handler clears out R8, R9, and R10 prior to
`sysretq`, and additionally returns positive errno (with CF) set on
error. This modifies the syscall intrinsic such that LLVM knows
about the additional clobbered registers.
Note that propagating CF back to the caller of the syscall intrinsic
is left for a future PR. As far as I can tell, Darwin does not use
the syscall intrinsic at all, and FreeBSD only uses it for SYS_GETTID,
so this should be "ok" for now.
See: sys/amd64/amd64/exception.S in the FreeBSD src for more details.
Diffstat (limited to 'src/parser.cpp')
0 files changed, 0 insertions, 0 deletions