+2015-07-30 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h (INLINE_SYSCALL): Rewrite
+ from scratch to use INTERNAL_SYSCALL.
+
2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
[BZ #18078]
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ \
- long __sys_res; \
- { \
- register unsigned long __res asm("r28"); \
- PIC_REG_DEF \
- LOAD_ARGS_##nr(args) \
- /* FIXME: HACK save/load r19 around syscall */ \
- asm volatile( \
- SAVE_ASM_PIC \
- " ble 0x100(%%sr2, %%r0)\n" \
- " ldi %1, %%r20\n" \
- LOAD_ASM_PIC \
- : "=r" (__res) \
- : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \
- : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
- ); \
- __sys_res = (long)__res; \
- } \
- if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){ \
- __set_errno(-__sys_res); \
- __sys_res = -1; \
- } \
- __sys_res; \
+ long __sys_res = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (__sys_res, ))) \
+ { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (__sys_res, )); \
+ __sys_res = -1; \
+ } \
+ __sys_res; \
})
/* INTERNAL_SYSCALL_DECL - Allows us to setup some function static