diff options
Diffstat (limited to 'libc/ports/sysdeps')
105 files changed, 277 insertions, 491 deletions
diff --git a/libc/ports/sysdeps/alpha/bits/atomic.h b/libc/ports/sysdeps/alpha/bits/atomic.h index 5295a3b4d..c4653de77 100644 --- a/libc/ports/sysdeps/alpha/bits/atomic.h +++ b/libc/ports/sysdeps/alpha/bits/atomic.h @@ -347,7 +347,7 @@ typedef uintmax_t uatomic_max_t; : "memory"); \ __ret; }) -/* ??? Barrier semantics for atomic_exchange_and_add appear to be +/* ??? Barrier semantics for atomic_exchange_and_add appear to be undefined. Use full barrier for now, as that's safe. */ #define atomic_exchange_and_add(mem, value) \ __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, __MB, __MB) diff --git a/libc/ports/sysdeps/alpha/div_libc.h b/libc/ports/sysdeps/alpha/div_libc.h index bb58409c1..d3a3d3458 100644 --- a/libc/ports/sysdeps/alpha/div_libc.h +++ b/libc/ports/sysdeps/alpha/div_libc.h @@ -34,7 +34,7 @@ #define RA t9 /* The secureplt format does not allow the division routines to be called - via plt; there aren't enough registers free to be clobbered. Avoid + via plt; there aren't enough registers free to be clobbered. Avoid setting the symbol type to STT_FUNC, so that the linker won't be tempted to create a plt entry. */ #define funcnoplt notype diff --git a/libc/ports/sysdeps/alpha/divq.S b/libc/ports/sysdeps/alpha/divq.S index b6be91298..08bfdd9ea 100644 --- a/libc/ports/sysdeps/alpha/divq.S +++ b/libc/ports/sysdeps/alpha/divq.S @@ -192,7 +192,7 @@ $q_high: br $q_high_ret .align 4 - /* The quotient that we computed was too small. Divide Y by the + /* The quotient that we computed was too small. Divide Y by the current remainder (R) and add that to the existing quotient (Q). The expectation, of course, is that R is much smaller than X. */ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We diff --git a/libc/ports/sysdeps/alpha/divqu.S b/libc/ports/sysdeps/alpha/divqu.S index 4e86db397..444cddf3a 100644 --- a/libc/ports/sysdeps/alpha/divqu.S +++ b/libc/ports/sysdeps/alpha/divqu.S @@ -206,7 +206,7 @@ $q_high: br $q_high_ret .align 4 - /* The quotient that we computed was too small. Divide Y by the + /* The quotient that we computed was too small. Divide Y by the current remainder (R) and add that to the existing quotient (Q). The expectation, of course, is that R is much smaller than X. */ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We diff --git a/libc/ports/sysdeps/alpha/fpu/cfloat-compat.h b/libc/ports/sysdeps/alpha/fpu/cfloat-compat.h index 858f0c578..fd0dacfb3 100644 --- a/libc/ports/sysdeps/alpha/fpu/cfloat-compat.h +++ b/libc/ports/sysdeps/alpha/fpu/cfloat-compat.h @@ -16,7 +16,7 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ -/* The behaviour of complex float changed between GCC 3.3 and 3.4. +/* The behaviour of complex float changed between GCC 3.3 and 3.4. In 3.3 and before (below, complex version 1, or "c1"), complex float values were packed into one floating point register. diff --git a/libc/ports/sysdeps/alpha/fpu/s_roundf.c b/libc/ports/sysdeps/alpha/fpu/s_roundf.c index e1d97d2e5..1d22f9783 100644 --- a/libc/ports/sysdeps/alpha/fpu/s_roundf.c +++ b/libc/ports/sysdeps/alpha/fpu/s_roundf.c @@ -25,7 +25,7 @@ __roundf (float x) const float almost_half = 0x1.fffffep-2; const float two23 = 0x1.0p23; float r, tmp; - + __asm ( #ifdef _IEEE_FP_INEXACT "adds/suic %2, %3, %1\n\tsubs/suic %1, %3, %0" diff --git a/libc/ports/sysdeps/alpha/fpu/s_trunc.c b/libc/ports/sysdeps/alpha/fpu/s_trunc.c index 241335313..19f56d9eb 100644 --- a/libc/ports/sysdeps/alpha/fpu/s_trunc.c +++ b/libc/ports/sysdeps/alpha/fpu/s_trunc.c @@ -27,7 +27,7 @@ __trunc (double x) { double two52 = copysign (0x1.0p52, x); double r, tmp; - + __asm ( #ifdef _IEEE_FP_INEXACT "addt/suic %2, %3, %1\n\tsubt/suic %1, %3, %0" diff --git a/libc/ports/sysdeps/alpha/fpu/s_truncf.c b/libc/ports/sysdeps/alpha/fpu/s_truncf.c index 3e13e87c5..aac47f719 100644 --- a/libc/ports/sysdeps/alpha/fpu/s_truncf.c +++ b/libc/ports/sysdeps/alpha/fpu/s_truncf.c @@ -26,7 +26,7 @@ __truncf (float x) { float two23 = copysignf (0x1.0p23, x); float r, tmp; - + __asm ( #ifdef _IEEE_FP_INEXACT "adds/suic %2, %3, %1\n\tsubs/suic %1, %3, %0" diff --git a/libc/ports/sysdeps/alpha/ldiv.S b/libc/ports/sysdeps/alpha/ldiv.S index eee605de8..9139dad63 100644 --- a/libc/ports/sysdeps/alpha/ldiv.S +++ b/libc/ports/sysdeps/alpha/ldiv.S @@ -150,7 +150,7 @@ $q_high: br $q_high_ret .align 4 - /* The quotient that we computed was too small. Divide Y by the + /* The quotient that we computed was too small. Divide Y by the current remainder (R) and add that to the existing quotient (Q). The expectation, of course, is that R is much smaller than X. */ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We diff --git a/libc/ports/sysdeps/alpha/memchr.c b/libc/ports/sysdeps/alpha/memchr.c index 67f718a50..4f634cef7 100644 --- a/libc/ports/sysdeps/alpha/memchr.c +++ b/libc/ports/sysdeps/alpha/memchr.c @@ -115,7 +115,7 @@ __memchr (const void *s, int xc, size_t n) s_align++; \ n -= 64; \ } while (0) - + /* While there's still lots more data to potentially be read, continue issuing prefetches for the 4th cacheline out. */ while (n >= 256) diff --git a/libc/ports/sysdeps/alpha/remq.S b/libc/ports/sysdeps/alpha/remq.S index a7402c8f5..f8c4716ed 100644 --- a/libc/ports/sysdeps/alpha/remq.S +++ b/libc/ports/sysdeps/alpha/remq.S @@ -193,7 +193,7 @@ $q_high: br $q_high_ret .align 4 - /* The quotient that we computed was too small. Divide Y by the + /* The quotient that we computed was too small. Divide Y by the current remainder (R) and add that to the existing quotient (Q). The expectation, of course, is that R is much smaller than X. */ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We diff --git a/libc/ports/sysdeps/alpha/remqu.S b/libc/ports/sysdeps/alpha/remqu.S index 0005c149f..5219325ff 100644 --- a/libc/ports/sysdeps/alpha/remqu.S +++ b/libc/ports/sysdeps/alpha/remqu.S @@ -211,7 +211,7 @@ $q_high: br $q_high_ret .align 4 - /* The quotient that we computed was too small. Divide Y by the + /* The quotient that we computed was too small. Divide Y by the current remainder (R) and add that to the existing quotient (Q). The expectation, of course, is that R is much smaller than X. */ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We diff --git a/libc/ports/sysdeps/alpha/stxncpy.S b/libc/ports/sysdeps/alpha/stxncpy.S index fc828c24c..4fd906861 100644 --- a/libc/ports/sysdeps/alpha/stxncpy.S +++ b/libc/ports/sysdeps/alpha/stxncpy.S @@ -172,7 +172,7 @@ $u_head: or t0, t6, t6 # e1 : mask original data for zero test cmpbge zero, t6, t7 # e0 : beq a2, $u_eocfin # .. e1 : - lda t6, -1 # e0 : + lda t6, -1 # e0 : bne t7, $u_final # .. e1 : mskql t6, a1, t6 # e0 : mask out bits already seen @@ -270,7 +270,7 @@ $u_final: 1: stq_u t0, 0(a0) # e0 : ret (t9) # .. e1 : - /* Got to end-of-count before end of string. + /* Got to end-of-count before end of string. On entry to this basic block: t1 == the shifted high-order bits from the previous source word */ $u_eoc: diff --git a/libc/ports/sysdeps/am33/elf/start.S b/libc/ports/sysdeps/am33/elf/start.S index e89f9db15..6f1eb8cb3 100644 --- a/libc/ports/sysdeps/am33/elf/start.S +++ b/libc/ports/sysdeps/am33/elf/start.S @@ -46,8 +46,8 @@ _start: later in __libc_start_main. */ mov sp,a3 add -32,sp - - mov a3,(28,sp) /* stack_end. */ + + mov a3,(28,sp) /* stack_end. */ mov d0,(24,sp) /* rtld_fini. */ mov _fini, d3 mov d3,(20,sp) /* fini. */ @@ -55,7 +55,7 @@ _start: mov d2,(16,sp) /* init. */ inc4 a3 mov a3,(12,sp) /* argv. */ - + /* Set the initial frame pointer as 0, so that the bottom of the stack is clearly marked. */ mov 0,a3 diff --git a/libc/ports/sysdeps/am33/fpu/fgetexcptflg.c b/libc/ports/sysdeps/am33/fpu/fgetexcptflg.c index e201c4fa8..bb9f4e994 100644 --- a/libc/ports/sysdeps/am33/fpu/fgetexcptflg.c +++ b/libc/ports/sysdeps/am33/fpu/fgetexcptflg.c @@ -30,7 +30,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) /* Get the current exceptions. */ _FPU_GETCW (temp); - /* We only save the relevant bits here. In particular, care has to be + /* We only save the relevant bits here. In particular, care has to be taken with the CAUSE bits, as an inadvertent restore later on could generate unexpected exceptions. */ diff --git a/libc/ports/sysdeps/arm/armv6/strcpy.S b/libc/ports/sysdeps/arm/armv6/strcpy.S index cd13ff7ec..69e82d831 100644 --- a/libc/ports/sysdeps/arm/armv6/strcpy.S +++ b/libc/ports/sysdeps/arm/armv6/strcpy.S @@ -89,7 +89,7 @@ ENTRY (strcpy) tst r0, #3 @ Test alignment of DEST movt r7, #0x0101 #else - ldr ip, =0x01010101 + ldr r7, =0x01010101 tst r0, #3 #endif bne .Lunaligned diff --git a/libc/ports/sysdeps/arm/fpu_control.h b/libc/ports/sysdeps/arm/fpu_control.h index 02d6e2c8e..2fee79fa8 100644 --- a/libc/ports/sysdeps/arm/fpu_control.h +++ b/libc/ports/sysdeps/arm/fpu_control.h @@ -39,7 +39,7 @@ extern fpu_control_t __fpu_control; /* Some bits in the FPSCR are not yet defined. They must be preserved when modifying the contents. */ -#define _FPU_RESERVED 0x0e08e0e0 +#define _FPU_RESERVED 0x00086060 #define _FPU_DEFAULT 0x00000000 /* Default + exceptions enabled. */ #define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00) diff --git a/libc/ports/sysdeps/arm/machine-gmon.h b/libc/ports/sysdeps/arm/machine-gmon.h index b414f0d01..d784d1b7e 100644 --- a/libc/ports/sysdeps/arm/machine-gmon.h +++ b/libc/ports/sysdeps/arm/machine-gmon.h @@ -18,7 +18,7 @@ #include <sysdep.h> -/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, +/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, so we must use an assembly stub. */ /* We must not pollute the global namespace. */ diff --git a/libc/ports/sysdeps/arm/math-tests.h b/libc/ports/sysdeps/arm/math-tests.h new file mode 100644 index 000000000..6fd17edca --- /dev/null +++ b/libc/ports/sysdeps/arm/math-tests.h @@ -0,0 +1,32 @@ +/* Configuration for math tests. ARM version. + Copyright (C) 2013 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +/* On systems with VFP support, but where glibc is built for + soft-float, the libgcc functions used in libc and libm do not + support rounding modes, although fesetround succeeds, and do not + support exceptions. */ +#ifdef __SOFTFP__ +# define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST) +# define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST) +# define ROUNDING_TESTS_long_double(MODE) ((MODE) == FE_TONEAREST) +# define EXCEPTION_TESTS_float 0 +# define EXCEPTION_TESTS_double 0 +# define EXCEPTION_TESTS_long_double 0 +#endif + +#include_next <math-tests.h> diff --git a/libc/ports/sysdeps/hppa/configure.in b/libc/ports/sysdeps/hppa/configure.in index 57cb941be..40f33603e 100644 --- a/libc/ports/sysdeps/hppa/configure.in +++ b/libc/ports/sysdeps/hppa/configure.in @@ -26,11 +26,11 @@ AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl cat > conftest.s <<\EOF ; Setup tls data .section ".tdata","awT",@progbits -foo: .data 32 +foo: .data 32 .text ; Test general dyanmic relocations test0: - addil LT'foo-$tls_gdidx$, %r19 + addil LT'foo-$tls_gdidx$, %r19 ldo RT'foo-$tls_gdidx$(%r1), %r26 b __tls_get_addr nop @@ -50,7 +50,7 @@ test2: ; Test local exec relocations test3: mfctl %cr27, %r26 - addil LR'foo-$tls_leoff$, %r26 + addil LR'foo-$tls_leoff$, %r26 ldo RR'foo-$tls_leoff$(%r1), %r25 ; Done all the TLS tests. EOF diff --git a/libc/ports/sysdeps/hppa/dl-fptr.c b/libc/ports/sysdeps/hppa/dl-fptr.c index 4463148ef..e0a884237 100644 --- a/libc/ports/sysdeps/hppa/dl-fptr.c +++ b/libc/ports/sysdeps/hppa/dl-fptr.c @@ -99,7 +99,7 @@ new_fdesc_table (struct local *l, size_t *size) } /* Must call _dl_fptr_init before using any other function. */ -void +void _dl_fptr_init (void) { struct local *l; diff --git a/libc/ports/sysdeps/hppa/dl-fptr.h b/libc/ports/sysdeps/hppa/dl-fptr.h index d3f8a9616..50a5b2f6d 100644 --- a/libc/ports/sysdeps/hppa/dl-fptr.h +++ b/libc/ports/sysdeps/hppa/dl-fptr.h @@ -26,7 +26,7 @@ extern void _dl_fptr_init (void); /* There are currently 33 dynamic symbols in ld.so. ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */ -#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 64 +#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 64 #define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \ asm ( \ diff --git a/libc/ports/sysdeps/hppa/dl-irel.h b/libc/ports/sysdeps/hppa/dl-irel.h index 86a58e582..460719414 100644 --- a/libc/ports/sysdeps/hppa/dl-irel.h +++ b/libc/ports/sysdeps/hppa/dl-irel.h @@ -30,7 +30,7 @@ /* Implement enough to get the build going again. */ #warning "NEED STT_GNU_IFUNC IMPLEMENTATION" -static inline struct fdesc +static inline struct fdesc __attribute ((always_inline)) elf_ifunc_invoke (uintptr_t addr) { diff --git a/libc/ports/sysdeps/hppa/dl-trampoline.S b/libc/ports/sysdeps/hppa/dl-trampoline.S index 4d1d7f433..7fda14a7c 100644 --- a/libc/ports/sysdeps/hppa/dl-trampoline.S +++ b/libc/ports/sysdeps/hppa/dl-trampoline.S @@ -19,18 +19,18 @@ #include <sysdep.h> /* This code gets called via the .plt stub, and is used in - dl-runtime.c to call the `_dl_fixup' function and then redirect - to the address it returns. `_dl_fixup' takes two arguments, however - `_dl_profile_fixup' takes a number of parameters for use with + dl-runtime.c to call the `_dl_fixup' function and then redirect + to the address it returns. `_dl_fixup' takes two arguments, however + `_dl_profile_fixup' takes a number of parameters for use with library auditing (LA). - + WARNING: This template is also used by gcc's __cffc, and expects that the "bl" for _dl_runtime_resolve exist at a particular offset. Do not change this template without changing gcc, while the prefix "bl" should fix everything so gcc finds the right spot, it will slow down __cffc when it attempts to call fixup to resolve function descriptor references. Please refer to gcc/gcc/config/pa/fptr.c - + Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */ /* RELOCATION MARKER: bl to provide gcc's __cffc with fixup loc. */ @@ -136,14 +136,14 @@ _dl_runtime_profile: stw %r21,-32(%sp) /* PIC register value */ /* Create La_hppa_retval */ - /* -140, lrv_r28 + /* -140, lrv_r28 -136, lrv_r29 - -132, 4 byte pad + -132, 4 byte pad -128, lr_fr4 (8 bytes) */ /* Create save space for _dl_profile_fixup arguments - -120, Saved reloc offset - -116, Saved struct link_map + -120, Saved reloc offset + -116, Saved struct link_map -112, *framesizep */ /* Create La_hppa_regs */ @@ -216,7 +216,7 @@ L(nf): b,n L(cont) L(cpe): - /* We are going to call the resolved function, but we have a + /* We are going to call the resolved function, but we have a stack frame in the middle. We use the value of framesize to guess how much extra frame we need, and how much frame to copy forward. */ @@ -254,7 +254,7 @@ L(cont): copy %r1, %sp /* Arguments to _dl_call_pltexit */ - ldw -116(%sp), %r26 /* (1) got[1] == struct link_map */ + ldw -116(%sp), %r26 /* (1) got[1] == struct link_map */ ldw -120(%sp), %r25 /* (2) reloc offsets */ ldo -56(%sp), %r24 /* (3) *La_hppa_regs */ ldo -124(%sp), %r23 /* (4) *La_hppa_retval */ diff --git a/libc/ports/sysdeps/hppa/fpu/bits/fenv.h b/libc/ports/sysdeps/hppa/fpu/bits/fenv.h index 7fd14f12d..edbc9b166 100644 --- a/libc/ports/sysdeps/hppa/fpu/bits/fenv.h +++ b/libc/ports/sysdeps/hppa/fpu/bits/fenv.h @@ -74,7 +74,7 @@ typedef unsigned int fexcept_t; userspace. This structure is also not correctly aligned ever, in an ABI error we left out __aligned(8) and subsequently all of our fenv functions must accept unaligned input, align the input, and - then use assembly to store fr0. This is a performance hit, but + then use assembly to store fr0. This is a performance hit, but means the ABI is stable. */ typedef struct { diff --git a/libc/ports/sysdeps/hppa/fpu/fedisblxcpt.c b/libc/ports/sysdeps/hppa/fpu/fedisblxcpt.c index de03bc942..6d80b0209 100644 --- a/libc/ports/sysdeps/hppa/fpu/fedisblxcpt.c +++ b/libc/ports/sysdeps/hppa/fpu/fedisblxcpt.c @@ -22,7 +22,7 @@ int fedisableexcept (int excepts) { - union { unsigned long long l; unsigned int sw[2]; } s; + union { unsigned long long l; unsigned int sw[2]; } s; unsigned int old_exc; /* Get the current status word. */ diff --git a/libc/ports/sysdeps/hppa/fpu/fegetenv.c b/libc/ports/sysdeps/hppa/fpu/fegetenv.c index 0b1d4a897..590a1177e 100644 --- a/libc/ports/sysdeps/hppa/fpu/fegetenv.c +++ b/libc/ports/sysdeps/hppa/fpu/fegetenv.c @@ -24,7 +24,7 @@ int fegetenv (fenv_t *envp) { unsigned long long buf[4], *bufptr = buf; - + __asm__ ( "fstd,ma %%fr0,8(%1) \n\t" "fldd -8(%1),%%fr0 \n\t" diff --git a/libc/ports/sysdeps/hppa/fpu/fegetexcept.c b/libc/ports/sysdeps/hppa/fpu/fegetexcept.c index 102a723cb..181cdb520 100644 --- a/libc/ports/sysdeps/hppa/fpu/fegetexcept.c +++ b/libc/ports/sysdeps/hppa/fpu/fegetexcept.c @@ -25,7 +25,7 @@ fegetexcept (void) union { unsigned long long l; unsigned int sw[2] } s; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1) \n\t" + __asm__ ("fstd %%fr0,0(%1) \n\t" "fldd 0(%1),%%fr0 \n\t" : "=m" (s.l) : "r" (&s.l) : "%r0"); diff --git a/libc/ports/sysdeps/hppa/fpu/feholdexcpt.c b/libc/ports/sysdeps/hppa/fpu/feholdexcpt.c index 5129f8974..c351fa4e1 100644 --- a/libc/ports/sysdeps/hppa/fpu/feholdexcpt.c +++ b/libc/ports/sysdeps/hppa/fpu/feholdexcpt.c @@ -40,7 +40,7 @@ feholdexcept (fenv_t *envp) /* Now clear all flags */ clear.env.__status_word &= ~(FE_ALL_EXCEPT << 27); - /* Load the new environment. Note: fr0 must load last to enable T-bit + /* Load the new environment. Note: fr0 must load last to enable T-bit Thus we start bufptr at the end and work backwards */ bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4); __asm__ ( diff --git a/libc/ports/sysdeps/hppa/fpu/fesetenv.c b/libc/ports/sysdeps/hppa/fpu/fesetenv.c index fd2794200..e845b2c8d 100644 --- a/libc/ports/sysdeps/hppa/fpu/fesetenv.c +++ b/libc/ports/sysdeps/hppa/fpu/fesetenv.c @@ -49,7 +49,7 @@ fesetenv (const fenv_t *envp) | FE_DOWNWARD | (FE_ALL_EXCEPT << 27))); - /* Load the new environment. We use bufptr again since the + /* Load the new environment. We use bufptr again since the initial asm has modified the value of the register and here we take advantage of that to load in reverse order so fr0 is loaded last and T-Bit is enabled. */ diff --git a/libc/ports/sysdeps/hppa/fpu/fesetround.c b/libc/ports/sysdeps/hppa/fpu/fesetround.c index 8516ff0a7..89d68814d 100644 --- a/libc/ports/sysdeps/hppa/fpu/fesetround.c +++ b/libc/ports/sysdeps/hppa/fpu/fesetround.c @@ -27,7 +27,7 @@ fesetround (int round) if (round & ~FE_DOWNWARD) /* round is not a valid rounding mode. */ return 1; - + /* Get the current status word. */ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0"); s.sw[0] &= ~FE_DOWNWARD; diff --git a/libc/ports/sysdeps/hppa/fpu/feupdateenv.c b/libc/ports/sysdeps/hppa/fpu/feupdateenv.c index 20573147c..ce60dfe7f 100644 --- a/libc/ports/sysdeps/hppa/fpu/feupdateenv.c +++ b/libc/ports/sysdeps/hppa/fpu/feupdateenv.c @@ -26,8 +26,8 @@ feupdateenv (const fenv_t *envp) union { unsigned long long l; unsigned int sw[2]; } s; fenv_t temp; /* Get the current exception status */ - __asm__ ("fstd %%fr0,0(%1) \n\t" - "fldd 0(%1),%%fr0 \n\t" + __asm__ ("fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" : "=m" (s.l) : "r" (&s.l)); memcpy(&temp, envp, sizeof(fenv_t)); /* Currently raised exceptions not cleared */ diff --git a/libc/ports/sysdeps/hppa/fpu/fgetexcptflg.c b/libc/ports/sysdeps/hppa/fpu/fgetexcptflg.c index 87f8db80d..580951e4d 100644 --- a/libc/ports/sysdeps/hppa/fpu/fgetexcptflg.c +++ b/libc/ports/sysdeps/hppa/fpu/fgetexcptflg.c @@ -25,8 +25,8 @@ fegetexceptflag (fexcept_t *flagp, int excepts) union { unsigned long long l; unsigned int sw[2]; } s; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1) \n\t" - "fldd 0(%1),%%fr0 \n\t" + __asm__ ("fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" : "=m" (s.l) : "r" (&s.l) : "%r0"); *flagp = (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT; diff --git a/libc/ports/sysdeps/hppa/fpu/fraiseexcpt.c b/libc/ports/sysdeps/hppa/fpu/fraiseexcpt.c index 204695c22..0b55d3439 100644 --- a/libc/ports/sysdeps/hppa/fpu/fraiseexcpt.c +++ b/libc/ports/sysdeps/hppa/fpu/fraiseexcpt.c @@ -21,7 +21,7 @@ #include <float.h> #include <math.h> -/* Please see section 10, +/* Please see section 10, page 10-5 "Delayed Trapping" in the PA-RISC 2.0 Architecture manual */ int @@ -38,7 +38,7 @@ feraiseexcept (int excepts) occur. */ /* We use "fldd 0(%%sr0,%%sp),%0" to flush the delayed exception */ - + /* First: Invalid exception. */ if (excepts & FE_INVALID) { diff --git a/libc/ports/sysdeps/hppa/fpu/ftestexcept.c b/libc/ports/sysdeps/hppa/fpu/ftestexcept.c index f438fa5e3..bf57879ed 100644 --- a/libc/ports/sysdeps/hppa/fpu/ftestexcept.c +++ b/libc/ports/sysdeps/hppa/fpu/ftestexcept.c @@ -25,8 +25,8 @@ fetestexcept (int excepts) union { unsigned long long l; unsigned int sw[2] } s; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1) \n\t" - "fldd 0(%1),%%fr0 \n\t" + __asm__ ("fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" : "=m" (s.l) : "r" (&s.l)); return (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT; diff --git a/libc/ports/sysdeps/hppa/hppa1.1/addmul_1.S b/libc/ports/sysdeps/hppa/hppa1.1/addmul_1.S index caee4feb2..143497924 100644 --- a/libc/ports/sysdeps/hppa/hppa1.1/addmul_1.S +++ b/libc/ports/sysdeps/hppa/hppa1.1/addmul_1.S @@ -37,7 +37,7 @@ .text .export __mpn_addmul_1 -__mpn_addmul_1: +__mpn_addmul_1: .proc .callinfo frame=64,no_calls .entry @@ -60,7 +60,7 @@ __mpn_addmul_1: ldw -12(%r30),%r1 ;! Main loop -L$loop: +L$loop: ldws 0(%r26),%r29 fldws,ma 4(%r25),%fr5 add %r29,%r20,%r20 @@ -73,7 +73,7 @@ L$loop: addib,<> -1,%r24,L$loop ldw -12(%r30),%r1 -L$end: +L$end: ldw 0(%r26),%r29 add %r29,%r20,%r20 stws,ma %r20,4(%r26) @@ -87,7 +87,7 @@ L$end: bv 0(%r2) ldo -64(%r30),%r30 -L$just_one_limb: +L$just_one_limb: xmpyu %fr4,%fr5,%fr6 ldw 0(%r26),%r29 fstds %fr6,-16(%r30) diff --git a/libc/ports/sysdeps/hppa/hppa1.1/mul_1.S b/libc/ports/sysdeps/hppa/hppa1.1/mul_1.S index d20cf7566..ba419fd33 100644 --- a/libc/ports/sysdeps/hppa/hppa1.1/mul_1.S +++ b/libc/ports/sysdeps/hppa/hppa1.1/mul_1.S @@ -45,7 +45,7 @@ .text .export __mpn_mul_1 -__mpn_mul_1: +__mpn_mul_1: .proc .callinfo frame=64,no_calls .entry @@ -68,7 +68,7 @@ __mpn_mul_1: ldw -12(%r30),%r1 ;! Main loop -L$loop: +L$loop: fldws,ma 4(%r25),%fr5 stws,ma %r20,4(%r26) addc %r28,%r1,%r20 @@ -78,7 +78,7 @@ L$loop: addib,<> -1,%r24,L$loop ldw -12(%r30),%r1 -L$end: +L$end: stws,ma %r20,4(%r26) addc %r28,%r1,%r20 ldw -16(%r30),%r28 @@ -87,7 +87,7 @@ L$end: bv 0(%r2) ldo -64(%r30),%r30 -L$just_one_limb: +L$just_one_limb: xmpyu %fr4,%fr5,%fr6 fstds %fr6,-16(%r30) ldw -16(%r30),%r28 diff --git a/libc/ports/sysdeps/hppa/hppa1.1/submul_1.S b/libc/ports/sysdeps/hppa/hppa1.1/submul_1.S index 31275a159..8cd5a634f 100644 --- a/libc/ports/sysdeps/hppa/hppa1.1/submul_1.S +++ b/libc/ports/sysdeps/hppa/hppa1.1/submul_1.S @@ -42,7 +42,7 @@ .text .export __mpn_submul_1 -__mpn_submul_1: +__mpn_submul_1: .proc .callinfo frame=64,no_calls .entry @@ -65,7 +65,7 @@ __mpn_submul_1: ldw -12(%r30),%r1 ;! Main loop -L$loop: +L$loop: ldws 0(%r26),%r29 fldws,ma 4(%r25),%fr5 sub %r29,%r20,%r22 @@ -79,7 +79,7 @@ L$loop: addib,<> -1,%r24,L$loop ldw -12(%r30),%r1 -L$end: +L$end: ldw 0(%r26),%r29 sub %r29,%r20,%r22 add %r22,%r20,%r0 @@ -95,7 +95,7 @@ L$end: bv 0(%r2) ldo -64(%r30),%r30 -L$just_one_limb: +L$just_one_limb: xmpyu %fr4,%fr5,%fr6 ldw 0(%r26),%r29 fstds %fr6,-16(%r30) diff --git a/libc/ports/sysdeps/hppa/hppa1.1/udiv_qrnnd.S b/libc/ports/sysdeps/hppa/hppa1.1/udiv_qrnnd.S index 33d6efce4..c7fa30f34 100644 --- a/libc/ports/sysdeps/hppa/hppa1.1/udiv_qrnnd.S +++ b/libc/ports/sysdeps/hppa/hppa1.1/udiv_qrnnd.S @@ -27,11 +27,11 @@ ;! d gr23 .text -L$0000: +L$0000: .word 0x43f00000 .word 0x0 .export __udiv_qrnnd -__udiv_qrnnd: +__udiv_qrnnd: .proc .callinfo frame=64,no_calls .entry @@ -48,7 +48,7 @@ L$0: fcnvxf,dbl,dbl %fr5,%fr5 fldds 0(%r1),%fr4 fadd,dbl %fr4,%fr5,%fr5 -L$1: +L$1: fcpy,sgl %fr0,%fr6L fldws -12(%r30),%fr6R fcnvxf,dbl,dbl %fr6,%fr4 @@ -69,7 +69,7 @@ L$1: add %r22,%r23,%r22 ldo -1(%r28),%r28 -L$2: +L$2: bv 0(%r2) stws %r22,0(%r26) diff --git a/libc/ports/sysdeps/hppa/nptl/pthread_spin_init.c b/libc/ports/sysdeps/hppa/nptl/pthread_spin_init.c index df3dc4c2e..c46e00cc8 100644 --- a/libc/ports/sysdeps/hppa/nptl/pthread_spin_init.c +++ b/libc/ports/sysdeps/hppa/nptl/pthread_spin_init.c @@ -23,6 +23,6 @@ pthread_spin_init (pthread_spinlock_t *lock, int pshared) int tmp = 0; /* This should be a memory barrier to newer compilers */ __asm__ __volatile__ ("stw,ma %1,0(%0)" - : : "r" (lock), "r" (tmp) : "memory"); + : : "r" (lock), "r" (tmp) : "memory"); return 0; } diff --git a/libc/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c b/libc/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c index f256a66f1..6b9d79c7b 100644 --- a/libc/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c +++ b/libc/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c @@ -23,6 +23,6 @@ pthread_spin_unlock (pthread_spinlock_t *lock) int tmp = 0; /* This should be a memory barrier to newer compilers */ __asm__ __volatile__ ("stw,ma %1,0(%0)" - : : "r" (lock), "r" (tmp) : "memory"); + : : "r" (lock), "r" (tmp) : "memory"); return 0; } diff --git a/libc/ports/sysdeps/hppa/nptl/tls.h b/libc/ports/sysdeps/hppa/nptl/tls.h index fe8d8fc22..14e4705bf 100644 --- a/libc/ports/sysdeps/hppa/nptl/tls.h +++ b/libc/ports/sysdeps/hppa/nptl/tls.h @@ -115,7 +115,7 @@ typedef struct elf_gregset_t. The thread descriptor is sizeof (struct pthread) away. */ # define DB_THREAD_SELF \ REGISTER (32, 32, 53 * 4, -sizeof (struct pthread)) - + /* Access to data in the thread descriptor is easy. */ # define THREAD_GETMEM(descr, member) \ descr->member diff --git a/libc/ports/sysdeps/hppa/rshift.S b/libc/ports/sysdeps/hppa/rshift.S index 4356455f2..026fad5af 100644 --- a/libc/ports/sysdeps/hppa/rshift.S +++ b/libc/ports/sysdeps/hppa/rshift.S @@ -1,4 +1,4 @@ -;! HP-PA __mpn_rshift -- +;! HP-PA __mpn_rshift -- ;! Copyright (C) 1992-2013 Free Software Foundation, Inc. diff --git a/libc/ports/sysdeps/hppa/start.S b/libc/ports/sysdeps/hppa/start.S index 07a490fd2..df8bad829 100644 --- a/libc/ports/sysdeps/hppa/start.S +++ b/libc/ports/sysdeps/hppa/start.S @@ -39,8 +39,8 @@ .import __libc_csu_fini, code .import __libc_csu_init, code - /* Have the linker create plabel words so we get PLABEL32 - relocs and not 21/14. The use of 21/14 relocs is only + /* Have the linker create plabel words so we get PLABEL32 + relocs and not 21/14. The use of 21/14 relocs is only supported in the latest dynamic linker. */ .section .rodata .align 4 @@ -66,7 +66,7 @@ _start: r24 - argv r23 - False _dl_fini plabel address - This function is called from the lower half of RTLD_START. + This function is called from the lower half of RTLD_START. The call to __libc_start_main expects: @@ -76,7 +76,7 @@ _start: 4. r23 - __libc_csu_init 5. sp-52 - __libc_csu_fini 6. sp-56 - rtld_fini - 7. sp-60 - stackend */ + 7. sp-60 - stackend */ .proc .callinfo diff --git a/libc/ports/sysdeps/hppa/sysdep.h b/libc/ports/sysdeps/hppa/sysdep.h index b7183063b..7c9edd42a 100644 --- a/libc/ports/sysdeps/hppa/sysdep.h +++ b/libc/ports/sysdeps/hppa/sysdep.h @@ -22,7 +22,7 @@ #include "config.h" #undef ASM_LINE_SEP -#define ASM_LINE_SEP ! +#define ASM_LINE_SEP ! #ifdef __ASSEMBLER__ @@ -51,7 +51,7 @@ /* GCC does everything for us. */ #ifdef PROF -#define CALL_MCOUNT +#define CALL_MCOUNT #else #define CALL_MCOUNT /* Do nothing. */ #endif diff --git a/libc/ports/sysdeps/ia64/bits/byteswap-16.h b/libc/ports/sysdeps/ia64/bits/byteswap-16.h index 2ff9b749c..d91824e5b 100644 --- a/libc/ports/sysdeps/ia64/bits/byteswap-16.h +++ b/libc/ports/sysdeps/ia64/bits/byteswap-16.h @@ -23,7 +23,7 @@ #if defined __GNUC__ && __GNUC__ >= 2 # define __bswap_16(x) \ (__extension__ \ - ({ register unsigned short int __v, __x = (unsigned short int) (x); \ + ({ unsigned short int __v, __x = (unsigned short int) (x); \ if (__builtin_constant_p (x)) \ __v = __bswap_constant_16 (__x); \ else \ diff --git a/libc/ports/sysdeps/ia64/bits/byteswap.h b/libc/ports/sysdeps/ia64/bits/byteswap.h index b9b590269..447cadfe7 100644 --- a/libc/ports/sysdeps/ia64/bits/byteswap.h +++ b/libc/ports/sysdeps/ia64/bits/byteswap.h @@ -38,7 +38,7 @@ #if defined __GNUC__ && __GNUC__ >= 2 # define __bswap_32(x) \ (__extension__ \ - ({ register unsigned int __v, __x = (x); \ + ({ unsigned int __v, __x = (x); \ if (__builtin_constant_p (x)) \ __v = __bswap_constant_32 (__x); \ else \ @@ -70,7 +70,7 @@ __bswap_32 (unsigned int __bsx) # define __bswap_64(x) \ (__extension__ \ - ({ register unsigned long int __v, __x = (x); \ + ({ unsigned long int __v, __x = (x); \ if (__builtin_constant_p (x)) \ __v = __bswap_constant_64 (__x); \ else \ diff --git a/libc/ports/sysdeps/mips/__longjmp.c b/libc/ports/sysdeps/mips/__longjmp.c index 67bdb86cf..d1d7d64df 100644 --- a/libc/ports/sysdeps/mips/__longjmp.c +++ b/libc/ports/sysdeps/mips/__longjmp.c @@ -47,10 +47,6 @@ ____longjmp (env_arg, val_arg) asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[3])); asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4])); asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5])); - - /* Get and reconstruct the floating point csr. */ - asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr)); - asm volatile ("ctc1 $2, $31"); #endif /* Get the GP. */ diff --git a/libc/ports/sysdeps/mips/bits/setjmp.h b/libc/ports/sysdeps/mips/bits/setjmp.h index d35b12dc6..437848fcb 100644 --- a/libc/ports/sysdeps/mips/bits/setjmp.h +++ b/libc/ports/sysdeps/mips/bits/setjmp.h @@ -59,8 +59,8 @@ typedef struct __jmp_buf_internal_tag __extension__ long long __gp; #endif - /* Floating point status register. */ - int __fpc_csr; + /* Unused (was floating point status register). */ + int __glibc_reserved1; /* Callee-saved floating point registers. */ #if _MIPS_SIM == _ABI64 diff --git a/libc/ports/sysdeps/mips/fpu/fgetexcptflg.c b/libc/ports/sysdeps/mips/fpu/fgetexcptflg.c index b620d2efa..436ba3e3f 100644 --- a/libc/ports/sysdeps/mips/fpu/fgetexcptflg.c +++ b/libc/ports/sysdeps/mips/fpu/fgetexcptflg.c @@ -28,7 +28,7 @@ fegetexceptflag (fexcept_t *flagp, int excepts) /* Get the current exceptions. */ _FPU_GETCW (temp); - /* We only save the relevant bits here. In particular, care has to be + /* We only save the relevant bits here. In particular, care has to be taken with the CAUSE bits, as an inadvertent restore later on could generate unexpected exceptions. */ diff --git a/libc/ports/sysdeps/mips/fpu/fraiseexcpt.c b/libc/ports/sysdeps/mips/fpu/fraiseexcpt.c index ca9625003..afd966ac8 100644 --- a/libc/ports/sysdeps/mips/fpu/fraiseexcpt.c +++ b/libc/ports/sysdeps/mips/fpu/fraiseexcpt.c @@ -29,7 +29,7 @@ feraiseexcept (int excepts) /* Get current state. */ _FPU_GETCW (cw); - /* Set flag bits (which are accumulative), and *also* set the + /* Set flag bits (which are accumulative), and *also* set the cause bits. The setting of the cause bits is what actually causes the hardware to generate the exception, if the corresponding enable bit is set as well. */ diff --git a/libc/ports/sysdeps/mips/math-tests.h b/libc/ports/sysdeps/mips/math-tests.h new file mode 100644 index 000000000..d2edd464b --- /dev/null +++ b/libc/ports/sysdeps/mips/math-tests.h @@ -0,0 +1,37 @@ +/* Configuration for math tests. MIPS version. + Copyright (C) 2013 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sgidefs.h> + +/* MIPS soft float does not support exceptions and rounding modes, and + long double when wider than double is implemented using fp-bit + which does not integrate with hardware exceptions and rounding + modes. */ +#ifdef __mips_soft_float +# define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST) +# define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST) +# define ROUNDING_TESTS_long_double(MODE) ((MODE) == FE_TONEAREST) +# define EXCEPTION_TESTS_float 0 +# define EXCEPTION_TESTS_double 0 +# define EXCEPTION_TESTS_long_double 0 +#elif _MIPS_SIM != _ABIO32 +# define ROUNDING_TESTS_long_double(MODE) ((MODE) == FE_TONEAREST) +# define EXCEPTION_TESTS_long_double 0 +#endif + +#include_next <math-tests.h> diff --git a/libc/ports/sysdeps/mips/memset.S b/libc/ports/sysdeps/mips/memset.S index 78dab481d..85062fe2e 100644 --- a/libc/ports/sysdeps/mips/memset.S +++ b/libc/ports/sysdeps/mips/memset.S @@ -42,7 +42,7 @@ ENTRY (memset) sll t0, a1, 16 or a1, t0 # a1 is now pattern in full word -L(ueven): +L(ueven): subu t0, zero, a0 # Unaligned address? andi t0, 0x3 beq t0, zero, L(chkw) @@ -50,33 +50,33 @@ L(ueven): SWHI a1, 0(a0) # Yes, handle first unaligned part addu a0, t0 # Now both a0 and a2 are updated -L(chkw): +L(chkw): andi t0, a2, 0x7 # Enough left for one loop iteration? beq t0, a2, L(chkl) subu a3, a2, t0 addu a3, a0 # a3 is last loop address +1 move a2, t0 # a2 is now # of bytes left after loop -L(loopw): +L(loopw): addiu a0, 8 # Handle 2 words pr. iteration sw a1, -8(a0) bne a0, a3, L(loopw) sw a1, -4(a0) -L(chkl): +L(chkl): andi t0, a2, 0x4 # Check if there is at least a full beq t0, zero, L(last8) # word remaining after the loop subu a2, t0 sw a1, 0(a0) # Yes... addiu a0, 4 -L(last8): +L(last8): blez a2, L(exit) # Handle last 8 bytes (if cnt>0) addu a3, a2, a0 # a3 is last address +1 -L(lst8l): +L(lst8l): addiu a0, 1 bne a0, a3, L(lst8l) sb a1, -1(a0) -L(exit): +L(exit): j ra # Bye, bye nop diff --git a/libc/ports/sysdeps/mips/mips64/__longjmp.c b/libc/ports/sysdeps/mips/mips64/__longjmp.c index 1e42e9c28..bffb1137c 100644 --- a/libc/ports/sysdeps/mips/mips64/__longjmp.c +++ b/libc/ports/sysdeps/mips/mips64/__longjmp.c @@ -59,10 +59,6 @@ __longjmp (env_arg, val_arg) asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4])); asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5])); #endif - - /* Get and reconstruct the floating point csr. */ - asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr)); - asm volatile ("ctc1 $2, $31"); #endif /* Get the GP. */ diff --git a/libc/ports/sysdeps/mips/mips64/bsd-_setjmp.S b/libc/ports/sysdeps/mips/mips64/bsd-_setjmp.S index 5d0f76c13..d0416a70b 100644 --- a/libc/ports/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/libc/ports/sysdeps/mips/mips64/bsd-_setjmp.S @@ -35,7 +35,7 @@ ENTRY (_setjmp) PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) #if _MIPS_SIM == _ABIO32 nop -#endif +#endif RESTORE_GP64_REG move a1, zero /* Pass a second argument of zero. */ #ifdef __PIC__ diff --git a/libc/ports/sysdeps/mips/mips64/bsd-setjmp.S b/libc/ports/sysdeps/mips/mips64/bsd-setjmp.S index 784e16e33..7203540e7 100644 --- a/libc/ports/sysdeps/mips/mips64/bsd-setjmp.S +++ b/libc/ports/sysdeps/mips/mips64/bsd-setjmp.S @@ -35,7 +35,7 @@ ENTRY (setjmp) PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) #if _MIPS_SIM == _ABIO32 nop -#endif +#endif RESTORE_GP64_REG dli a1, 1 /* Pass a second argument of one. */ #ifdef __PIC__ diff --git a/libc/ports/sysdeps/mips/mips64/memset.S b/libc/ports/sysdeps/mips/mips64/memset.S index 382b0f482..645333526 100644 --- a/libc/ports/sysdeps/mips/mips64/memset.S +++ b/libc/ports/sysdeps/mips/mips64/memset.S @@ -22,7 +22,7 @@ /* void *memset(void *s, int c, size_t n); - + This could probably be optimized further. */ #if __MIPSEB diff --git a/libc/ports/sysdeps/mips/mips64/setjmp.S b/libc/ports/sysdeps/mips/mips64/setjmp.S index 5afbbe756..f0aa814c6 100644 --- a/libc/ports/sysdeps/mips/mips64/setjmp.S +++ b/libc/ports/sysdeps/mips/mips64/setjmp.S @@ -35,7 +35,7 @@ ENTRY (__sigsetjmp) PTR_LA t9, __sigsetjmp_aux #if _MIPS_SIM == _ABIO32 nop -#endif +#endif RESTORE_GP64_REG #if _MIPS_SIM != _ABIO32 move a4, gp diff --git a/libc/ports/sysdeps/mips/mips64/setjmp_aux.c b/libc/ports/sysdeps/mips/mips64/setjmp_aux.c index 9515f44b8..931830391 100644 --- a/libc/ports/sysdeps/mips/mips64/setjmp_aux.c +++ b/libc/ports/sysdeps/mips/mips64/setjmp_aux.c @@ -71,11 +71,6 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, asm volatile ("sd $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); asm volatile ("sd $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); -#ifdef __mips_hard_float - /* .. and finally get and reconstruct the floating point csr. */ - asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr)); -#endif - /* Save the signal mask if requested. */ return __sigjmp_save (env, savemask); } diff --git a/libc/ports/sysdeps/mips/setjmp_aux.c b/libc/ports/sysdeps/mips/setjmp_aux.c index cb9ea245b..26715b77d 100644 --- a/libc/ports/sysdeps/mips/setjmp_aux.c +++ b/libc/ports/sysdeps/mips/setjmp_aux.c @@ -58,11 +58,6 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); -#ifdef __mips_hard_float - /* .. and finally get and reconstruct the floating point csr. */ - asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr)); -#endif - /* Save the signal mask if requested. */ return __sigjmp_save (env, savemask); } diff --git a/libc/ports/sysdeps/mips/start.S b/libc/ports/sysdeps/mips/start.S index 83a68959a..75ab47739 100644 --- a/libc/ports/sysdeps/mips/start.S +++ b/libc/ports/sysdeps/mips/start.S @@ -70,7 +70,7 @@ char **argv, void (*init) (void), void (*fini) (void), void (*rtld_fini) (void), void *stack_end) */ - + .text .globl ENTRY_POINT .type ENTRY_POINT,@function @@ -87,11 +87,11 @@ ENTRY_POINT: PTR_LA $4, main /* main */ PTR_L $5, 0($29) /* argc */ PTR_ADDIU $6, $29, PTRSIZE /* argv */ - + /* Allocate space on the stack for seven arguments (o32 only) - and make sure the stack is aligned to double words (8 bytes) + and make sure the stack is aligned to double words (8 bytes) on o32 and quad words (16 bytes) on n32 and n64. */ - + and $29, -2 * SZREG # if _MIPS_SIM == _ABIO32 PTR_SUBIU $29, 32 diff --git a/libc/ports/sysdeps/powerpc/dl-procinfo.c b/libc/ports/sysdeps/powerpc/dl-procinfo.c deleted file mode 100644 index 0f5c2b3d6..000000000 --- a/libc/ports/sysdeps/powerpc/dl-procinfo.c +++ /dev/null @@ -1,96 +0,0 @@ -/* Data for processor capability information. PowerPC version. - Copyright (C) 2005-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -/* This information must be kept in sync with the _DL_HWCAP_COUNT and - _DL_PLATFORM_COUNT definitions in procinfo.h. - - If anything should be added here check whether the size of each string - is still ok with the given array size. - - All the #ifdefs in the definitions are quite irritating but - necessary if we want to avoid duplicating the information. There - are three different modes: - - - PROCINFO_DECL is defined. This means we are only interested in - declarations. - - - PROCINFO_DECL is not defined: - - + if SHARED is defined the file is included in an array - initializer. The .element = { ... } syntax is needed. - - + if SHARED is not defined a normal array initialization is - needed. - */ - -#ifndef PROCINFO_CLASS -# define PROCINFO_CLASS -#endif - -#if !defined PROCINFO_DECL && defined SHARED - ._dl_powerpc_cap_flags -#else -PROCINFO_CLASS const char _dl_powerpc_cap_flags[25][10] -#endif -#ifndef PROCINFO_DECL -= { - "vsx", - "arch_2_06", "power6x", "dfp", "pa6t", - "arch_2_05", "ic_snoop", "smt", "booke", - "cellbe", "power5+", "power5", "power4", - "notb", "efpdouble", "efpsingle", "spe", - "ucache", "4xxmac", "mmu", "fpu", - "altivec", "ppc601", "ppc64", "ppc32", - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - -#if !defined PROCINFO_DECL && defined SHARED - ._dl_powerpc_platforms -#else -PROCINFO_CLASS const char _dl_powerpc_platforms[13][12] -#endif -#ifndef PROCINFO_DECL -= { - [PPC_PLATFORM_POWER4] = "power4", - [PPC_PLATFORM_PPC970] = "ppc970", - [PPC_PLATFORM_POWER5] = "power5", - [PPC_PLATFORM_POWER5_PLUS] = "power5+", - [PPC_PLATFORM_POWER6] = "power6", - [PPC_PLATFORM_CELL_BE] = "ppc-cell-be", - [PPC_PLATFORM_POWER6X] = "power6x", - [PPC_PLATFORM_POWER7] = "power7", - [PPC_PLATFORM_PPCA2] = "ppca2", - [PPC_PLATFORM_PPC405] = "ppc405", - [PPC_PLATFORM_PPC440] = "ppc440", - [PPC_PLATFORM_PPC464] = "ppc464", - [PPC_PLATFORM_PPC476] = "ppc476" - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - -#undef PROCINFO_DECL -#undef PROCINFO_CLASS diff --git a/libc/ports/sysdeps/powerpc/dl-procinfo.h b/libc/ports/sysdeps/powerpc/dl-procinfo.h deleted file mode 100644 index b45465c3d..000000000 --- a/libc/ports/sysdeps/powerpc/dl-procinfo.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Processor capability information handling macros. PowerPC version. - Copyright (C) 2005-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 - -#include <ldsodefs.h> -#include <sysdep.h> /* This defines the PPC_FEATURE_* macros. */ - -/* There are 25 bits used, but they are bits 7..31. */ -#define _DL_HWCAP_FIRST 7 -#define _DL_HWCAP_COUNT 32 - -/* These bits influence library search. */ -#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ - + PPC_FEATURE_HAS_DFP) - -#define _DL_PLATFORMS_COUNT 13 - -#define _DL_FIRST_PLATFORM 32 -/* Mask to filter out platforms. */ -#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \ - << _DL_FIRST_PLATFORM) - -/* Platform bits (relative to _DL_FIRST_PLATFORM). */ -#define PPC_PLATFORM_POWER4 0 -#define PPC_PLATFORM_PPC970 1 -#define PPC_PLATFORM_POWER5 2 -#define PPC_PLATFORM_POWER5_PLUS 3 -#define PPC_PLATFORM_POWER6 4 -#define PPC_PLATFORM_CELL_BE 5 -#define PPC_PLATFORM_POWER6X 6 -#define PPC_PLATFORM_POWER7 7 -#define PPC_PLATFORM_PPCA2 8 -#define PPC_PLATFORM_PPC405 9 -#define PPC_PLATFORM_PPC440 10 -#define PPC_PLATFORM_PPC464 11 -#define PPC_PLATFORM_PPC476 12 - -static inline const char * -__attribute__ ((unused)) -_dl_hwcap_string (int idx) -{ - return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST]; -} - -static inline const char * -__attribute__ ((unused)) -_dl_platform_string (int idx) -{ - return GLRO(dl_powerpc_platforms)[idx - _DL_FIRST_PLATFORM]; -} - -static inline int -__attribute__ ((unused)) -_dl_string_hwcap (const char *str) -{ - for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i) - if (strcmp (str, _dl_hwcap_string (i)) == 0) - return i; - return -1; -} - -static inline int -__attribute__ ((unused, always_inline)) -_dl_string_platform (const char *str) -{ - if (str == NULL) - return -1; - - if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_POWER4], 5) == 0) - { - int ret; - str += 5; - switch (*str) - { - case '4': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER4; - break; - case '5': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5; - if (str[1] == '+') - { - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5_PLUS; - ++str; - } - break; - case '6': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6; - if (str[1] == 'x') - { - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6X; - ++str; - } - break; - case '7': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER7; - break; - default: - return -1; - } - if (str[1] == '\0') - return ret; - } - else if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970], - 3) == 0) - { - if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970] - + 3) == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC970; - else if (strcmp (str + 3, - GLRO(dl_powerpc_platforms)[PPC_PLATFORM_CELL_BE] + 3) - == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_CELL_BE; - else if (strcmp (str + 3, - GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPCA2] + 3) - == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPCA2; - else if (strcmp (str + 3, - GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC405] + 3) - == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC405; - else if (strcmp (str + 3, - GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC440] + 3) - == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC440; - else if (strcmp (str + 3, - GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC464] + 3) - == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC464; - else if (strcmp (str + 3, - GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC476] + 3) - == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC476; - } - - return -1; -} - -#ifdef IS_IN_rtld -static inline int -__attribute__ ((unused)) -_dl_procinfo (int word) -{ - _dl_printf ("AT_HWCAP: "); - - for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i) - if (word & (1 << i)) - _dl_printf (" %s", _dl_hwcap_string (i)); - - _dl_printf ("\n"); - - return 0; -} -#endif - -#endif /* dl-procinfo.h */ diff --git a/libc/ports/sysdeps/powerpc/nofpu/fenv_const.c b/libc/ports/sysdeps/powerpc/nofpu/fenv_const.c index 01d36f377..291b1accc 100644 --- a/libc/ports/sysdeps/powerpc/nofpu/fenv_const.c +++ b/libc/ports/sysdeps/powerpc/nofpu/fenv_const.c @@ -17,18 +17,18 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ -/* We want to specify the bit pattern of the __fe_*_env constants, so +/* We want to specify the bit pattern of the __fe_*_env constants, so pretend they're really `long long' instead of `double'. */ /* If the default argument is used we use this value. Disable all signalling exceptions as default. */ -const unsigned long long __fe_dfl_env __attribute__ ((aligned (8))) = +const unsigned long long __fe_dfl_env __attribute__ ((aligned (8))) = 0x000000003e000000ULL; /* Floating-point environment where none of the exceptions are masked. */ -const unsigned long long __fe_enabled_env __attribute__ ((aligned (8))) = +const unsigned long long __fe_enabled_env __attribute__ ((aligned (8))) = 0xfff80000000000f8ULL; /* Floating-point environment with the NI bit set. */ -const unsigned long long __fe_nonieee_env __attribute__ ((aligned (8))) = +const unsigned long long __fe_nonieee_env __attribute__ ((aligned (8))) = 0xfff8000000000004ULL; diff --git a/libc/ports/sysdeps/powerpc/nofpu/fenv_libc.h b/libc/ports/sysdeps/powerpc/nofpu/fenv_libc.h index a4b90719a..14a2d04a2 100644 --- a/libc/ports/sysdeps/powerpc/nofpu/fenv_libc.h +++ b/libc/ports/sysdeps/powerpc/nofpu/fenv_libc.h @@ -24,5 +24,5 @@ get the fegetround definition. */ #include <fenv.h> - + #endif /* fenv_libc.h */ diff --git a/libc/ports/sysdeps/tile/bits/endian.h b/libc/ports/sysdeps/tile/bits/endian.h index 43d94bb7a..835042a7a 100644 --- a/libc/ports/sysdeps/tile/bits/endian.h +++ b/libc/ports/sysdeps/tile/bits/endian.h @@ -6,8 +6,6 @@ #if defined __BIG_ENDIAN__ # define __BYTE_ORDER __BIG_ENDIAN -#elif defined __LITTLE_ENDIAN__ -# define __BYTE_ORDER __LITTLE_ENDIAN #else -# error "Endianness not declared!!" +# define __BYTE_ORDER __LITTLE_ENDIAN #endif diff --git a/libc/ports/sysdeps/tile/tilepro/memcpy.S b/libc/ports/sysdeps/tile/tilepro/memcpy.S index 2810000ca..fd6c338a9 100644 --- a/libc/ports/sysdeps/tile/tilepro/memcpy.S +++ b/libc/ports/sysdeps/tile/tilepro/memcpy.S @@ -138,7 +138,7 @@ ENTRY (__memcpy) - r16 = WORD_0. - r17 == r1 + 16. - r27 holds saved lr to restore. - + On exit: - r0 is incremented by 64. - r1 is incremented by 64, unless that would point to a word @@ -282,7 +282,7 @@ ENTRY (__memcpy) /* This copies unaligned words until either there are fewer than 4 bytes left to copy, or until the destination pointer is cache-aligned, whichever comes first. - + On entry: - r0 is the next store address. - r1 points 4 bytes past the load address corresponding to r0. @@ -329,7 +329,7 @@ ENTRY (__memcpy) { mvz r3, r8, r1; wh64 r0 } /* This loop runs twice. - + On entry: - r17 is even before the first iteration, and odd before the second. It is incremented inside the loop. Encountering diff --git a/libc/ports/sysdeps/unix/alpha/sysdep.S b/libc/ports/sysdeps/unix/alpha/sysdep.S index efd87fb4f..cc5846d12 100644 --- a/libc/ports/sysdeps/unix/alpha/sysdep.S +++ b/libc/ports/sysdeps/unix/alpha/sysdep.S @@ -21,7 +21,7 @@ #if defined(PIC) /* Put this at the end of libc's text segment so that all of - the direct branches from the syscalls are forward, and + the direct branches from the syscalls are forward, and thus predicted not taken. */ .section .text.last, "ax", @progbits #else diff --git a/libc/ports/sysdeps/unix/mips/sysdep.S b/libc/ports/sysdeps/unix/mips/sysdep.S index e27aada1d..f03363870 100644 --- a/libc/ports/sysdeps/unix/mips/sysdep.S +++ b/libc/ports/sysdeps/unix/mips/sysdep.S @@ -30,7 +30,7 @@ FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK RAOFF= FRAMESZ-(1*SZREG) GPOFF= FRAMESZ-(2*SZREG) V0OFF= FRAMESZ-(3*SZREG) - + ENTRY(__syscall_error) #ifdef __PIC__ .set noat @@ -79,7 +79,7 @@ ENTRY(__syscall_error) SETUP_GPX (AT) #endif SETUP_GPX64 (t9, AT) - + #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S b/libc/ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S index eea6867f9..c3709575b 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S +++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S @@ -53,6 +53,10 @@ ENTRY(__getcontext) mov x2, sp str x2, [x0, oSP] + /* Initialize the pstate. */ + mov x3, #0 + str x3, [x0, oPSTATE] + /* Figure out where to place the first context extension block. */ add x2, x0, #oEXTENSION diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym b/libc/ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym index 1afff7868..ab3930c17 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym +++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym @@ -37,6 +37,7 @@ STACK_FLAGS stack (ss_flags) oX0 mcontext (regs) oSP mcontext (sp) oPC mcontext (pc) +oPSTATE mcontext (pstate) oEXTENSION mcontext (__reserved) #define fpsimd_context(member) offsetof (struct fpsimd_context, member) diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h index 45ed2e803..1c6beddf6 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -34,7 +34,7 @@ # define __ASSUME_IN_NONBLOCK 1 #endif -/* Support for the pipe2, eventfd2, signalfd4 syscalls was added for alpha +/* Support for the pipe2, eventfd2, signalfd4 syscalls was added for alpha after 2.6.33-rc1. */ #if __LINUX_KERNEL_VERSION >= 0x020621 # define __ASSUME_PIPE2 1 diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel_stat.h index a1d012ab0..94d358efc 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel_stat.h +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel_stat.h @@ -35,7 +35,7 @@ struct kernel_stat64 unsigned int __pad0; unsigned long st_atime; - unsigned long st_atimensec; + unsigned long st_atimensec; unsigned long st_mtime; unsigned long st_mtimensec; unsigned long st_ctime; diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index cf6b8bfd9..567f8ab8c 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -73,7 +73,7 @@ : (fl)) \ : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) -# endif +# endif #endif diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/register-dump.h b/libc/ports/sysdeps/unix/sysv/linux/alpha/register-dump.h index adc7d67f6..216f54788 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/register-dump.h +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/register-dump.h @@ -32,7 +32,7 @@ T10: XXXXXXXXXXXXXXXX T11: XXXXXXXXXXXXXXXX RA: XXXXXXXXXXXXXXXX T12: XXXXXXXXXXXXXXXX AT: XXXXXXXXXXXXXXXX GP: XXXXXXXXXXXXXXXX SP: XXXXXXXXXXXXXXXX PC: XXXXXXXXXXXXXXXX - + FP0: XXXXXXXXXXXXXXXX FP1: XXXXXXXXXXXXXXXX FP2: XXXXXXXXXXXXXXXX FP3: XXXXXXXXXXXXXXXX FP4: XXXXXXXXXXXXXXXX FP5: XXXXXXXXXXXXXXXX FP6: XXXXXXXXXXXXXXXX FP7: XXXXXXXXXXXXXXXX FP8: XXXXXXXXXXXXXXXX @@ -44,13 +44,13 @@ FP24: XXXXXXXXXXXXXXXX FP25: XXXXXXXXXXXXXXXX FP26: XXXXXXXXXXXXXXXX FP27: XXXXXXXXXXXXXXXX FP28: XXXXXXXXXXXXXXXX FP29: XXXXXXXXXXXXXXXX FP30: XXXXXXXXXXXXXXXX FPCR: XXXXXXXXXXXXXXXX - + TA0: XXXXXXXXXXXXXXXX TA1: XXXXXXXXXXXXXXXX TA2: XXXXXXXXXXXXXXXX */ #define NREGS (32+32+3) -static const char __attribute__((aligned(8))) regnames[NREGS][8] = +static const char __attribute__((aligned(8))) regnames[NREGS][8] = { " V0: ", " T0: ", " T1: ", " T2: ", " T3: ", " T4: ", @@ -81,7 +81,7 @@ static const char __attribute__((aligned(8))) regnames[NREGS][8] = #define O(FIELD, LF) offsetof(struct sigcontext, FIELD) + LF -static const int offsets[NREGS] = +static const int offsets[NREGS] = { O(sc_regs[0], 0), O(sc_regs[1], 0), O(sc_regs[2], 1), O(sc_regs[3], 0), O(sc_regs[4], 0), O(sc_regs[5], 1), @@ -118,7 +118,7 @@ register_dump (int fd, struct sigcontext *ctx) char buf[NREGS*(8+16) + 25 + 80]; char *p = buf; size_t i; - + p = stpcpy (p, "Register dump:\n\n"); for (i = 0; i < NREGS; ++i) @@ -126,7 +126,7 @@ register_dump (int fd, struct sigcontext *ctx) int this_offset, this_lf; unsigned long val; signed long j; - + this_offset = offsets[i]; this_lf = this_offset & 7; diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/syscall.S b/libc/ports/sysdeps/unix/sysv/linux/alpha/syscall.S index bfb120536..f4161fe2e 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -20,7 +20,7 @@ /* * This is for COMPATIBILITY with Linux/x86 only. Linux/Alpha system - * calls return an error indication in a3. This allows arbitrary 64bit + * calls return an error indication in a3. This allows arbitrary 64bit * values to be returned in v0 (because negative values are not * mistaken as error numbers). However, C allows only one value to * be returned, so the interface below folds the error indication passed in diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/mmap.S b/libc/ports/sysdeps/unix/sysv/linux/arm/mmap.S index 06b737eeb..9fb1931c1 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/mmap.S @@ -37,7 +37,7 @@ ENTRY (__mmap) movs ip, r5, lsl #20 bne .Linval mov r5, r5, lsr #12 - + /* do the syscall */ DO_CALL (mmap2, 0) diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index fe21cdaf2..a29593aec 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -71,7 +71,7 @@ : (fl)) \ : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) -# endif +# endif #endif diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/swapcontext.S b/libc/ports/sysdeps/unix/sysv/linux/arm/swapcontext.S index db8562399..8a968eb0a 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/arm/swapcontext.S +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/swapcontext.S @@ -50,7 +50,7 @@ ENTRY(swapcontext) itt ne movne r0, r4 RETINSTR(ne, r14) - + /* Fix up LR and the PC. */ str r13,[r0, #MCONTEXT_ARM_SP] str r14,[r0, #MCONTEXT_ARM_LR] diff --git a/libc/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list b/libc/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list index 58b4057f4..f055c6851 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list +++ b/libc/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list @@ -1,7 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names # rlimit APIs -getrlimit - getrlimit i:ip __getrlimit getrlimit -setrlimit - setrlimit i:ip __setrlimit setrlimit +getrlimit - getrlimit i:ip __getrlimit getrlimit +setrlimit - setrlimit i:ip __setrlimit setrlimit prlimit64 EXTRA prlimit64 i:iipp prlimit64 fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index bcead739d..a92e8ac0c 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -49,13 +49,13 @@ typedef uintmax_t uatomic_max_t; *addr = new; return prev; */ -/* Use the kernel atomic light weight syscalls on hppa. */ +/* Use the kernel atomic light weight syscalls on hppa. */ #define _LWS "0xb0" #define _LWS_CAS "0" /* Note r31 is the link register. */ #define _LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" /* String constant for -EAGAIN. */ -#define _ASM_EAGAIN "-11" +#define _ASM_EAGAIN "-11" /* String constant for -EDEADLOCK. */ #define _ASM_EDEADLOCK "-45" @@ -100,7 +100,7 @@ typedef uintmax_t uatomic_max_t; }) #else # error __ASSUME_LWS_CAS is required to build glibc. -#endif +#endif /* __ASSUME_LWS_CAS */ #endif diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/clone.S b/libc/ports/sysdeps/unix/sysv/linux/hppa/clone.S index fbb3f70e1..0d7a7eb63 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/clone.S @@ -26,23 +26,23 @@ #include <bits/errno.h> /* Non-thread code calls __clone with the following parameters: - int clone(int (*fn)(void *arg), - void *child_stack, - int flags, + int clone(int (*fn)(void *arg), + void *child_stack, + int flags, void *arg) - + NPTL Code will call __clone with the following parameters: - int clone(int (*fn)(void *arg), - void *child_stack, - int flags, + int clone(int (*fn)(void *arg), + void *child_stack, + int flags, void *arg, - int *parent_tidptr, - struct user_desc *newtls, + int *parent_tidptr, + struct user_desc *newtls, int *child_pidptr) - + The code should not mangle the extra input registers. Syscall expects: Input to __clone: - 4(r25) - function pointer (r26, arg0) + 4(r25) - function pointer (r26, arg0) 0(r25) - argument (r23, arg3) r26 - clone flags. (r24, arg2) r25+64 - user stack pointer. (r25, arg1) @@ -53,9 +53,9 @@ Return: - On success the thread ID of the child process is returend in + On success the thread ID of the child process is returend in the callers context. - On error return -1, and set errno to the value returned by + On error return -1, and set errno to the value returned by the syscall. */ @@ -100,13 +100,13 @@ ENTRY(__clone) /* Restore the PIC register. */ #ifdef PIC - copy %r4, %r19 /* parent */ + copy %r4, %r19 /* parent */ #endif comib,=,n 0, %ret0, .LthreadStart /* Successful return from the parent - No need to restore the PIC register, + No need to restore the PIC register, since we return immediately. */ ldw -84(%sp), %rp @@ -134,14 +134,14 @@ ENTRY(__clone) #ifdef RESET_PID # define CLONE_VM_BIT 23 /* 0x00000100 */ # define CLONE_THREAD_BIT 15 /* 0x00010000 */ - /* Load original clone flags. + /* Load original clone flags. If CLONE_THREAD was passed, don't reset the PID/TID. If CLONE_VM was passed, we need to store -1 to PID/TID. If CLONE_VM and CLONE_THREAD were not set store the result of getpid to PID/TID. */ ldw -56(%sp), %r26 bb,<,n %r26, CLONE_THREAD_BIT, 1f - bb,< %r26, CLONE_VM_BIT, 2f + bb,< %r26, CLONE_VM_BIT, 2f ldi -1, %ret0 ble 0x100(%sr2, %r0) ldi __NR_getpid, %r20 diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/internaltypes.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/internaltypes.h index 6eee0b3ba..ac827b684 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/internaltypes.h +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/internaltypes.h @@ -1,9 +1,9 @@ #include_next <internaltypes.h> -#ifndef _INTERNAL_TYPES_H_HPPA_ +#ifndef _INTERNAL_TYPES_H_HPPA_ #define _INTERNAL_TYPES_H_HPPA_ 1 #include <atomic.h> -/* In GLIBC 2.10 HPPA switched from Linuxthreads to NPTL, and in order +/* In GLIBC 2.10 HPPA switched from Linuxthreads to NPTL, and in order to maintain ABI compatibility with pthread_cond_t, some care had to be taken. diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/makecontext.c b/libc/ports/sysdeps/unix/sysv/linux/hppa/makecontext.c index c59dd83ee..046aad2af 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/makecontext.c +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/makecontext.c @@ -29,9 +29,9 @@ /* Stack must be 64-byte aligned at all times. */ #define STACK_ALIGN 64 /* Size of frame marker in unsigned long words. */ -#define FRAME_SIZE_UL 8 +#define FRAME_SIZE_UL 8 /* Size of frame marker in bytes. */ -#define FRAME_SIZE_BYTES (8 * sizeof(unsigned long)) +#define FRAME_SIZE_BYTES (8 * sizeof(unsigned long)) /* Size of X arguments in bytes. */ #define ARGS(x) (x * sizeof(unsigned long)) @@ -42,7 +42,7 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) va_list ap; int i; - /* Create a 64-byte aligned frame to store args. Use ss_sp if + /* Create a 64-byte aligned frame to store args. Use ss_sp if it is available, otherwise be robust and use the currently saved stack pointer. */ if (ucp->uc_stack.ss_sp && ucp->uc_stack.ss_size) @@ -50,8 +50,8 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) else osp = (unsigned long *)ucp->uc_mcontext.sc_gr[30]; - sp = (unsigned long *)((((unsigned long) osp) - + FRAME_SIZE_BYTES + ARGS(argc) + STACK_ALIGN) + sp = (unsigned long *)((((unsigned long) osp) + + FRAME_SIZE_BYTES + ARGS(argc) + STACK_ALIGN) & ~(STACK_ALIGN - 1)); /* Use new frame. */ @@ -89,12 +89,12 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) /* 64bit: r19-r22 are arg7-arg4. */ ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int); continue; - } + } /* All other arguments go on the stack. */ sp[-1 * (FRAME_SIZE_UL + 1 + i)] = va_arg (ap, int); } - va_end (ap); + va_end (ap); } weak_alias(__makecontext, makecontext) diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/mmap.c b/libc/ports/sysdeps/unix/sysv/linux/hppa/mmap.c index 00e6d60b0..bb3b97fe4 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/mmap.c +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/mmap.c @@ -33,7 +33,7 @@ __ptr_t __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) { - + __ptr_t ret; ret = (__ptr_t) INLINE_SYSCALL (mmap, 6, addr, len, prot, flags, fd, offset); diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h index c0efd6874..7e52c680c 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h @@ -21,7 +21,7 @@ /* Linuxthread type sizes (bytes): sizeof(pthread_attr_t) = 0x24 (36) sizeof(pthread_barrier_t) = 0x30 (48) - sizeof(pthread_barrierattr_t) = 0x4 (4) + sizeof(pthread_barrierattr_t) = 0x4 (4) sizeof(pthread_cond_t) = 0x30 (48) sizeof(pthread_condattr_t) = 0x4 (4) sizeof(pthread_mutex_t) = 0x30 (48) @@ -33,9 +33,9 @@ #define __SIZEOF_PTHREAD_ATTR_T 36 #define __SIZEOF_PTHREAD_BARRIER_T 48 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_COND_T 48 #define __SIZEOF_PTHREAD_CONDATTR_T 4 -#define __SIZEOF_PTHREAD_MUTEX_T 48 +#define __SIZEOF_PTHREAD_MUTEX_T 48 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 #define __SIZEOF_PTHREAD_RWLOCK_T 64 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 @@ -74,7 +74,7 @@ typedef union binary compatibility. */ int __kind; /* The old 4-word 16-byte aligned lock. This is initalized - to all ones by the Linuxthreads PTHREAD_MUTEX_INITIALIZER. + to all ones by the Linuxthreads PTHREAD_MUTEX_INITIALIZER. Unused in NPTL. */ int __compat_padding[4]; /* In the old structure there are 4 words left due to alignment. @@ -105,7 +105,7 @@ typedef union the attribute type is not exposed on purpose. However, this structure is exposed via PTHREAD_COND_INITIALIZER, and because of this, the Linuxthreads version sets the first four ints to one. In the NPTL - version we must check, in every function using pthread_cond_t, + version we must check, in every function using pthread_cond_t, for the static Linuxthreads initializer and clear the appropriate words. */ typedef union @@ -114,7 +114,7 @@ typedef union { /* In the old Linuxthreads pthread_cond_t, this is the start of the 4-word lock structure, the next four words - are set all to 1 by the Linuxthreads + are set all to 1 by the Linuxthreads PTHREAD_COND_INITIALIZER. */ int __lock __attribute__ ((aligned(16))); /* Tracks the initialization of this structure: diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index b88703fba..4cf8468d4 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -77,7 +77,7 @@ : (fl)) \ : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) -# endif +# endif #endif /* Type for lock object. */ @@ -257,7 +257,7 @@ __lll_cond_lock (int *futex, int private) } #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) -extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *, +extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *, int private) attribute_hidden; extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, int private) attribute_hidden; diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S index 1307b1a2d..5fa0ef5c3 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S @@ -49,7 +49,7 @@ /* r26, r25, r24, r23 are free since vfork has no arguments */ ENTRY(__vfork) - /* We must not create a frame. When the child unwinds to call + /* We must not create a frame. When the child unwinds to call exec it will clobber the same frame that the parent needs to unwind. */ @@ -75,7 +75,7 @@ ENTRY(__vfork) /* Return, and DO NOT restore rp. The child may have called functions that updated the frame's rp. This works because - the kernel ensures rp is preserved across the vfork + the kernel ensures rp is preserved across the vfork syscall. */ bv,n %r0(%rp) diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h index 0e68ccf0f..d6d919881 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h @@ -1,5 +1,5 @@ #include_next <pthreadP.h> -#ifndef _PTHREADP_H_HPPA_ +#ifndef _PTHREADP_H_HPPA_ #define _PTHREADP_H_HPPA_ 1 /* Internal cond functions. */ diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h index 3c53d2634..b0ba11881 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h @@ -33,16 +33,16 @@ do arguments (read arg5 and arg6 to registers) setup frame - + check if there are threads, yes jump to pseudo_cancel - + unthreaded: syscall check syscall return (jump to pre_end) set errno set return to -1 (jump to pre_end) - + pseudo_cancel: cenable syscall @@ -50,14 +50,14 @@ check syscall return (jump to pre_end) set errno set return to -1 - + pre_end restore stack - + It is expected that 'ret' and 'END' macros will - append an 'undo arguments' and 'return' to the + append an 'undo arguments' and 'return' to the this PSEUDO macro. */ - + # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ ENTRY (__##syscall_name##_nocancel) \ diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/setcontext.S b/libc/ports/sysdeps/unix/sysv/linux/hppa/setcontext.S index d36ef49f8..2740afcb1 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/setcontext.S +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/setcontext.S @@ -117,7 +117,7 @@ ENTRY(__setcontext) /* Do not load oSS_SP into %sp. The value of oSS_SP indicates the start of the user allocated stack, but not the sp that - should be used by the new context. In fact makecontext + should be used by the new context. In fact makecontext will create a frame, and adjust sp as required. We do not support calling getcontext and modifying ss_sp without a call to makecontext to synchronize ss_sp into the machine @@ -141,7 +141,7 @@ ENTRY(__setcontext) /* No further context available. Exit now. */ bl _exit, %r2 ldi -1, %r26 - + .Lerror: /* Epilogue */ diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list b/libc/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list index f3ff3e7d7..ae36d46a4 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -17,7 +17,7 @@ semctl - semctl i:iiii __semctl semctl # proper socket implementations: accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind -connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt @@ -33,6 +33,6 @@ shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket socketpair - socketpair i:iiif __socketpair socketpair -setrlimit - setrlimit i:ip __setrlimit setrlimit -getrlimit - getrlimit i:ip __getrlimit getrlimit +setrlimit - setrlimit i:ip __setrlimit setrlimit +getrlimit - getrlimit i:ip __getrlimit getrlimit prlimit64 EXTRA prlimit64 i:iipp __prlimit64 prlimit64@@GLIBC_2.17 diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/sysdep.c b/libc/ports/sysdeps/unix/sysv/linux/hppa/sysdep.c index 0ca51863b..3bf31f281 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -37,8 +37,8 @@ __syscall_error (int err_no) INTERNAL_SYSCALL, and all the generated pure assembly syscall wrappers. How often the function is used is unknown. */ -long int -syscall (long int __sysno, ...) +long int +syscall (long int __sysno, ...) { /* FIXME: Keep this matching INLINE_SYSCALL for hppa */ va_list args; @@ -54,7 +54,7 @@ syscall (long int __sysno, ...) arg4 = va_arg (args, long int); arg5 = va_arg (args, long int); va_end (args); - + { register unsigned long int __res asm("r28"); PIC_REG_DEF diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/libc/ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c index da8242351..8c2a60bc7 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c +++ b/libc/ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c @@ -29,7 +29,7 @@ as mmap and friends. --davidm 99/11/30 */ int -__getpagesize () +__getpagesize (void) { assert (GLRO(dl_pagesize) != 0); return GLRO(dl_pagesize); diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/libc/ports/sysdeps/unix/sysv/linux/m68k/getpagesize.c index aa11d1a80..47527700b 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -26,7 +26,7 @@ /* Return the system page size. */ int -__getpagesize () +__getpagesize (void) { #ifdef __NR_getpagesize int result; diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/socket.S b/libc/ports/sysdeps/unix/sysv/linux/m68k/socket.S index ce7352a38..d82d30c2c 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/socket.S @@ -114,7 +114,7 @@ ENTRY (__socket) /* Successful; return the syscall's value. */ rts #endif - + PSEUDO_END (__socket) #ifndef NO_WEAK_ALIAS diff --git a/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h index 45b8d9aa1..70f5537e2 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h @@ -87,7 +87,7 @@ __ret = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), \ __lll_private_flag (FUTEX_WAIT, private), \ (val), (timespec)); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + __ret; \ }) #define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, private) \ @@ -99,7 +99,7 @@ __lll_private_flag (__op, private), \ (val), (timespec), NULL /* Unused. */, \ FUTEX_BITSET_MATCH_ANY); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + __ret; \ }) #define lll_futex_wake(futexp, nr, private) \ @@ -109,7 +109,7 @@ __ret = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), \ __lll_private_flag (FUTEX_WAKE, private), \ (nr), 0); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + __ret; \ }) #define lll_robust_dead(futexv, private) \ @@ -160,7 +160,7 @@ __ret = INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ __lll_private_flag (__op, private), \ (val), (timespec), mutex); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + __ret; \ }) #define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/dl-static.c b/libc/ports/sysdeps/unix/sysv/linux/mips/dl-static.c index 3ffc4b7ae..e0501be3b 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/mips/dl-static.c +++ b/libc/ports/sysdeps/unix/sysv/linux/mips/dl-static.c @@ -68,7 +68,7 @@ _dl_static_init (struct link_map *l) loadbase = _dl_lookup_symbol_x ("_dl_var_init", l, &ref, l->l_local_scope, NULL, 0, 1, NULL); - + for (scope = l->l_local_scope; *scope != NULL; scope++) for (i = 0; i < (*scope)->r_nlist; i++) if ((*scope)->r_list[i] == loadbase) diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index 4f27b8b82..208df8d68 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -71,7 +71,7 @@ : (fl)) \ : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) -# endif +# endif #endif diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S index 04aed290b..90d9dcd42 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S +++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S @@ -34,7 +34,7 @@ versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4) #if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4) -/* For the nofpu case the old/new versions are the same function. */ +/* For the nofpu case the old/new versions are the same function. */ strong_alias (__getcontext, __novec_getcontext) compat_symbol (libc, __novec_getcontext, getcontext, GLIBC_2_3_3) diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S index d5f73902b..06061eab9 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S +++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S @@ -34,7 +34,7 @@ versioned_symbol (libc, __setcontext, setcontext, GLIBC_2_3_4) #if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4) -/* For the nofpu case the old/new versions are the same function. */ +/* For the nofpu case the old/new versions are the same function. */ strong_alias (__setcontext, __novec_setcontext) compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3_3) diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S index a87d64a30..2150eec3c 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S +++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S @@ -34,7 +34,7 @@ versioned_symbol (libc, __swapcontext, swapcontext, GLIBC_2_3_4) #if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4) -/* For the nofpu case the old/new versions are the same function. */ +/* For the nofpu case the old/new versions are the same function. */ strong_alias (__swapcontext, __novec_swapcontext) compat_symbol (libc, __novec_swapcontext, swapcontext, GLIBC_2_3_3) diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S b/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S index 03fe3f91b..f8c821a2b 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S +++ b/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S @@ -83,7 +83,7 @@ ENTRY (__clone) /* We need to switch the argument convention around from libc to kernel: - + libc: r0 fn r1 child_stack @@ -92,14 +92,14 @@ ENTRY (__clone) r4 ptid r5 tls r6 ctid - + kernel: r0 flags r1 child_stack [same as libc] r2 ptid r3 ctid r4 tls - + Plus the callee-saves as described at .Lthread_start, below. */ { move r32, r0 @@ -151,9 +151,9 @@ ENTRY (__clone) movei r1, EINVAL j SYSCALL_ERROR_NAME } - + /* This function expects to receive: - + sp: the top of a valid stack area r30: clone() flags r31: the argument to pass to the user function diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/setcontext.S b/libc/ports/sysdeps/unix/sysv/linux/tile/setcontext.S index 9db13bc67..04368948e 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/tile/setcontext.S +++ b/libc/ports/sysdeps/unix/sysv/linux/tile/setcontext.S @@ -143,7 +143,7 @@ ENTRY (__setcontext) mtspr EX_CONTEXT_0_1, r12 iret jrp lr /* keep the backtracer happy */ - + .Lsigreturn: /* This is a context obtained from a signal handler. Perform a full restore by pushing the context diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S b/libc/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S index 66d6a3fa0..6e7dfa7a7 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S +++ b/libc/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S @@ -46,7 +46,7 @@ ENTRY (__swapcontext) /* Save the current context. */ jal __getcontext - + /* Tear down the frame and restore r0, r1, and lr. */ { BNEZ r0, .Lerror |