123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- .text
- .align 2
- ENTRY (name)
- li a7, SYS_ify (syscall_name); \
- scall; \
- li a7, -4096
- bgtu a0, a7, .Lsyscall_error
- SYSCALL_ERROR_HANDLER (sym) \
- ret
- END (sym)
- .Lsyscall_error
- la.tls.ie t1, errno
- add t1, t1, tp
- neg a0, a0
- sw a0, 0(t1)
- li a0, -1;
- .Lsyscall_error
- lui t1, %tprel_hi(errno)
- add t1, t1, tp, %tprel_add(errno)
- neg a0, a0
- sw a0, %tprel_lo(errno)(t1)
- li a0, -1;
- .Lsyscall_error
- j __syscall_error;
- .align 2
- ENTRY (name)
- li a7, SYS_ify (syscall_name); \
- scall;
- END (name)
- PSEUDO_NOERRNO (name, syscall_name, args) \
- neg a0, a0;
- END (name)
- extern long int __syscall_error (long int neg_errno);
|