diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:00 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:32 -0500 |
commit | bd5969fc876a10b18613302db7087ef3c40f18e1 (patch) | |
tree | 7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/sysdeps/keyronex/include | |
parent | a95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff) |
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/sysdeps/keyronex/include')
44 files changed, 256 insertions, 0 deletions
diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/access.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/access.h new file mode 120000 index 0000000..cb83931 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/access.h @@ -0,0 +1 @@ +../../../../abis/linux/access.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/auxv.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/auxv.h new file mode 120000 index 0000000..c43f878 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/auxv.h @@ -0,0 +1 @@ +../../../../abis/linux/auxv.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/blkcnt_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/blkcnt_t.h new file mode 120000 index 0000000..0b0ec27 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/blkcnt_t.h @@ -0,0 +1 @@ +../../../../abis/linux/blkcnt_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/blksize_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/blksize_t.h new file mode 120000 index 0000000..7dc8d7c --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/blksize_t.h @@ -0,0 +1 @@ +../../../../abis/linux/blksize_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/clockid_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/clockid_t.h new file mode 120000 index 0000000..6a42da5 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/clockid_t.h @@ -0,0 +1 @@ +../../../../abis/linux/clockid_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/dev_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/dev_t.h new file mode 120000 index 0000000..bca881e --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/dev_t.h @@ -0,0 +1 @@ +../../../../abis/linux/dev_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/epoll.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/epoll.h new file mode 120000 index 0000000..eb4b76d --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/epoll.h @@ -0,0 +1 @@ +../../../../abis/linux/epoll.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/errno.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/errno.h new file mode 120000 index 0000000..6e507de --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/errno.h @@ -0,0 +1 @@ +../../../../abis/linux/errno.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/fcntl.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/fcntl.h new file mode 120000 index 0000000..463e2c9 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/fcntl.h @@ -0,0 +1 @@ +../../../../abis/linux/fcntl.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/fsblkcnt_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/fsblkcnt_t.h new file mode 120000 index 0000000..898dfb2 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/fsblkcnt_t.h @@ -0,0 +1 @@ +../../../../abis/linux/fsblkcnt_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/fsfilcnt_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/fsfilcnt_t.h new file mode 120000 index 0000000..791755c --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/fsfilcnt_t.h @@ -0,0 +1 @@ +../../../../abis/linux/fsfilcnt_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/gid_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/gid_t.h new file mode 120000 index 0000000..abce6d6 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/gid_t.h @@ -0,0 +1 @@ +../../../../abis/linux/gid_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/in.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/in.h new file mode 120000 index 0000000..418d1d5 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/in.h @@ -0,0 +1 @@ +../../../../abis/linux/in.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/ino_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/ino_t.h new file mode 120000 index 0000000..4c20aca --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/ino_t.h @@ -0,0 +1 @@ +../../../../abis/linux/ino_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/inotify.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/inotify.h new file mode 120000 index 0000000..b5cb282 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/inotify.h @@ -0,0 +1 @@ +../../../../abis/linux/inotify.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/ioctls.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/ioctls.h new file mode 120000 index 0000000..595106b --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/ioctls.h @@ -0,0 +1 @@ +../../../../abis/linux/ioctls.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/limits.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/limits.h new file mode 120000 index 0000000..6c88db2 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/limits.h @@ -0,0 +1 @@ +../../../../abis/linux/limits.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/mode_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/mode_t.h new file mode 120000 index 0000000..5d78fdf --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/mode_t.h @@ -0,0 +1 @@ +../../../../abis/linux/mode_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/mqueue.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/mqueue.h new file mode 120000 index 0000000..fa87b07 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/mqueue.h @@ -0,0 +1 @@ +../../../../abis/linux/mqueue.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/msg.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/msg.h new file mode 120000 index 0000000..f402b49 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/msg.h @@ -0,0 +1 @@ +../../../../abis/linux/msg.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/nlink_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/nlink_t.h new file mode 120000 index 0000000..bb3b625 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/nlink_t.h @@ -0,0 +1 @@ +../../../../abis/linux/nlink_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/packet.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/packet.h new file mode 120000 index 0000000..998ef1a --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/packet.h @@ -0,0 +1 @@ +../../../../abis/linux/packet.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/pid_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/pid_t.h new file mode 120000 index 0000000..baa90f6 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/pid_t.h @@ -0,0 +1 @@ +../../../../abis/linux/pid_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/poll.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/poll.h new file mode 120000 index 0000000..8ea6a0a --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/poll.h @@ -0,0 +1 @@ +../../../../abis/linux/poll.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/ptrace.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/ptrace.h new file mode 120000 index 0000000..b2517b2 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/ptrace.h @@ -0,0 +1 @@ +../../../../abis/linux/ptrace.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/reboot.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/reboot.h new file mode 120000 index 0000000..77013a4 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/reboot.h @@ -0,0 +1 @@ +../../../../abis/linux/reboot.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/resource.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/resource.h new file mode 120000 index 0000000..88d7402 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/resource.h @@ -0,0 +1 @@ +../../../../abis/linux/resource.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/seek-whence.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/seek-whence.h new file mode 120000 index 0000000..df7bccf --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/seek-whence.h @@ -0,0 +1 @@ +../../../../abis/linux/seek-whence.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/shm.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/shm.h new file mode 120000 index 0000000..067d8c4 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/shm.h @@ -0,0 +1 @@ +../../../../abis/linux/shm.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/signal.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/signal.h new file mode 120000 index 0000000..4dcb0b7 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/signal.h @@ -0,0 +1 @@ +../../../../abis/linux/signal.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/socket.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/socket.h new file mode 120000 index 0000000..f1dc016 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/socket.h @@ -0,0 +1 @@ +../../../../abis/linux/socket.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/socklen_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/socklen_t.h new file mode 120000 index 0000000..41f3b11 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/socklen_t.h @@ -0,0 +1 @@ +../../../../abis/linux/socklen_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/stat.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/stat.h new file mode 120000 index 0000000..1f63b41 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/stat.h @@ -0,0 +1 @@ +../../../../abis/linux/stat.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/statfs.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/statfs.h new file mode 120000 index 0000000..e3d202f --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/statfs.h @@ -0,0 +1 @@ +../../../../abis/linux/statfs.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/statvfs.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/statvfs.h new file mode 120000 index 0000000..1fc80c2 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/statvfs.h @@ -0,0 +1 @@ +../../../../abis/linux/statvfs.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/suseconds_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/suseconds_t.h new file mode 120000 index 0000000..9ed6597 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/suseconds_t.h @@ -0,0 +1 @@ +../../../../abis/linux/suseconds_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/termios.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/termios.h new file mode 120000 index 0000000..ee8f0b0 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/termios.h @@ -0,0 +1 @@ +../../../../abis/linux/termios.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/time.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/time.h new file mode 120000 index 0000000..2a02625 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/time.h @@ -0,0 +1 @@ +../../../../abis/linux/time.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/uid_t.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/uid_t.h new file mode 120000 index 0000000..b306777 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/uid_t.h @@ -0,0 +1 @@ +../../../../abis/linux/uid_t.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/utsname.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/utsname.h new file mode 120000 index 0000000..b285754 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/utsname.h @@ -0,0 +1 @@ +../../../../abis/linux/utsname.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/vm-flags.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/vm-flags.h new file mode 120000 index 0000000..bbe258c --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/vm-flags.h @@ -0,0 +1 @@ +../../../../abis/linux/vm-flags.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/wait.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/wait.h new file mode 120000 index 0000000..feb2840 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/wait.h @@ -0,0 +1 @@ +../../../../abis/linux/wait.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/abi-bits/xattr.h b/lib/mlibc/sysdeps/keyronex/include/abi-bits/xattr.h new file mode 120000 index 0000000..66412d7 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/abi-bits/xattr.h @@ -0,0 +1 @@ +../../../../abis/linux/xattr.h
\ No newline at end of file diff --git a/lib/mlibc/sysdeps/keyronex/include/keyronex/syscall.h b/lib/mlibc/sysdeps/keyronex/include/keyronex/syscall.h new file mode 100644 index 0000000..9cbafd0 --- /dev/null +++ b/lib/mlibc/sysdeps/keyronex/include/keyronex/syscall.h @@ -0,0 +1,213 @@ +#ifndef _KEYRONEX__SYSCALL_H +#define _KEYRONEX__SYSCALL_H + +#include <stdint.h> + +enum posix_syscall { + /*! debug print */ + kPXSysDebug, + kPXSysMmap, + kPXSysMunmap, + + kPXSysIOCtl, + kPXSysOpenAt, + kPXSysClose, + kPXSysRead, + kPXSysReadLink, + kPXSysWrite, + kPXSysSeek, + kPXSysPPoll, + kPXSysIsATTY, + kPXSysReadDir, + kPXSysStat, + kPXSysUnlinkAt, + kPXSysGetCWD, + kPXSysPipe, + kPXSysDup, + kPXSysDup3, + kPXSysLink, + kPXSysChDir, + kPXSysUMask, + kPXSysMkDirAt, + kPXSysRenameAt, + kPXSysStatFS, + kPXSysFCntl, + + kPXSysSetFSBase, + kPXSysExecVE, + kPXSysExit, + kPXSysFork, + kPXSysWaitPID, + kPXSysGetPID, + kPXSysGetPPID, + kPXSysGetPGID, + kPXSysSetPGID, + kPXSysGetSID, + kPXSysSetSID, + kPXSysGetTID, + + kPXSysSigAction, + kPXSysSigMask, + kPXSysSigSend, + kPXSysSigSuspend, + kPXSysSigTimedWait, + + kPXSysSocket, + kPXSysBind, + kPXSysConnect, + kPXSysListen, + kPXSysAccept, + kPXSysSendMsg, + kPXSysRecvMsg, + kPXSysSocketPair, + kPXSysGetSockOpt, + kPXSysSetSockOpt, + + kPXSysEPollCreate, + kPXSysEPollCtl, + kPXSysEPollWait, + + kPXSysSleep, + kPXSysUTSName, + kPXSysClockGet, + + kPXSysForkThread, + kPXSysFutexWait, + kPXSysFutexWake, + + /*! register signal entry function */ + kPXSysSigEntry, + /*! return from a signal */ + kPXSysSigReturn, +}; + +enum posix_stat_kind { + kPXStatKindFD, + kPXStatKindAt, + kPXStatKindCWD, +}; + +#if defined(__x86_64__) +static inline uintptr_t +syscall0(uintptr_t num, uintptr_t *out) +{ + uintptr_t ret, ret2; + asm volatile("int $0x80" : "=a"(ret), "=D"(ret2) : "a"(num) : "memory"); + if (out) + *out = ret2; + return ret; +} + +static inline uintptr_t +syscall1(uintptr_t num, uintptr_t arg1, uintptr_t *out) +{ + uintptr_t ret, ret2; + asm volatile("int $0x80" + : "=a"(ret), "=D"(ret2) + : "a"(num), "D"(arg1) + : "memory"); + if (out) + *out = ret2; + return ret; +} + +static inline uintptr_t +syscall2(uintptr_t num, uintptr_t arg1, uintptr_t arg2, uintptr_t *out) +{ + uintptr_t ret, ret2; + + asm volatile("int $0x80" + : "=a"(ret), "=D"(ret2) + : "a"(num), "D"(arg1), "S"(arg2) + : "memory"); + + if (out) + *out = ret2; + + return ret; +} + +static inline uintptr_t +syscall3(intptr_t num, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, + uintptr_t *out) +{ + uintptr_t ret, ret2; + + asm volatile("int $0x80" + : "=a"(ret), "=D"(ret2) + : "a"(num), "D"(arg1), "S"(arg2), "d"(arg3) + : "memory"); + + if (out) + *out = ret2; + + return ret; +} + +static inline uintptr_t +syscall4(intptr_t num, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, + uintptr_t arg4, uintptr_t *out) +{ + register uintptr_t r10 asm("r10") = arg4; + uintptr_t ret, ret2; + + asm volatile("int $0x80" + : "=a"(ret), "=D"(ret2) + : "a"(num), "D"(arg1), "S"(arg2), "d"(arg3), "r"(r10) + : "memory"); + + if (out) + *out = ret2; + + return ret; +} + +static inline uintptr_t +syscall5(uintptr_t num, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, + uintptr_t arg4, uintptr_t arg5, uintptr_t *out) +{ + register uintptr_t r10 asm("r10") = arg4, r8 asm("r8") = arg5; + uintptr_t ret, ret2; + + asm volatile("int $0x80" + : "=a"(ret), "=D"(ret2) + : "a"(num), "D"(arg1), "S"(arg2), "d"(arg3), "r"(r10), + "r"(r8) + : "memory"); + + if (out) + *out = ret2; + + return ret; +} + +static inline uintptr_t +syscall6(uintptr_t num, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, + uintptr_t arg4, uintptr_t arg5, uintptr_t arg6, uintptr_t *out) +{ + register uintptr_t r10 asm("r10") = arg4, r8 asm("r8") = arg5, + r9 asm("r9") = arg6; + uintptr_t ret, ret2; + + asm volatile("int $0x80" + : "=a"(ret), "=D"(ret2) + : "a"(num), "D"(arg1), "S"(arg2), "d"(arg3), "r"(r10), + "r"(r8), "r"(r9) + : "memory"); + + if (out) + *out = ret2; + + return ret; +} + +static inline int +sc_error(uintptr_t ret) +{ + if (ret > -4096UL) + return -ret; + return 0; +} +#endif + +#endif |