uclibc: add upstream 0.9.33 fixes
[buildroot-gz.git] / package / uclibc / 0.9.33.2 / uclibc-0023-MIPS-Convert-__syscall_error-callers-to-use-a0-for-a.patch
blob7103f59dd984aed0c772e8891338227882693190
1 From 6e2dbd7387bc2381e08aa85d6d33bb2d2d140843 Mon Sep 17 00:00:00 2001
2 From: Kevin Cernekee <cernekee@gmail.com>
3 Date: Tue, 5 Jun 2012 15:05:19 -0700
4 Subject: [PATCH] MIPS: Convert __syscall_error() callers to use $a0 for
5 argument
7 Some callers passed the first argument in $v0, while others used $a0.
8 Change the callers to use $a0 consistently.
10 Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
11 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 ---
13 libc/sysdeps/linux/mips/vfork.S | 1 +
14 .../linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h | 2 +-
15 libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S | 1 +
16 3 files changed, 3 insertions(+), 1 deletion(-)
18 diff --git a/libc/sysdeps/linux/mips/vfork.S b/libc/sysdeps/linux/mips/vfork.S
19 index b307447..00cc675 100644
20 --- a/libc/sysdeps/linux/mips/vfork.S
21 +++ b/libc/sysdeps/linux/mips/vfork.S
22 @@ -84,6 +84,7 @@ NESTED(__vfork,FRAMESZ,sp)
24 /* Something bad happened -- no child created. */
25 L(error):
26 + move a0, v0
27 #ifdef __PIC__
28 PTR_LA t9, __syscall_error
29 RESTORE_GP64
30 diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
31 index fc51774..4d2c405 100644
32 --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
33 +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
34 @@ -31,7 +31,7 @@
35 # undef PSEUDO
36 # define PSEUDO(name, syscall_name, args) \
37 .align 2; \
38 - 99: \
39 + 99: move a0, v0; \
40 PTR_LA t9,__syscall_error; \
41 /* manual cpreturn. */ \
42 REG_L gp, STKOFF_GP(sp); \
43 diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S
44 index 7bbab5c..238d798 100644
45 --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S
46 +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S
47 @@ -80,6 +80,7 @@ NESTED(__vfork,FRAMESZ,sp)
49 /* Something bad happened -- no child created. */
50 L(error):
51 + move a0, v0
52 #ifdef __PIC__
53 PTR_LA t9, __syscall_error
54 RESTORE_GP64
55 --
56 1.7.10.4