[libc] add syscall function

Add the syscall wrapper function and tests. It's implemented using a
macro to guarantee the minimum number of arguments.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D134919

GitOrigin-RevId: 1801c356f61f0caef367138e889ad60b116b5760
83 files changed