Attachment '2008-05-21-ports-hppa.diff'
Download 1 Index: sysdeps/hppa/dl-machine.h
2 ===================================================================
3 RCS file: /cvs/glibc/ports/sysdeps/hppa/dl-machine.h,v
4 retrieving revision 1.24
5 diff -u -p -r1.24 dl-machine.h
6 --- sysdeps/hppa/dl-machine.h 13 Sep 2006 21:56:09 -0000 1.24
7 +++ sysdeps/hppa/dl-machine.h 22 May 2008 12:59:43 -0000
8 @@ -213,8 +213,7 @@ elf_machine_runtime_setup (struct link_m
9 a function descriptor, but the *real* address of the function... */
10 if((unsigned long) &_dl_runtime_resolve & 3)
11 {
12 - got[-2] = (Elf32_Addr) ((struct fdesc *)
13 - ((unsigned long) &_dl_runtime_resolve & ~3))->ip;
14 + got[-2] = *(Elf32_Addr *)((unsigned long) &_dl_runtime_resolve & ~3);
15 }
16 else
17 {
18 @@ -233,10 +232,9 @@ elf_machine_runtime_setup (struct link_m
19 GL(dl_profile_map) = l;
20 }
21
22 - if((unsigned long) &_dl_runtime_resolve & 3)
23 + if((unsigned long) &_dl_runtime_profile & 3)
24 {
25 - got[-2] = (Elf32_Addr) ((struct fdesc *)
26 - ((unsigned long) &_dl_runtime_profile & ~3))->ip;
27 + got[-2] = *(Elf32_Addr *)((unsigned long) &_dl_runtime_profile & ~3);
28 }
29 else
30 {
31 Index: sysdeps/unix/sysv/linux/hppa/socket.S
32 ===================================================================
33 RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/hppa/socket.S,v
34 retrieving revision 1.1
35 diff -u -p -r1.1 socket.S
36 --- sysdeps/unix/sysv/linux/hppa/socket.S 15 Oct 2000 03:28:06 -0000 1.1
37 +++ sysdeps/unix/sysv/linux/hppa/socket.S 22 May 2008 12:59:43 -0000
38 @@ -1,8 +1,7 @@
39 -#include <sysdep.h>
40 +#include <sysdep-cancel.h>
41
42 .globl __socket
43 PSEUDO(__socket, socket, 3)
44 -
45 PSEUDO_END(__socket)
46
47 #ifndef NO_WEAK_ALIAS
48 Index: sysdeps/unix/sysv/linux/hppa/bits/atomic.h
49 ===================================================================
50 RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h,v
51 retrieving revision 1.4
52 diff -u -p -r1.4 atomic.h
53 --- sysdeps/unix/sysv/linux/hppa/bits/atomic.h 4 Apr 2008 18:57:47 -0000 1.4
54 +++ sysdeps/unix/sysv/linux/hppa/bits/atomic.h 22 May 2008 12:59:43 -0000
55 @@ -51,12 +51,13 @@ typedef uintmax_t uatomic_max_t;
56 *addr = new;
57 return prev; */
58
59 -/* Use the kernel atomic light weight syscalls on hppa */
60 -#define LWS "0xb0"
61 -#define LWS_CAS "0"
62 -/* Note r31 is the link register */
63 -#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31"
64 -#define ASM_EAGAIN "11"
65 +/* Use the kernel atomic light weight syscalls on hppa. */
66 +#define _LWS "0xb0"
67 +#define _LWS_CAS "0"
68 +/* Note r31 is the link register. */
69 +#define _LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31"
70 +/* String constant for -EAGAIN. */
71 +#define _ASM_EAGAIN "-11"
72
73 #if __ASSUME_LWS_CAS
74 /* The only basic operation needed is compare and exchange. */
75 @@ -69,16 +70,16 @@ typedef uintmax_t uatomic_max_t;
76 "copy %3, %%r26 \n\t" \
77 "copy %4, %%r25 \n\t" \
78 "copy %5, %%r24 \n\t" \
79 - "ble " LWS "(%%sr2, %%r0) \n\t" \
80 - "ldi " LWS_CAS ", %%r20 \n\t" \
81 - "cmpib,=,n " ASM_EAGAIN ",%%r21,0b \n\t" \
82 + "ble " _LWS "(%%sr2, %%r0) \n\t" \
83 + "ldi " _LWS_CAS ", %%r20 \n\t" \
84 + "cmpib,=,n " _ASM_EAGAIN ",%%r21,0b \n\t" \
85 "nop \n\t" \
86 "stw %%r28, %0 \n\t" \
87 "sub %%r0, %%r21, %%r21 \n\t" \
88 "stw %%r21, %1 \n\t" \
89 : "=m" (lws_ret), "=m" (lws_errno), "+m" (*mem) \
90 : "r" (mem), "r" (oldval), "r" (newval) \
91 - : LWS_CLOBBER \
92 + : _LWS_CLOBBER \
93 ); \
94 \
95 if(lws_errno == EFAULT || lws_errno == ENOSYS) \
96 @@ -91,7 +92,7 @@ typedef uintmax_t uatomic_max_t;
97 ({ \
98 int ret; \
99 ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \
100 - /* Return 1 if it was already acquired */ \
101 + /* Return 1 if it was already acquired. */ \
102 (ret != oldval); \
103 })
104 #else
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.- [get | view] (2008-05-22 13:01:20, 17.9 KB) [[attachment:2008-05-21-libc-hppa.diff]]
- [get | view] (2008-05-22 13:01:30, 4.0 KB) [[attachment:2008-05-21-ports-hppa.diff]]
You are not allowed to attach a file to this page.