Add comment.
(atomic_decrement_and_test): Add comment.
2003-03-22 Jakub Jelinek <jakub@redhat.com>
* include/atomic.h (atomic_compare_and_exchange_val_acq): Add comment.
Don't define if __arch_compare_and_exchange_val_32_acq is not defined.
(atomic_compare_and_exchange_bool_acq): Add comment. Don't use
__oldval variable in the macro, since it might be macro argument.
(atomic_decrement_if_positive): Initialize __memp, remove setting
of non-existent variable.
(atomic_bit_test_set): Cast 1 to __typeof (*mem) before shifting.
* sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Implement
using atomic_compare_and_exchange_val_acq.
(atomic_decrement_if_positive, atomic_bit_test_set): Define.
* sysdeps/s390/bits/atomic.h (__arch_compare_and_exchange_val_8_acq):
Renamed from...
(__arch_compare_and_exchange_bool_8_acq): ... this.
(__arch_compare_and_exchange_val_16_acq): Renamed from...
(__arch_compare_and_exchange_bool_16_acq): ... this.
(__arch_compare_and_exchange_val_32_acq): Return old value. Renamed
from...
(__arch_compare_and_exchange_bool_32_acq): ... this.
(__arch_compare_and_exchange_val_64_acq): Return old value. Renamed
from...
(__arch_compare_and_exchange_bool_64_acq): ... this.
(__arch_compare_and_exchange_val_32_acq): Use __typeof for local
variables types instead of assuming int.
Change prefix of local variables to __arch.
* sysdeps/generic/bits/atomic.h (arch_compare_and_exchange_acq):
Remove.
(atomic_compare_and_exchange_val_acq,
atomic_compare_and_exchange_bool_acq): Define.
* csu/tst-atomic.c: New test.
* csu/tst-atomic-long.c: New test.
* csu/Makefile (tests): Add tst-atomic and tst-atomic-long.
* malloc/memusagestat.c (main): Kill warning if uint64_t is ulong.
* sysdeps/s390/Versions: Add trailing newline.
* sysdeps/unix/sysv/linux/sysconf.c (__sysconf): Kill warning
if INTERNAL_SYSCALL_ERROR_P doesn't use its first argument.
* sysdeps/i386/i486/bits/atomic.h (atomic_bit_set): Use "ir"
constraint to permit non-constant BIT argument.
(atomic_bit_test_set): Likewise.
* sysdeps/x86_64/bits/atomic.h (atomic_bit_test_set): Likewise.
(atomic_bit_set): Likewise. Use 1UL in case that BIT might be >= 32.
For quadword case, use "i" constraint if __builtin_constant_p and < 32
or "r" constraint otherwise.
* sysdeps/i386/i486/bits/atomic.h
(__arch_compare_and_exchange_val_64_acq): Rewrite abort-calling
version of the macro to avoid compile-time warnings.
[! __PIC__] (__arch_compare_and_exchange_64_acq): Rename to above.
(__arch_compare_and_exchange_bool_64_acq): New macro.
(atomic_exchange_and_add, atomic_add): Fix name and usage of it.
(atomic_increment, atomic_decrement): Likewise.
variable. Remove superfluous memory clobber.
* include/atomic.h: Syntax braino fix.
* posix/tst-nice.c (do_test): Use %m formats instead of printing errno
in decimal. Don't bail if niced at start. Just check that nice call
bumps the total at all.
2003-03-20 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/bits/setjmp.h: Store all N32 and N64 registers,
including pc, gp, sp and fp, as long long.
* sysdeps/mips/mips64/setjmp.S: Pass gp to __sigsetjmp_aux.
* sysdeps/mips/mips64/setjmp_aux.c: Adjust type of arguments.
Add gp argument, and set gp in the jmpbuf to it.
* sysdeps/mips/setjmp_aux.c: Revert to o32-only.
2003-03-20 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_MASK): Define
properly for n64.
(elf_machine_runtime_setup): Cast link_map pointer to Elf Addr
type.
(elf_machine_rel, elf_machine_rel_relative): Cast symidx to Elf
Word before comparing with gotsym. Take reloc_addr argument as
void*. Remove the code added for the compiler to drop any
alignment assumptions.
2003-03-19 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/ieee754.h: New file, suitable to replace both
../ieee754/ieee754.h and ../ieee754/ldbl-128/ieee754.h, kept
mips-specific for now.
* sysdeps/mips/mips64/Implies: Move wordsize-64 to...
* sysdeps/mips/mips64/n64/Implies: New file.
* sysdeps/mips/mips64/n64/Makefile: New file.
* sysdeps/mips/mips64/n64/el/bits/endian.h: New file.
* sysdeps/mips/mips64/n32/Implies: New file.
* sysdeps/mips/mips64/n32/Makefile: New file.
* sysdeps/mips/mips64/n32/el/bits/endian.h: New file.
* sysdeps/unix/mips/mips64/n32/sysdep.h: New file.
* sysdeps/unix/mips/mips64/n64/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/llseek.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/recv.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/send.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/syscall.S: New file.
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: New file.
* sysdeps/unix/sysv/linux/mips/mips64/umount.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S: New file.
* sysdeps/unix/sysv/linux/configure.in (libc_cv_slibdir): Use
lib64 for mips64/n64 and lib32 for mips64/n32.
(ldd_rewrite_script): Needed for all mips64 configurations.
* sysdeps/unix/sysv/linux/configure: Rebuilt.
* sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed: New file.
* sysdeps/unix/sysv/linux/mips/mips64/Dist: New file.
2003-03-16 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/clock_settime.c (HANDLE_REALTIME): Define tv here,
not at function level.
* sysdeps/unix/clock_gettime.c (HANDLE_REALTIME): Likewise.
(LIBC_START_MAIN, LIBC_START_MAIN_AUXVEC_ARG, MAIN_AUXVEC_ARG)
(INIT_MAIN_ARGS): Define, and #include <sysdeps/generic/libc-start.c>.
(__libc_start_main): Just call the generic one for most of the work.
* sysdeps/generic/libc-start.c [LIBC_START_MAIN]: If defined, define a
static function by that name instead of BP_SYM (__libc_start_main).
[LIBC_START_MAIN_AUXVEC_ARG]: Take AUXVEC as argument.
[MAIN_AUXVEC_ARG]: Pass 4th argument to MAIN.
[INIT_MAIN_ARGS]: Give INIT the same args as MAIN.
* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start) [DL_PLATFORM_AUXV]:
Use this macro for extra AT_* cases.
* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c (DL_PLATFORM_AUXV):
New macro, guts from ...
(__aux_init_cache): ... here, function removed.
(DL_PLATFORM_INIT): Don't define this.
* sysdeps/powerpc/powerpc32/memset.S: Put __cache_line_size in bss.
* sysdeps/powerpc/powerpc64/memset.S: Likewise.
* Versions.def (libthread_db): Add GLICB_2.3.3 set.
* sysdeps/generic/libc-start.c [LIBC_START_MAIN]: If defined, define a
static function by that name instead of BP_SYM (__libc_start_main).
[LIBC_START_MAIN_AUXVEC_ARG]: Take AUXVEC as argument.
[MAIN_AUXVEC_ARG]: Pass 4th argument to MAIN.
[INIT_MAIN_ARGS]: Give INIT the same args as MAIN.
* sysdeps/mips/dl-machine.h: Include sys/asm.h.
(elf_machine_matches_host): Prevent linking of o32 and n32
together.
(elf_machine_dynamic): Document assumption on $gp.
(STRINGXP, STRINGXV, STRINGV_): New macros.
(elf_machine_load_address): Use them to stringize PTR_LA and
PTR_SUBU.
(ELF_DL_FRAME_SIZE, ELF_DL_SAVE_ARG_REGS,
ELF_DL_RESTORE_ARG_REGS, IFABIO32): New macros used in...
(_dl_runtime_resolve): Adjust it for all 3 ABIs.
(__dl_runtime_resolve): Cast the symtab initializer to the
right type.
(RTLD_START): Use it. Adjust it for all 3 ABIs.
(elf_machine_rel): Mark as always_inline in RTLD_BOOTSTRAP.
Handle 64-bit R_MIPS_REL composite relocation and accept
R_MIPS_64 relocations to shift addend size to 64 bits.
Document assumption regarding local GOT entries. Document
backward-compatibility departing from the ABI behavior in
applying relocations that reference section symbols, no longer
used. Support relocations to mis-aligned offsets.
* sysdeps/mips/mips64/dl-machine.h: Deleted, obsolete.
* sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
(_KERNEL_NSIG_BPW): Define in terms of _MIPS_SZLONG.
* sysdeps/unix/sysv/linux/mips/sigaction.c: Define restore and
restore_rt functions. Use them.
* sysdeps/mips/memcpy.S: Map t0-3 to a4-7 on new abis.
* sysdeps/mips/memset.S: Likewise.
* sysdeps/mips/sys/regdef.h: Alias a4-7 or t0-3 to $8-11
depending on the ABI.
2003-03-14 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/atomicity.h (exchange_and_add, atomic_add):
Don't .set mips2 on new abi.
(compare_and_swap): Likewise. Support 64-bit longs on n64.
2003-03-14 Alexandre Oliva <aoliva@redhat.com>
2003-03-13 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/ia64/sysdep.h (BREAK_INSN_1, BREAK_INSN,
ASM_OUTARGS_0, ASM_OUTARGS_1, ASM_OUTARGS_2, ASM_OUTARGS_3,
ASM_OUTARGS_4, ASM_OUTARGS_5, ASM_OUTARGS_6): Define.
(INTERNAL_SYSCALL, INLINE_SYSCALL): Use it. Make syscall arguments
clobbered by the syscall.
(ASM_ARGS_1, ASM_ARGS_2, ASM_ARGS_3, ASM_ARGS_4, ASM_ARGS_5,
ASM_ARGS_6): Change constraints from r to index of corresponding
output register.
* sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Swap
ptid and ctid to match kernel.
* sysdeps/unix/sysv/linux/ia64/system.c (FORK): Likewise.
* sysdeps/powerpc/powerpc64/elf/configure.in: Remove
* sysdeps/powerpc/powerpc64/elf/configure: Regenerated.
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela):
Check SYM_MAP rather than SYM as definedness check.
Handle R_PPC64_ADDR32, R_PPC64_ADDR30, and R_PPC64_REL64 relocs.
Don't handle R_PPC64_REL24 reloc.
Mostly from Steven Munroe <sjmunroe@us.ibm.com>.
* sysdeps/powerpc/powerpc64/dl-machine.h
[USE_TLS] (elf_machine_type_class): Match all the TLS relocs in a
block, so we cover all the TPREL16* flavors without 6 ||s.
[USE_TLS] (elf_machine_tprel): New function.
(elf_machine_rela) [USE_TLS]: Use elf_machine_tprel for TPREL64 reloc,
and handle TPREL16 relocs too. Return rather than break for DTPREL64.
Mostly from Steven Munroe <sjmunroe@us.ibm.com>.
2003-03-11 Ralf Baechle <ralf@linux-mips.org>
* sysdeps/unix/sysv/linux/mips/clone.S (__thread_start): Use jal
instead of jalr to invoke subroutine so restoring the $gp register
will work properly.
2003-03-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (__NR_pread64): Define
to __NR_pread if not defined.
(__NR_pwrite64): Define to __NR_pwrite if not defined.
* sysdeps/unix/sysv/linux/ia64/system.c: New file.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_CLONE_THREAD_FLAGS): Define for IA-64 and s390* with
kernel >= 2.5.64.
2003-03-11 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Don't clobber R7.
allocate space even for the trailing '/'.
Reported by John Reiser <jreiser@BitWagon.com>.
* sysdeps/unix/sysv/linux/ia64/sysdep.h (LOAD_ARGS_6, ASM_ARGS_6,
ASM_CLOBBERS_6): Define.
(ASM_CLOBBERS_5): Use ASM_CLOBBERS_6.
* sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Reorder arguments
to match IA-32 order.
* sysdeps/unix/sysv/linux/i386/clone.S: Fix comment.
assembler command.
* sysdeps/unix/Makefile (compile-syscall): New variable.
Pass -g0 to compiler for assembling syscall stubs from stdin.
* sysdeps/i386/sysdep.h [HAVE_CPP_ASM_DEBUGINFO]
(STABS_CURRENT_FILE, STABS_CURRENT_FILE1, STABS_FUN, STABS_FUN_END):
Define these to do nothing.
* configure.in: New check for -g on .S files.
* configure: Regenerated.
* config.make.in (have-cpp-asm-debuginfo): New variable.
* config.h.in (HAVE_CPP_ASM_DEBUGINFO): New #undef.
* Makeconfig (ASFLAGS): New variable, if undefined and
$(have-cpp-asm-debuginfo), take options matching -g% from $(CFLAGS).
* Makerules (compile.S, COMPILE.S): Use $(ASFLAGS).
(elf_machine_rela): Always use RESOLVE_MAP, needed for
R_PPC64_JMP_SLOT as well as TLS cases.
(BIT_INSERT): Move parenthesis where it ought to have been.
Reported by Steven Munroe <sjmunroe@us.ibm.com>.
2003-03-03 Ian Wienand <ianw@gelato.unsw.edu.au>
* sysdeps/unix/sysv/linux/ia64/clone2.S: Update to take extra clone
flags.
* include/sched.h: Update clone2 prototype.