uclibc-ng: bump version from 1.0.6 to 1.0.8
[openwrt.git] / toolchain / uClibc / patches-0.9.33.2 / 618-mips64_fix_syscall_error.patch
1 --- a/libc/sysdeps/linux/mips/sysdep.h
2 +++ b/libc/sysdeps/linux/mips/sysdep.h
3 @@ -96,7 +96,8 @@
4     backwards into the previous fn.  */
5  
6  #ifdef __PIC__
7 -#define PSEUDO(name, syscall_name, args)               \
8 +# if _MIPS_SIM == _ABIO32
9 +#  define PSEUDO(name, syscall_name, args)             \
10    .align 2;                                            \
11    99: move a0, v0;                                     \
12    la t9,__syscall_error;                               \
13 @@ -109,6 +110,23 @@
14    .set reorder;                                                \
15    bne a3, zero, 99b;                                   \
16  L(syse1):
17 +# else
18 +#  define PSEUDO(name, syscall_name, args)             \
19 +  .align 2;                                            \
20 +  99:                                                  \
21 +  .set noat;                                           \
22 +  .cpsetup t9, $1, name;                               \
23 +  .set at;                                             \
24 +  move a0, v0;                                         \
25 +  dla t9,__syscall_error;                              \
26 +  .cpreturn;                                           \
27 +  jr t9;                                               \
28 +  ENTRY(name)                                          \
29 +  li v0, SYS_ify(syscall_name);                                \
30 +  syscall;                                             \
31 +  bne a3, zero, 99b;                                   \
32 +L(syse1):
33 +# endif
34  #else
35  #define PSEUDO(name, syscall_name, args)               \
36    .set noreorder;                                      \