(hopefully) constructive feedback from me, it would be nice if you can list all the syscall items in one page for ctrl+f reasons. and if you can somehow enumerate and include the parameters they take that'd be really nice, but I know in windows land you don't have documentation of the function signatures, I get why you didn't do that already, it is super tedious.
x64 clobbers rcx and r11, I don't see that mentioned in the calling convention. I'm not confident whether the other architectures have additional clobbers.
Indeed, in bytecode golfing, you can actually make use of SYSCALL's use of RCX for its return address: make a dummy syscall, then use RCX-relative addresses to refer to nearby data, since they're significantly shorter than RIP-relative addresses.
(Something I still don't know: On returning from a syscall, is it ever possible for RCX to contain something other than the syscall's return address on Linux, assuming that another process isn't explicitly overwriting it through ptrace or other means? Some people have vaguely hinted so in the case of an interruption by a signal, but I have failed to find any actual example of this.)
13 comments
[ 3.6 ms ] story [ 47.3 ms ] threadPS: x64 is a bit ambiguous, as it was not uncommon to use it for Itanium ;)
(hopefully) constructive feedback from me, it would be nice if you can list all the syscall items in one page for ctrl+f reasons. and if you can somehow enumerate and include the parameters they take that'd be really nice, but I know in windows land you don't have documentation of the function signatures, I get why you didn't do that already, it is super tedious.
[1]: https://www.chromium.org/chromium-os/developer-library/refer...
(Something I still don't know: On returning from a syscall, is it ever possible for RCX to contain something other than the syscall's return address on Linux, assuming that another process isn't explicitly overwriting it through ptrace or other means? Some people have vaguely hinted so in the case of an interruption by a signal, but I have failed to find any actual example of this.)
Not a single link above on mobile