diff options
author | Roland McGrath <roland@gnu.org> | 2006-02-28 10:18:39 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2006-02-28 10:18:39 +0000 |
commit | 14d44b191fb0980b22002b79a53ff2dda3120772 (patch) | |
tree | 120dc27ef68440085b083b9198913b5305c84317 /sysdeps | |
parent | a5f2bd861c4c84ac66164951a7f32e1d6f57849c (diff) | |
download | glibc-14d44b191fb0980b22002b79a53ff2dda3120772.zip glibc-14d44b191fb0980b22002b79a53ff2dda3120772.tar.gz glibc-14d44b191fb0980b22002b79a53ff2dda3120772.tar.bz2 |
* sysdeps/hppa: Directory removed, saved in ports repository.
* sysdeps/mach/hppa: Likewise.
* sysdeps/mach/hurd/hppa: Likewise.
* sysdeps/unix/sysv/linux/hppa: Likewise.
* configure.in (machine): Remove hppa* cases.
* configure: Regenerated.
* shlib-versions: Remove hppa cases.
* sysdeps/m68k: Directory removed, saved in ports repository.
* sysdeps/unix/bsd/m68k: Likewise.
* sysdeps/unix/sysv/linux/m68k: Likewise.
* configure.in (machine): Remove m68* cases.
* configure: Regenerated.
Diffstat (limited to 'sysdeps')
409 files changed, 0 insertions, 17397 deletions
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile deleted file mode 100644 index 7394703..0000000 --- a/sysdeps/hppa/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. -# This file is part of the GNU C Library. -# Contributed by David Huggins-Daines (dhd@debian.org) - -# 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, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. - -# We used to need this since the build process uses ld -r. Now we use -# ld -r --unique=.text* which does more or less the same thing, but better. -# CFLAGS-.os += -ffunction-sections -LDFLAGS-c_pic.os += -Wl,--unique=.text* - -ifeq ($(subdir),elf) -CFLAGS-rtld.c += -mdisable-fpregs -sysdep-dl-routines += dl-symaddr dl-fptr -sysdep_routines += $(sysdep-dl-routines) -sysdep-rtld-routines += $(sysdep-dl-routines) -endif - -ifeq ($(subdir),csu) -ifeq (yes,$(build-shared)) -# Compatibility -ifeq (yes,$(have-protected)) -CPPFLAGS-libgcc-compat.c = -DHAVE_DOT_HIDDEN -endif -sysdep_routines += libgcc-compat -shared-only-routines += libgcc-compat -endif -endif diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions deleted file mode 100644 index 2ae3cbd..0000000 --- a/sysdeps/hppa/Versions +++ /dev/null @@ -1,12 +0,0 @@ -ld { - GLIBC_PRIVATE { - # hppa specific functions in the dynamic linker, but used by libc.so. - _dl_symbol_address; _dl_unmap; _dl_lookup_address; - _dl_function_address; - } -} -libc { - GLIBC_2.2 { - __clz_tab; - } -} diff --git a/sysdeps/hppa/__longjmp.S b/sysdeps/hppa/__longjmp.S deleted file mode 100644 index dee4d9f..0000000 --- a/sysdeps/hppa/__longjmp.S +++ /dev/null @@ -1,72 +0,0 @@ -/* longjmp for PA-RISC. - Copyright (C) 1997, 1998 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#define _SETJMP_H -#define _ASM -#include <bits/setjmp.h> - -/* __longjmp(jmpbuf, val) */ - - .text - .align 4 - .globl __longjmp - .export __longjmp, code - .proc - .callinfo -__longjmp: - /* set return value */ - copy %r25, %r28 - - ldw 0(%r26), %r3 - ldw 8(%r26), %r4 - ldw 12(%r26), %r5 - ldw 16(%r26), %r6 - ldw 20(%r26), %r7 - ldw 24(%r26), %r8 - ldw 28(%r26), %r9 - ldw 32(%r26), %r10 - ldw 36(%r26), %r11 - ldw 40(%r26), %r12 - ldw 44(%r26), %r13 - ldw 48(%r26), %r14 - ldw 52(%r26), %r15 - ldw 56(%r26), %r16 - ldw 60(%r26), %r17 - ldw 64(%r26), %r18 - ldw 68(%r26), %r19 - ldw 72(%r26), %r27 - ldw 76(%r26), %r30 - - ldw 80(%r26), %rp - - ldo 88(%r26),%r20 - fldds,ma 8(%r20), %fr12 - fldds,ma 8(%r20), %fr13 - fldds,ma 8(%r20), %fr14 - fldds,ma 8(%r20), %fr15 - fldds,ma 8(%r20), %fr16 - fldds,ma 8(%r20), %fr17 - fldds,ma 8(%r20), %fr18 - fldds,ma 8(%r20), %fr19 - fldds,ma 8(%r20), %fr20 - fldds 0(%r20), %fr21 - - bv,n %r0(%r2) - .procend diff --git a/sysdeps/hppa/abort-instr.h b/sysdeps/hppa/abort-instr.h deleted file mode 100644 index f1afea4..0000000 --- a/sysdeps/hppa/abort-instr.h +++ /dev/null @@ -1,6 +0,0 @@ -/* An instruction privileged instruction to crash a userspace program. - - We go with iitlbp because it has a history of being used to crash - programs. */ - -#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%r0)") diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s deleted file mode 100644 index a396b34..0000000 --- a/sysdeps/hppa/add_n.s +++ /dev/null @@ -1,58 +0,0 @@ -;! HP-PA __mpn_add_n -- Add two limb vectors of the same length > 0 and store -;! sum in a third limb vector. - -;! Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -;! This file is part of the GNU MP Library. - -;! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. - - -;! INPUT PARAMETERS -;! res_ptr gr26 -;! s1_ptr gr25 -;! s2_ptr gr24 -;! size gr23 - -;! One might want to unroll this as for other processors, but it turns -;! out that the data cache contention after a store makes such -;! unrolling useless. We can't come under 5 cycles/limb anyway. - - .text - .export __mpn_add_n -__mpn_add_n: - .proc - .callinfo frame=0,no_calls - .entry - - ldws,ma 4(%r25),%r21 - ldws,ma 4(%r24),%r20 - - addib,= -1,%r23,L$end ;! check for (SIZE == 1) - add %r21,%r20,%r28 ;! add first limbs ignoring cy - -L$loop: ldws,ma 4(%r25),%r21 - ldws,ma 4(%r24),%r20 - stws,ma %r28,4(%r26) - addib,<> -1,%r23,L$loop - addc %r21,%r20,%r28 - -L$end: stws %r28,0(%r26) - bv 0(%r2) - addc %r0,%r0,%r28 - - .exit - .procend diff --git a/sysdeps/hppa/bits/endian.h b/sysdeps/hppa/bits/endian.h deleted file mode 100644 index 585db0c..0000000 --- a/sysdeps/hppa/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* hppa1.1 big-endian. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/link.h deleted file mode 100644 index e69de29..0000000 --- a/sysdeps/hppa/bits/link.h +++ /dev/null diff --git a/sysdeps/hppa/bits/linkmap.h b/sysdeps/hppa/bits/linkmap.h deleted file mode 100644 index 54842b2..0000000 --- a/sysdeps/hppa/bits/linkmap.h +++ /dev/null @@ -1,6 +0,0 @@ -/* Used to store the function descriptor table */ -struct link_map_machine - { - size_t fptr_table_len; - ElfW(Addr) *fptr_table; - }; diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h deleted file mode 100644 index d5ae7e7..0000000 --- a/sysdeps/hppa/bits/setjmp.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 2000, 2005, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Define the machine-dependent type `jmp_buf'. HPPA version. */ -#ifndef _BITS_SETJMP_H -#define _BITS_SETJMP_H 1 - -#if !defined _SETJMP_H && !defined _PTHREAD_H -# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." -#endif - -/* The previous bits/setjmp.h had __jmp_buf defined as a structure. - We use an array of 'double' instead, to make writing the assembler - easier, and to ensure proper alignment. Naturally, user code should - not depend on either representation. */ - -#ifndef _ASM -typedef double __jmp_buf[21]; -#endif - -#endif /* bits/setjmp.h */ diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S deleted file mode 100644 index e5ec94c..0000000 --- a/sysdeps/hppa/bsd-_setjmp.S +++ /dev/null @@ -1,39 +0,0 @@ -/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. HPPA version. - Copyright (C) 2001, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - -/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - - .text - .align 4 - .globl _setjmp - .export _setjmp, code - .level 2.0 - .proc - .callinfo - .import __sigsetjmp -_setjmp: - b __sigsetjmp - ldi 0, %r25 - - .procend -libc_hidden_def (_setjmp) diff --git a/sysdeps/hppa/bsd-setjmp.S b/sysdeps/hppa/bsd-setjmp.S deleted file mode 100644 index 04ddba4..0000000 --- a/sysdeps/hppa/bsd-setjmp.S +++ /dev/null @@ -1,36 +0,0 @@ -/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. HPPA version. - Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - - .text - .align 4 - .globl setjmp - .export setjmp, code - .level 2.0 - .proc - .callinfo - .import __sigsetjmp -setjmp: - b __sigsetjmp - ldi 1, %r25 - - .procend diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure deleted file mode 100755 index bc01e46..0000000 --- a/sysdeps/hppa/configure +++ /dev/null @@ -1,33 +0,0 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - -echo "$as_me:$LINENO: checking for assembler line separator" >&5 -echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6 -if test "${libc_cv_asm_line_sep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat > conftest.s <<EOF -nop ; is_old_puffin -EOF -if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - libc_cv_asm_line_sep='!' -else - if test -z "$enable_hacker_mode"; then - echo "*** You need a newer assembler to compile glibc" - rm -f conftest* - exit 1 - fi - libc_cv_asm_line_sep=';' -fi -rm -f conftest* -fi -echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5 -echo "${ECHO_T}$libc_cv_asm_line_sep" >&6 -cat >>confdefs.h <<_ACEOF -#define ASM_LINE_SEP $libc_cv_asm_line_sep -_ACEOF - diff --git a/sysdeps/hppa/configure.in b/sysdeps/hppa/configure.in deleted file mode 100644 index 1ec417b..0000000 --- a/sysdeps/hppa/configure.in +++ /dev/null @@ -1,21 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -dnl The standard hppa assembler uses `;' to start comments and `!' -dnl as a line separator. -AC_CACHE_CHECK(for assembler line separator, - libc_cv_asm_line_sep, [dnl -cat > conftest.s <<EOF -nop ; is_old_puffin -EOF -if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_asm_line_sep='!' -else - if test -z "$enable_hacker_mode"; then - echo "*** You need a newer assembler to compile glibc" - rm -f conftest* - exit 1 - fi - libc_cv_asm_line_sep=';' -fi -rm -f conftest*]) -AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) diff --git a/sysdeps/hppa/dl-fptr.h b/sysdeps/hppa/dl-fptr.h deleted file mode 100644 index 2ac9740..0000000 --- a/sysdeps/hppa/dl-fptr.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Function descriptors. HPPA version. - Copyright (C) 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef dl_hppa_fptr_h -#define dl_hppa_fptr_h 1 - -#include <sysdeps/generic/dl-fptr.h> - -/* There are currently 20 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 200 - -#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \ - asm (" addil LT%%" #symbol ", %%r19\n" \ - " ldw RT%%" #symbol "(%%sr0,%%r1), %0\n" \ - : "=&r" (var)); - - -#endif /* !dl_hppa_fptr_h */ diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h deleted file mode 100644 index 84436e7..0000000 --- a/sysdeps/hppa/dl-lookupcfg.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Configuration of lookup functions. - Copyright (C) 2000, 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define ELF_FUNCTION_PTR_IS_SPECIAL -#define DL_UNMAP_IS_SPECIAL - -/* Forward declaration. */ -struct link_map; - -void *_dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref); - -#define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref) - -Elf32_Addr _dl_lookup_address (const void *address); - -/* Clear the bottom two bits so generic code can find the fdesc entry */ -#define DL_LOOKUP_ADDRESS(addr) \ - (_dl_lookup_address ((void *)((unsigned long)addr & ~3))) - -void _dl_unmap (struct link_map *map); - -#define DL_UNMAP(map) _dl_unmap (map) - -#define DL_AUTO_FUNCTION_ADDRESS(map, addr) \ -({ \ - unsigned int fptr[2]; \ - fptr[0] = (unsigned int) (addr); \ - fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr; \ - /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */ \ - (ElfW(Addr))((unsigned int)fptr | 2); \ -}) - -#define DL_STATIC_FUNCTION_ADDRESS(map, addr) \ -({ \ - static unsigned int fptr[2]; \ - fptr[0] = (unsigned int) (addr); \ - fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr; \ - /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */ \ - (ElfW(Addr))((unsigned int)fptr | 2); \ -}) - - -/* The test for "addr & 2" below is to accomodate old binaries which - violated the ELF ABI by pointing DT_INIT and DT_FINI at a function - descriptor. */ -#define DL_DT_INIT_ADDRESS(map, addr) \ - ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr)) -#define DL_DT_FINI_ADDRESS(map, addr) \ - ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr)) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h deleted file mode 100644 index d29501d..0000000 --- a/sysdeps/hppa/dl-machine.h +++ /dev/null @@ -1,762 +0,0 @@ -/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version. - Copyright (C) 1995-1997,1999-2003 - Free Software Foundation, Inc. - Contributed by David Huggins-Daines <dhd@debian.org> - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef dl_machine_h -#define dl_machine_h 1 - -#define ELF_MACHINE_NAME "hppa" - -#include <sys/param.h> -#include <assert.h> -#include <string.h> -#include <link.h> -#include <errno.h> -#include <dl-fptr.h> -#include <abort-instr.h> - -# define VALID_ELF_OSABI(osabi) ((osabi == ELFOSABI_SYSV) || (osabi == ELFOSABI_LINUX)) -# define VALID_ELF_ABIVERSION(ver) (ver == 0) -# define VALID_ELF_HEADER(hdr,exp,size) \ - memcmp (hdr,exp,size-2) == 0 \ - && VALID_ELF_OSABI (hdr[EI_OSABI]) \ - && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION]) - -/* These two definitions must match the definition of the stub in - bfd/elf32-hppa.c (see plt_stub[]). - - a. Define the size of the *entire* stub we place at the end of the PLT - table (right up against the GOT). - - b. Define the number of bytes back from the GOT to the entry point of - the PLT stub. You see the PLT stub must be entered in the middle - so it can depwi to find it's own address (long jump stub) - - c. Define the size of a single PLT entry so we can jump over the - last entry to get the stub address */ - -#define SIZEOF_PLT_STUB (7*4) -#define GOT_FROM_PLT_STUB (4*4) -#define PLT_ENTRY_SIZE (2*4) - -/* Initialize the function descriptor table before relocations */ -static inline void -__hppa_init_bootstrap_fdesc_table (struct link_map *map) -{ - ElfW(Addr) *boot_table; - - /* Careful: this will be called before got has been relocated... */ - ELF_MACHINE_LOAD_ADDRESS(boot_table,_dl_boot_fptr_table); - - map->l_mach.fptr_table_len = ELF_MACHINE_BOOT_FPTR_TABLE_LEN; - map->l_mach.fptr_table = boot_table; -} - -#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ - __hppa_init_bootstrap_fdesc_table (&bootstrap_map); - -/* Return nonzero iff ELF header is compatible with the running host. */ -static inline int -elf_machine_matches_host (const Elf32_Ehdr *ehdr) -{ - return ehdr->e_machine == EM_PARISC; -} - -/* Return the link-time address of _DYNAMIC. */ -static inline Elf32_Addr -elf_machine_dynamic (void) __attribute__ ((const)); - -static inline Elf32_Addr -elf_machine_dynamic (void) -{ - Elf32_Addr dynamic; - - asm ("b,l 1f,%0\n" -" depi 0,31,2,%0\n" -"1: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8),%0\n" -" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%%r1),%0\n" - : "=r" (dynamic) : : "r1"); - - return dynamic; -} - -/* Return the run-time load address of the shared object. */ -static inline Elf32_Addr -elf_machine_load_address (void) __attribute__ ((const)); - -static inline Elf32_Addr -elf_machine_load_address (void) -{ - Elf32_Addr dynamic; - - asm ( -" b,l 1f,%0\n" -" depi 0,31,2,%0\n" -"1: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%0\n" -" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%0\n" - : "=r" (dynamic) : : "r1"); - - return dynamic - elf_machine_dynamic (); -} - -/* Fixup a PLT entry to bounce directly to the function at VALUE. - Optimized non-profile version. */ -static inline Elf32_Addr -elf_machine_fixup_plt (struct link_map *map, lookup_t t, - const Elf32_Rela *reloc, - Elf32_Addr *reloc_addr, Elf32_Addr value) -{ - /* map is the link_map for the caller, t is the link_map for the object - being called */ - reloc_addr[1] = D_PTR (t, l_info[DT_PLTGOT]); - reloc_addr[0] = value; - /* Return the PLT slot rather than the function value so that the - trampoline can load the new LTP. */ - return (Elf32_Addr) reloc_addr; -} - -/* Fixup a PLT entry to bounce directly to the function at VALUE. */ -#define ELF_MACHINE_PROFILE_FIXUP_PLT elf_machine_profile_fixup_plt -static inline Elf32_Addr -elf_machine_profile_fixup_plt (struct link_map *map, lookup_t t, - const Elf32_Rela *reloc, - Elf32_Addr *reloc_addr, Elf32_Addr value) -{ - if(__builtin_expect (t == NULL, 1)) - return (Elf32_Addr) reloc_addr; - /* Return the PLT slot rather than the function value so that the - trampoline can load the new LTP. */ - return (Elf32_Addr) elf_machine_fixup_plt(map, t, reloc, reloc_addr, value); -} - -/* Return the final value of a plt relocation. */ -static inline Elf32_Addr -elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, - Elf32_Addr value) -{ - /* We are rela only */ - return value + reloc->r_addend; -} - -/* Set up the loaded object described by L so its unrelocated PLT - entries will jump to the on-demand fixup code in dl-runtime.c. */ - -static inline int -elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) -{ - Elf32_Addr *got = NULL; - Elf32_Addr l_addr, iplt, jmprel, end_jmprel, r_type, r_sym; - const Elf32_Rela *reloc; - struct fdesc *fptr; - static union { - unsigned char c[8]; - Elf32_Addr i[2]; - } sig = {{0x00,0xc0,0xff,0xee, 0xde,0xad,0xbe,0xef}}; - - /* If we don't have a PLT we can just skip all this... */ - if (__builtin_expect (l->l_info[DT_JMPREL] == NULL,0)) - return lazy; - - /* All paths use these values */ - l_addr = l->l_addr; - jmprel = D_PTR(l, l_info[DT_JMPREL]); - end_jmprel = jmprel + l->l_info[DT_PLTRELSZ]->d_un.d_val; - - extern void _dl_runtime_resolve (void); - extern void _dl_runtime_profile (void); - - /* Linking lazily */ - if (lazy) - { - /* FIXME: Search for the got, but backwards through the relocs, technically we should - find it on the first try. However, assuming the relocs got out of order the - routine is made a bit more robust by searching them all in case of failure. */ - for (iplt = (end_jmprel - sizeof(Elf32_Rela)); iplt >= jmprel; iplt -= sizeof (Elf32_Rela)) - { - - reloc = (const Elf32_Rela *) iplt; - r_type = ELF32_R_TYPE (reloc->r_info); - r_sym = ELF32_R_SYM (reloc->r_info); - - got = (Elf32_Addr *) (reloc->r_offset + l_addr + PLT_ENTRY_SIZE + SIZEOF_PLT_STUB); - - /* If we aren't an IPLT, and we aren't NONE then it's a bad reloc */ - if (__builtin_expect (r_type != R_PARISC_IPLT, 0)) - { - if (__builtin_expect (r_type != R_PARISC_NONE, 0)) - _dl_reloc_bad_type (l, r_type, 1); - continue; - } - - /* Check for the plt_stub that binutils placed here for us - to use with _dl_runtime_resolve */ - if (got[-2] != sig.i[0] || got[-1] != sig.i[1]) - { - got = NULL; /* Not the stub... keep looking */ - } - else - { - /* Found the GOT! */ - register Elf32_Addr ltp __asm__ ("%r19"); - /* Identify this shared object. */ - got[1] = (Elf32_Addr) l; - - /* This function will be called to perform the relocation. */ - if (__builtin_expect (!profile, 1)) - { - /* If a static application called us, then _dl_runtime_resolve is not - a function descriptor, but the *real* address of the function... */ - if((unsigned long) &_dl_runtime_resolve & 3) - { - got[-2] = (Elf32_Addr) ((struct fdesc *) - ((unsigned long) &_dl_runtime_resolve & ~3))->ip; - } - else - { - /* Static executable! */ - got[-2] = (Elf32_Addr) &_dl_runtime_resolve; - } - } - else - { - if (_dl_name_match_p (GLRO(dl_profile), l)) - { - /* This is the object we are looking for. Say that - we really want profiling and the timers are - started. */ - GL(dl_profile_map) = l; - } - - if((unsigned long) &_dl_runtime_resolve & 3) - { - got[-2] = (Elf32_Addr) ((struct fdesc *) - ((unsigned long) &_dl_runtime_profile & ~3))->ip; - } - else - { - /* Static executable */ - got[-2] = (Elf32_Addr) &_dl_runtime_profile; - } - } - /* Plunk in the gp of this function descriptor so we - can make the call to _dl_runtime_xxxxxx */ - got[-1] = ltp; - break; - /* Done looking for the GOT, and stub is setup */ - } /* else we found the GOT */ - } /* for, walk the relocs backwards */ - - if(!got) - return 0; /* No lazy linking for you! */ - - /* Process all the relocs, now that we know the GOT... */ - for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela)) - { - reloc = (const Elf32_Rela *) iplt; - r_type = ELF32_R_TYPE (reloc->r_info); - r_sym = ELF32_R_SYM (reloc->r_info); - - if (__builtin_expect (r_type == R_PARISC_IPLT, 1)) - { - fptr = (struct fdesc *) (reloc->r_offset + l_addr); - if (r_sym != 0) - { - /* Relocate the pointer to the stub. */ - fptr->ip = (Elf32_Addr) got - GOT_FROM_PLT_STUB; - - /* Instead of the LTP value, we put the reloc offset - here. The trampoline code will load the proper - LTP and pass the reloc offset to the fixup - function. */ - fptr->gp = iplt - jmprel; - } /* r_sym != 0 */ - else - { - /* Relocate this *ABS* entry. */ - fptr->ip = reloc->r_addend + l_addr; - fptr->gp = D_PTR (l, l_info[DT_PLTGOT]); - } - } /* r_type == R_PARISC_IPLT */ - } /* for all the relocations */ - } /* if lazy */ - else - { - for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela)) - { - reloc = (const Elf32_Rela *) iplt; - r_type = ELF32_R_TYPE (reloc->r_info); - r_sym = ELF32_R_SYM (reloc->r_info); - - if (__builtin_expect ((r_type == R_PARISC_IPLT) && (r_sym == 0), 1)) - { - fptr = (struct fdesc *) (reloc->r_offset + l_addr); - /* Relocate this *ABS* entry, set only the gp, the rest is set later - when elf_machine_rela_relative is called (WITHOUT the linkmap) */ - fptr->gp = D_PTR (l, l_info[DT_PLTGOT]); - } /* r_type == R_PARISC_IPLT */ - } /* for all the relocations */ - } - return lazy; -} - -/* Initial entry point code for the dynamic linker. - The C function `_dl_start' is the real entry point; - its return value is the user program's entry point. */ - -#define RTLD_START \ -/* Set up dp for any non-PIC lib constructors that may be called. */ \ -static struct link_map * __attribute__((used)) \ -set_dp (struct link_map *map) \ -{ \ - register Elf32_Addr dp asm ("%r27"); \ - dp = D_PTR (map, l_info[DT_PLTGOT]); \ - asm volatile ("" : : "r" (dp)); \ - return map; \ -} \ - \ -asm ( \ -" .text\n" \ -" .globl _start\n" \ -" .type _start,@function\n" \ -"_start:\n" \ - /* The kernel does not give us an initial stack frame. */ \ -" ldo 64(%sp),%sp\n" \ - /* Save the relevant arguments (yes, those are the correct \ - registers, the kernel is weird) in their stack slots. */ \ -" stw %r25,-40(%sp)\n" /* argc */ \ -" stw %r24,-44(%sp)\n" /* argv */ \ - \ - /* We need the LTP, and we need it now. \ - $PIC_pcrel$0 points 8 bytes past the current instruction, \ - just like a branch reloc. This sequence gets us the \ - runtime address of _DYNAMIC. */ \ -" bl 0f,%r19\n" \ -" depi 0,31,2,%r19\n" /* clear priviledge bits */ \ -"0: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19\n" \ -" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26\n" \ - \ - /* The link time address is stored in the first entry of the \ - GOT. */ \ -" addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19\n" \ -" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20\n" \ - \ -" sub %r26,%r20,%r20\n" /* Calculate load offset */ \ - \ - /* Rummage through the dynamic entries, looking for \ - DT_PLTGOT. */ \ -" ldw,ma 8(%r26),%r19\n" \ -"1: cmpib,=,n 3,%r19,2f\n" /* tag == DT_PLTGOT? */ \ -" cmpib,<>,n 0,%r19,1b\n" \ -" ldw,ma 8(%r26),%r19\n" \ - \ - /* Uh oh! We didn't find one. Abort. */ \ -" iitlbp %r0,(%r0)\n" \ - \ -"2: ldw -4(%r26),%r19\n" /* Found it, load value. */ \ -" add %r19,%r20,%r19\n" /* And add the load offset. */ \ - \ - /* Our initial stack layout is rather different from everyone \ - else's due to the unique PA-RISC ABI. As far as I know it \ - looks like this: \ - \ - ----------------------------------- (this frame created above) \ - | 32 bytes of magic | \ - |---------------------------------| \ - | 32 bytes argument/sp save area | \ - |---------------------------------| ((current->mm->env_end) \ - | N bytes of slack | + 63 & ~63) \ - |---------------------------------| \ - | envvar and arg strings | \ - |---------------------------------| \ - | ELF auxiliary info | \ - | (up to 28 words) | \ - |---------------------------------| \ - | Environment variable pointers | \ - | upwards to NULL | \ - |---------------------------------| \ - | Argument pointers | \ - | upwards to NULL | \ - |---------------------------------| \ - | argc (1 word) | \ - ----------------------------------- \ - \ - So, obviously, we can't just pass %sp to _dl_start. That's \ - okay, argv-4 will do just fine. \ - \ - The pleasant part of this is that if we need to skip \ - arguments we can just decrement argc and move argv, because \ - the stack pointer is utterly unrelated to the location of \ - the environment and argument vectors. */ \ - \ - /* This is always within range so we'll be okay. */ \ -" bl _dl_start,%rp\n" \ -" ldo -4(%r24),%r26\n" \ - \ -" .globl _dl_start_user\n" \ -" .type _dl_start_user,@function\n" \ -"_dl_start_user:\n" \ - /* Save the entry point in %r3. */ \ -" copy %ret0,%r3\n" \ - \ - /* Remember the lowest stack address. */ \ -" addil LT'__libc_stack_end,%r19\n" \ -" ldw RT'__libc_stack_end(%r1),%r20\n" \ -" stw %sp,0(%r20)\n" \ - \ - /* See if we were called as a command with the executable file \ - name as an extra leading argument. */ \ -" addil LT'_dl_skip_args,%r19\n" \ -" ldw RT'_dl_skip_args(%r1),%r20\n" \ -" ldw 0(%r20),%r20\n" \ - \ -" ldw -40(%sp),%r25\n" /* argc */ \ -" comib,= 0,%r20,.Lnofix\n" /* FIXME: Mispredicted branch */\ -" ldw -44(%sp),%r24\n" /* argv (delay slot) */ \ - \ -" sub %r25,%r20,%r25\n" \ -" stw %r25,-40(%sp)\n" \ -" sh2add %r20,%r24,%r24\n" \ -" stw %r24,-44(%sp)\n" \ - \ -".Lnofix:\n" \ -" addil LT'_rtld_local,%r19\n" \ -" ldw RT'_rtld_local(%r1),%r26\n" \ -" bl set_dp, %r2\n" \ -" ldw 0(%r26),%r26\n" \ - \ - /* Call _dl_init(_dl_loaded, argc, argv, envp). */ \ -" copy %r28,%r26\n" \ - \ - /* envp = argv + argc + 1 */ \ -" sh2add %r25,%r24,%r23\n" \ -" bl _dl_init_internal,%r2\n" \ -" ldo 4(%r23),%r23\n" /* delay slot */ \ - \ - /* Reload argc, argv to the registers start.S expects. */ \ -" ldw -40(%sp),%r25\n" \ -" ldw -44(%sp),%r24\n" \ - \ - /* _dl_fini does have a PLT slot now. I don't know how to get \ - to it though, so this hack will remain. */ \ -" .section .data\n" \ -"__dl_fini_plabel:\n" \ -" .word _dl_fini\n" \ -" .word 0xdeadbeef\n" \ -" .previous\n" \ - \ - /* %r3 contains a function pointer, we need to mask out the \ - lower bits and load the gp and jump address. */ \ -" depi 0,31,2,%r3\n" \ -" ldw 0(%r3),%r2\n" \ -" addil LT'__dl_fini_plabel,%r19\n" \ -" ldw RT'__dl_fini_plabel(%r1),%r23\n" \ -" stw %r19,4(%r23)\n" \ -" ldw 4(%r3),%r19\n" /* load the object's gp */ \ -" bv %r0(%r2)\n" \ -" depi 2,31,2,%r23\n" /* delay slot */ \ - ); - - -/* This code gets called via the .plt stub, and is used in - dl-runtime.c to call the `fixup' function and then redirect to the - address it returns. - - WARNING: This template is also used by gcc's __cffc, and expects - that the "bl" for fixup() 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. */ -#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ - extern void tramp_name (void); \ - asm ( \ - " .text\n" \ - /* FAKE bl to provide gcc's __cffc with fixup's address */ \ - " bl " #fixup_name ",%r2\n" /* Runtime address of fixup */ \ - " .globl " #tramp_name "\n" \ - " .type " #tramp_name ",@function\n" \ - #tramp_name ":\n" \ - " .proc\n" \ - " .callinfo frame=64,calls,save_rp\n" \ - " .entry\n" \ - /* Save return pointer */ \ - " stw %r2,-20(%sp)\n" \ - /* Save argument registers in the call stack frame. */ \ - " stw %r26,-36(%sp)\n" \ - " stw %r25,-40(%sp)\n" \ - " stw %r24,-44(%sp)\n" \ - " stw %r23,-48(%sp)\n" \ - /* Build a call frame, and save structure pointer. */ \ - " stwm %r28,64(%sp)\n" \ - \ - /* Set up args to fixup func. */ \ - " ldw 8+4(%r20),%r26\n" /* (1) got[1] == struct link_map */ \ - " copy %r19,%r25\n" /* (2) reloc offset */ \ - " copy %r2,%r24\n" /* (3) profile_fixup needs rp */ \ - \ - /* Call the real address resolver. */ \ - " bl " #fixup_name ",%r2\n" \ - " copy %r21,%r19\n" /* set fixup func ltp (DELAY SLOT)*/ \ - \ - " ldw 0(%r28),%r22\n" /* load up the returned func ptr */ \ - " ldw 4(%r28),%r19\n" \ - " ldwm -64(%sp),%r28\n" \ - /* Arguments. */ \ - " ldw -36(%sp),%r26\n" \ - " ldw -40(%sp),%r25\n" \ - " ldw -44(%sp),%r24\n" \ - " ldw -48(%sp),%r23\n" \ - /* Call the real function. */ \ - " bv %r0(%r22)\n" \ - /* Return pointer. */ \ - " ldw -20(%sp),%r2\n" \ - " .exit\n" \ - " .procend\n"); - -#ifndef PROF -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ - TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \ - TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup); -#else -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ - TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \ - strong_alias (_dl_runtime_resolve, _dl_runtime_profile); -#endif - -/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. - ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one - of the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_type_class(type) \ - ((((type) == R_PARISC_IPLT || (type) == R_PARISC_EPLT) \ - * ELF_RTYPE_CLASS_PLT) \ - | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY)) - -/* Used by the runtime in fixup to figure out if reloc is *really* PLT */ -#define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT -#define ELF_MACHINE_SIZEOF_JMP_SLOT PLT_ENTRY_SIZE - -/* We only use RELA. */ -#define ELF_MACHINE_NO_REL 1 - -/* Return the address of the entry point. */ -#define ELF_MACHINE_START_ADDRESS(map, start) \ - DL_STATIC_FUNCTION_ADDRESS (map, start) - -/* We define an initialization functions. This is called very early in - * _dl_sysdep_start. */ -#define DL_PLATFORM_INIT dl_platform_init () - -static inline void __attribute__ ((unused)) -dl_platform_init (void) -{ - if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') - /* Avoid an empty string which would disturb us. */ - GLRO(dl_platform) = NULL; -} - -#endif /* !dl_machine_h */ - -/* These are only actually used where RESOLVE_MAP is defined, anyway. */ -#ifdef RESOLVE_MAP - -auto void __attribute__((always_inline)) -elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - const Elf32_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg) -{ - Elf32_Addr *const reloc_addr = reloc_addr_arg; - const Elf32_Sym *const refsym = sym; - unsigned long const r_type = ELF32_R_TYPE (reloc->r_info); - struct link_map *sym_map; - Elf32_Addr value; - -# if !defined RTLD_BOOTSTRAP && !defined SHARED - /* This is defined in rtld.c, but nowhere in the static libc.a; make the - reference weak so static programs can still link. This declaration - cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) - because rtld.c contains the common defn for _dl_rtld_map, which is - incompatible with a weak decl in the same file. */ - weak_extern (GL(dl_rtld_map)); -# endif - - /* RESOLVE_MAP will return a null value for undefined syms, and - non-null for all other syms. In particular, relocs with no - symbol (symbol index of zero), also called *ABS* relocs, will be - resolved to MAP. (The first entry in a symbol table is all - zeros, and an all zero Elf32_Sym has a binding of STB_LOCAL.) - See RESOLVE_MAP definition in elf/dl-reloc.c */ -# ifdef RTLD_BOOTSTRAP - /* RESOLVE_MAP in rtld.c doesn't have the local sym test. */ - sym_map = (ELF32_ST_BIND (sym->st_info) != STB_LOCAL - ? RESOLVE_MAP (&sym, version, r_type) : map); -# else - sym_map = RESOLVE_MAP (&sym, version, r_type); -# endif - if (sym_map) - { - value = sym ? sym_map->l_addr + sym->st_value : 0; - value += reloc->r_addend; - } - else - value = 0; - - switch (r_type) - { - case R_PARISC_DIR32: - /* .eh_frame can have unaligned relocs. */ - if ((unsigned long) reloc_addr_arg & 3) - { - char *rel_addr = (char *) reloc_addr_arg; - rel_addr[0] = value >> 24; - rel_addr[1] = value >> 16; - rel_addr[2] = value >> 8; - rel_addr[3] = value; - return; - } - break; - - case R_PARISC_PLABEL32: - /* Easy rule: If there is a symbol and it is global, then we - need to make a dynamic function descriptor. Otherwise we - have the address of a PLT slot for a local symbol which we - know to be unique. */ - if (sym == NULL - || sym_map == NULL - || ELF32_ST_BIND (sym->st_info) == STB_LOCAL) - { - break; - } - /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. - We have to do this outside of the generic function descriptor - code, since it doesn't know about our requirement for setting - protection bits */ - value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2); - break; - - case R_PARISC_IPLT: - if (__builtin_expect (sym_map != NULL, 1)) - { - elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value); - } - else - { - /* If we get here, it's a (weak) undefined sym. */ - elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value); - } - return; - - case R_PARISC_COPY: - if (__builtin_expect (sym == NULL, 0)) - /* This can happen in trace mode if an object could not be - found. */ - break; - if (__builtin_expect (sym->st_size > refsym->st_size, 0) - || (__builtin_expect (sym->st_size < refsym->st_size, 0) - && __builtin_expect (GLRO(dl_verbose), 0))) - { - const char *strtab; - - strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]); - _dl_error_printf ("%s: Symbol `%s' has different size in shared object, " - "consider re-linking\n", - rtld_progname ?: "<program name unknown>", - strtab + refsym->st_name); - } - memcpy (reloc_addr_arg, (void *) value, - MIN (sym->st_size, refsym->st_size)); - return; - - case R_PARISC_NONE: /* Alright, Wilbur. */ - return; - - default: - _dl_reloc_bad_type (map, r_type, 0); - } - - *reloc_addr = value; -} - -/* hppa doesn't have an R_PARISC_RELATIVE reloc, but uses relocs with - ELF32_R_SYM (info) == 0 for a similar purpose. */ -auto void __attribute__((always_inline)) -elf_machine_rela_relative (Elf32_Addr l_addr, - const Elf32_Rela *reloc, - void *const reloc_addr_arg) -{ - unsigned long const r_type = ELF32_R_TYPE (reloc->r_info); - Elf32_Addr *const reloc_addr = reloc_addr_arg; - static char msgbuf[] = { "Unknown" }; - struct link_map map; - Elf32_Addr value; - - value = l_addr + reloc->r_addend; - - if (ELF32_R_SYM (reloc->r_info) != 0){ - _dl_error_printf ("%s: In elf_machine_rela_relative " - "ELF32_R_SYM (reloc->r_info) != 0. Aborting.", - rtld_progname ?: "<program name unknown>"); - ABORT_INSTRUCTION; /* Crash. */ - } - - switch (r_type) - { - case R_PARISC_DIR32: - /* .eh_frame can have unaligned relocs. */ - if ((unsigned long) reloc_addr_arg & 3) - { - char *rel_addr = (char *) reloc_addr_arg; - rel_addr[0] = value >> 24; - rel_addr[1] = value >> 16; - rel_addr[2] = value >> 8; - rel_addr[3] = value; - return; - } - break; - - case R_PARISC_PLABEL32: - break; - - case R_PARISC_IPLT: /* elf_machine_runtime_setup already set gp */ - break; - - case R_PARISC_NONE: - return; - - default: /* Bad reloc, map unknown (really it's the current map) */ - map.l_name = msgbuf; - _dl_reloc_bad_type (&map, r_type, 0); - return; - } - - *reloc_addr = value; -} - -auto void __attribute__((always_inline)) -elf_machine_lazy_rel (struct link_map *map, - Elf32_Addr l_addr, const Elf32_Rela *reloc) -{ - /* We don't have anything to do here. elf_machine_runtime_setup has - done all the relocs already. */ -} - -#endif /* RESOLVE_MAP */ diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c deleted file mode 100644 index e5ce6a9..0000000 --- a/sysdeps/hppa/dl-symaddr.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Get the symbol address. HPPA version. - Copyright (C) 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <ldsodefs.h> -#include <dl-machine.h> - -void * -_dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref) -{ - /* Find the "ip" from the "map" and symbol "ref" */ - Elf32_Addr value = (map ? map->l_addr : 0) + ref->st_value; - - /* On hppa, we have to return the pointer to function descriptor. - This involves an "| 2" to inform $$dyncall that this is a plabel32 */ - if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC){ - return (void *)((unsigned long)_dl_make_fptr (map, ref, value) | 2); - } - else - return (void *) value; -} diff --git a/sysdeps/hppa/elf/entry.h b/sysdeps/hppa/elf/entry.h deleted file mode 100644 index b024db2..0000000 --- a/sysdeps/hppa/elf/entry.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __ASSEMBLY__ -extern void _start (void); -#endif - -/* The function's entry point is stored in the first word of the - function descriptor (plabel) of _start(). */ -#define ENTRY_POINT __canonicalize_funcptr_for_compare(_start) - -/* We have to provide a special declaration. */ -#define ENTRY_POINT_DECL(class) class void _start (void); diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c deleted file mode 100644 index 35f5dd5..0000000 --- a/sysdeps/hppa/elf/initfini.c +++ /dev/null @@ -1,139 +0,0 @@ -/* Special .init and .fini section support for HPPA - Copyright (C) 2000, 2002 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This file is compiled into assembly code which is then munged by a sed - script into two files: crti.s and crtn.s. - - * crti.s puts a function prologue at the beginning of the - .init and .fini sections and defines global symbols for - those addresses, so they can be called as functions. - - * crtn.s puts the corresponding function epilogues - in the .init and .fini sections. */ - -/* If we use the standard C version, the linkage table pointer won't - be properly preserved due to the splitting up of function prologues - and epilogues. Therefore we write these in assembly to make sure - they do the right thing. - - Note that we cannot have a weak undefined __gmon_start__, because - that would require this to be PIC, and the linker is currently not - able to generate a proper procedure descriptor for _init. Sad but - true. Anyway, HPPA is one of those horrible architectures where - making the comparison and indirect call is quite expensive (see the - comment in sysdeps/generic/initfini.c). */ - -__asm__ ("\ -\n\ -#include \"defs.h\"\n\ -\n\ -/*@HEADER_ENDS*/\n\ -\n\ -/*@_init_PROLOG_BEGINS*/\n\ - .section .init\n\ - .align 4\n\ - .globl _init\n\ - .type _init,@function\n\ -_init:\n\ - stw %rp,-20(%sp)\n\ - stwm %r4,64(%sp)\n\ - stw %r19,-32(%sp)\n\ - bl __gmon_start__,%rp\n\ - copy %r19,%r4 /* delay slot */\n\ - copy %r4,%r19\n\ -/*@_init_PROLOG_ENDS*/\n\ -\n\ -/*@_init_EPILOG_BEGINS*/\n\ - .text\n\ - .align 4\n\ - .weak __gmon_start__\n\ - .type __gmon_start__,@function\n\ -__gmon_start__:\n\ - .proc\n\ - .callinfo\n\ - .entry\n\ - bv,n %r0(%r2)\n\ - .exit\n\ - .procend\n\ -\n\ -/* Here is the tail end of _init. We put __gmon_start before this so\n\ - that the assembler creates the .PARISC.unwind section for us, ie.\n\ - with the right attributes. */\n\ - .section .init\n\ - ldw -84(%sp),%rp\n\ - copy %r4,%r19\n\ - bv %r0(%rp)\n\ -_end_init:\n\ - ldwm -64(%sp),%r4\n\ -\n\ -/* Our very own unwind info, because the assembler can't handle\n\ - functions split into two or more pieces. */\n\ - .section .PARISC.unwind\n\ - .extern _init\n\ - .word _init, _end_init\n\ - .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n\ -\n\ -/*@_init_EPILOG_ENDS*/\n\ -\n\ -/*@_fini_PROLOG_BEGINS*/\n\ - .section .fini\n\ - .align 4\n\ - .globl _fini\n\ - .type _fini,@function\n\ -_fini:\n\ - stw %rp,-20(%sp)\n\ - stwm %r4,64(%sp)\n\ - stw %r19,-32(%sp)\n\ - copy %r19,%r4\n\ -/*@_fini_PROLOG_ENDS*/\n\ -\n\ -/*@_fini_EPILOG_BEGINS*/\n\ - .section .fini\n\ - ldw -84(%sp),%rp\n\ - copy %r4,%r19\n\ - bv %r0(%rp)\n\ -_end_fini:\n\ - ldwm -64(%sp),%r4\n\ -\n\ - .section .PARISC.unwind\n\ - .extern _fini\n\ - .word _fini, _end_fini\n\ - .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n\ -\n\ -/*@_fini_EPILOG_ENDS*/\n\ -\n\ -/*@TRAILER_BEGINS*/\ -"); diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S deleted file mode 100644 index 94edeaa..0000000 --- a/sysdeps/hppa/elf/start.S +++ /dev/null @@ -1,121 +0,0 @@ -/* ELF startup code for HPPA. - Copyright (C) 2002 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - - .import main, code - .import $global$, data - .import __libc_start_main, code - .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 */ - .section .rodata - .align 4 -.Lpmain: - .word P%main -.Lp__libc_start_main: - .word P%__libc_start_main -.Lp__libc_csu_fini: - .word P%__libc_csu_fini -.Lp__libc_csu_init: - .word P%__libc_csu_init - - .text - .align 4 - .globl _start - .export _start, ENTRY - .type _start,@function -_start: - - .proc - .callinfo - - /* Expand the stack to store the 5th through 7th args */ - ldo 64(%sp), %sp - /* TODO: Follow ABI? Place more things on the stack here... */ - -#if SHARED - /* load main (1st argument) */ - addil LR'.Lpmain, %r19 - ldw RR'.Lpmain(%r1), %r26 - ldw 0(%r26),%r26 - /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */ - /* void (*init) (void) (4th argument) */ - addil LR'.Lp__libc_csu_init, %r19 - ldw RR'.Lp__libc_csu_init(%r1), %r23 - ldw 0(%r23), %r23 - /* void (*fini) (void) (5th argument) */ - addil LR'.Lp__libc_csu_fini, %r19 - ldw RR'.Lp__libc_csu_fini(%r1), %r22 - ldw 0(%r22), %r22 -#else - /* load main (1st argument) */ - ldil LR'.Lpmain, %r26 - ldw RR'.Lpmain(%r26), %r26 - /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */ - /* void (*init) (void) (4th argument) */ - ldil LR'.Lp__libc_csu_init, %r23 - ldw RR'.Lp__libc_csu_init(%r23), %r23 - /* void (*fini) (void) (5th argument) */ - ldil LR'.Lp__libc_csu_fini, %r22 - ldw RR'.Lp__libc_csu_fini(%r22), %r22 -#endif - /* Store 5th argument */ - stw %r22, -52(%sp) - /* void (*rtld_fini) (void) (6th argument) */ - stw %r23, -56(%sp) - /* void *stack_end (7th argument) */ - stw %sp, -60(%sp) - - /* load global */ - ldil L%$global$, %dp - ldo R%$global$(%dp), %dp - - bl __libc_start_main,%r2 - nop - /* die horribly if it returned (it shouldn't) */ - iitlbp %r0,(%sr0,%r0) - nop - - .procend - -/* Define a symbol for the first piece of initialized data. */ - .data - .globl __data_start -__data_start: - .long 0 - .weak data_start - data_start = __data_start diff --git a/sysdeps/hppa/fpu/bits/fenv.h b/sysdeps/hppa/fpu/bits/fenv.h deleted file mode 100644 index c5f8c43..0000000 --- a/sysdeps/hppa/fpu/bits/fenv.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FENV_H -# error "Never use <bits/fenv.h> directly; include <fenv.h> instead." -#endif - -/* Define bits representing the exception. We use the values of the - appropriate enable bits in the FPU status word (which, - coincidentally, are the same as the flag bits, but shifted right by - 27 bits). */ -enum -{ - FE_INVALID = 1<<4, /* V */ -#define FE_INVALID FE_INVALID - FE_DIVBYZERO = 1<<3, /* Z */ -#define FE_DIVBYZERO FE_DIVBYZERO - FE_OVERFLOW = 1<<2, /* O */ -#define FE_OVERFLOW FE_OVERFLOW - FE_UNDERFLOW = 1<<1, /* U */ -#define FE_UNDERFLOW FE_UNDERFLOW - FE_INEXACT = 1<<0, /* I */ -#define FE_INEXACT FE_INEXACT -}; - -#define FE_ALL_EXCEPT \ - (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) - -/* The PA-RISC FPU supports all of the four defined rounding modes. - We use the values of the RM field in the floating point status - register for the appropriate macros. */ -enum - { - FE_TONEAREST = 0 << 9, -#define FE_TONEAREST FE_TONEAREST - FE_TOWARDZERO = 1 << 9, -#define FE_TOWARDZERO FE_TOWARDZERO - FE_UPWARD = 2 << 9, -#define FE_UPWARD FE_UPWARD - FE_DOWNWARD = 3 << 9, -#define FE_DOWNWARD FE_DOWNWARD - }; - -/* Type representing exception flags. */ -typedef unsigned int fexcept_t; - -/* Type representing floating-point environment. This structure - corresponds to the layout of the status and exception words in the - register file. */ -typedef struct -{ - unsigned int __status_word; - unsigned int __exception[7]; -} fenv_t; - -/* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1) - -#ifdef __USE_GNU -/* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((fenv_t *) -2) -#endif diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c deleted file mode 100644 index a7c6982..0000000 --- a/sysdeps/hppa/fpu/fclrexcpt.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Clear given exceptions in current floating-point environment. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -feclearexcept (int excepts) -{ - unsigned int sw[2]; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - - /* Clear all the relevant bits. */ - sw[0] &= ~((excepts & FE_ALL_EXCEPT) << 27); - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); - - /* Success. */ - return 0; -} diff --git a/sysdeps/hppa/fpu/fedisblxcpt.c b/sysdeps/hppa/fpu/fedisblxcpt.c deleted file mode 100644 index aac6bbf..0000000 --- a/sysdeps/hppa/fpu/fedisblxcpt.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Disable floating-point exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fedisableexcept (int excepts) -{ - unsigned int sw[2], old_exc; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - - old_exc = sw[0] & FE_ALL_EXCEPT; - - sw[0] &= ~(excepts & FE_ALL_EXCEPT); - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); - - return old_exc; -} diff --git a/sysdeps/hppa/fpu/feenablxcpt.c b/sysdeps/hppa/fpu/feenablxcpt.c deleted file mode 100644 index 9ce3ca8..0000000 --- a/sysdeps/hppa/fpu/feenablxcpt.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Enable floating-point exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -feenableexcept (int excepts) -{ - unsigned int sw[2], old_exc; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - - old_exc = sw[0] & FE_ALL_EXCEPT; - - sw[0] |= (excepts & FE_ALL_EXCEPT); - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); - - return old_exc; -} diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c deleted file mode 100644 index b87317b..0000000 --- a/sysdeps/hppa/fpu/fegetenv.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Store current floating-point environment. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fegetenv (fenv_t *envp) -{ - __asm__ ( - "fstd,ma %%fr0,8(%1)\n" - "fstd,ma %%fr1,8(%1)\n" - "fstd,ma %%fr2,8(%1)\n" - "fstd %%fr3,0(%1)\n" - : "=m" (*envp), "+r" (envp)); - return 0; -} diff --git a/sysdeps/hppa/fpu/fegetexcept.c b/sysdeps/hppa/fpu/fegetexcept.c deleted file mode 100644 index efd1d7d..0000000 --- a/sysdeps/hppa/fpu/fegetexcept.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Get enabled floating-point exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fegetexcept (void) -{ - unsigned int sw[2]; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - - return sw[0] & FE_ALL_EXCEPT; -} diff --git a/sysdeps/hppa/fpu/fegetround.c b/sysdeps/hppa/fpu/fegetround.c deleted file mode 100644 index aefedbc..0000000 --- a/sysdeps/hppa/fpu/fegetround.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Return current rounding direction. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fegetround (void) -{ - unsigned int sw[2]; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - - return sw[0] & FE_DOWNWARD; -} diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c deleted file mode 100644 index 5aec015..0000000 --- a/sysdeps/hppa/fpu/feholdexcpt.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Store current floating-point environment and clear exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> -#include <string.h> - -int -feholdexcept (fenv_t *envp) -{ - fenv_t clear; - fenv_t * _regs = envp; - - /* Store the environment. */ - __asm__ ( - "fstd,ma %%fr0,8(%1)\n" - "fstd,ma %%fr1,8(%1)\n" - "fstd,ma %%fr2,8(%1)\n" - "fstd %%fr3,0(%1)\n" - : "=m" (*_regs), "+r" (_regs)); - memcpy (&clear, envp, sizeof (clear)); - - /* Now clear all exceptions. */ - clear.__status_word &= ~(FE_ALL_EXCEPT << 27); - memset (clear.__exception, 0, sizeof (clear.__exception)); - - /* And set all exceptions to non-stop. */ - clear.__status_word &= ~FE_ALL_EXCEPT; - - /* Load the new environment. */ - _regs = &clear; - __asm__ ( - "fldd,ma 8(%0),%%fr0\n" - "fldd,ma 8(%0),%%fr1\n" - "fldd,ma 8(%0),%%fr2\n" - "fldd 0(%0),%%fr3\n" - : : "r" (_regs)); - - return 0; -} diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c deleted file mode 100644 index 5267732..0000000 --- a/sysdeps/hppa/fpu/fesetenv.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Install given floating-point environment. - Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - Based on the m68k version by - Andreas Schwab <schwab@suse.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fesetenv (const fenv_t *envp) -{ - fenv_t temp; - fenv_t * _regs = &temp; - - /* Install the environment specified by ENVP. But there are a few - values which we do not want to come from the saved environment. - Therefore, we get the current environment and replace the values - we want to use from the environment specified by the parameter. */ - __asm__ ( - "fstd,ma %%fr0,8(%1)\n" - "fstd,ma %%fr1,8(%1)\n" - "fstd,ma %%fr2,8(%1)\n" - "fstd %%fr3,0(%1)\n" - : "=m" (*_regs), "+r" (_regs)); - - temp.__status_word &= ~(FE_ALL_EXCEPT - | (FE_ALL_EXCEPT << 27) - | FE_DOWNWARD); - if (envp == FE_DFL_ENV) - ; - else if (envp == FE_NOMASK_ENV) - temp.__status_word |= FE_ALL_EXCEPT; - else - temp.__status_word |= (envp->__status_word - & (FE_ALL_EXCEPT - | FE_DOWNWARD - | (FE_ALL_EXCEPT << 27))); - - /* Load the new environment. */ - __asm__ ( - "fldd,ma -8(%1),%%fr3\n" - "fldd,ma -8(%1),%%fr2\n" - "fldd,ma -8(%1),%%fr1\n" - "fldd 0(%1),%%fr0\n" - : "=m" (*_regs), "+r" (_regs)); - - /* Success. */ - return 0; -} -libm_hidden_def (fesetenv) diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c deleted file mode 100644 index 3687624..0000000 --- a/sysdeps/hppa/fpu/fesetround.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Set current rounding direction. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fesetround (int round) -{ - unsigned int sw[2]; - - if (round & ~FE_DOWNWARD) - /* ROUND is not a valid rounding mode. */ - return 1; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - sw[0] &= ~FE_DOWNWARD; - sw[0] |= round; - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); - - return 0; -} diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c deleted file mode 100644 index 7d50282..0000000 --- a/sysdeps/hppa/fpu/feupdateenv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Install given floating-point environment and raise exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -feupdateenv (const fenv_t *envp) -{ - unsigned int sw[2]; - - /* Get the current exception status. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - /* Install new environment. */ - fesetenv (envp); - /* Raise the saved exceptions */ - feraiseexcept(sw[0] & FE_ALL_EXCEPT); - - /* Success. */ - return 0; -} diff --git a/sysdeps/hppa/fpu/fgetexcptflg.c b/sysdeps/hppa/fpu/fgetexcptflg.c deleted file mode 100644 index 27766ec..0000000 --- a/sysdeps/hppa/fpu/fgetexcptflg.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Store current representation for exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fegetexceptflag (fexcept_t *flagp, int excepts) -{ - unsigned int sw[2]; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - - *flagp = (sw[0] >> 27) & excepts & FE_ALL_EXCEPT; - - /* Success. */ - return 0; -} - diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c deleted file mode 100644 index b064dc1..0000000 --- a/sysdeps/hppa/fpu/fraiseexcpt.c +++ /dev/null @@ -1,102 +0,0 @@ -/* Raise given exceptions. - Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> -#include <float.h> -#include <math.h> - -/* Please see section 10, - page 10-5 "Delayed Trapping" in the PA-RISC 2.0 Architecture manual */ - -int -feraiseexcept (int excepts) -{ - /* Raise exceptions represented by EXCEPTS. But we must raise only one - signal at a time. It is important that if the overflow/underflow - exception and the divide by zero exception are given at the same - time, the overflow/underflow exception follows the divide by zero - exception. */ - - /* We do these bits in assembly to be certain GCC doesn't optimize - away something important, and so we can force delayed traps to - occur. */ - - /* We use "fldd 0(%%sr0,%%sp),%0" to flush the delayed exception */ - - /* First: Invalid exception. */ - if (excepts & FE_INVALID) - { - /* One example of a invalid operation is 0 * Infinity. */ - double d = HUGE_VAL; - __asm__ __volatile__ ( - " fcpy,dbl %%fr0,%%fr22\n" - " fmpy,dbl %0,%%fr22,%0\n" - " fldd 0(%%sr0,%%sp),%0" - : "+f" (d) : : "%fr22" ); - } - - /* Second: Division by zero. */ - if (excepts & FE_DIVBYZERO) - { - double d = 1.0; - __asm__ __volatile__ ( - " fcpy,dbl %%fr0,%%fr22\n" - " fdiv,dbl %0,%%fr22,%0\n" - " fldd 0(%%sr0,%%sp),%0" - : "+f" (d) : : "%fr22" ); - } - - /* Third: Overflow. */ - if (excepts & FE_OVERFLOW) - { - double d = DBL_MAX; - __asm__ __volatile__ ( - " fadd,dbl %0,%0,%0\n" - " fldd 0(%%sr0,%%sp),%0" - : "+f" (d) ); - } - - /* Fourth: Underflow. */ - if (excepts & FE_UNDERFLOW) - { - double d = DBL_MIN; - double e = 3.0; - __asm__ __volatile__ ( - " fdiv,dbl %0,%1,%0\n" - " fldd 0(%%sr0,%%sp),%0" - : "+f" (d) : "f" (e) ); - } - - /* Fifth: Inexact */ - if (excepts & FE_INEXACT) - { - double d = M_PI; - double e = 69.69; - __asm__ __volatile__ ( - " fdiv,dbl %0,%1,%%fr22\n" - " fcnvfxt,dbl,sgl %%fr22,%%fr22L\n" - " fldd 0(%%sr0,%%sp),%%fr22" - : : "f" (d), "f" (e) : "%fr22" ); - } - - /* Success. */ - return 0; -} -libm_hidden_def (feraiseexcept) diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c deleted file mode 100644 index af35f5a..0000000 --- a/sysdeps/hppa/fpu/fsetexcptflg.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Set floating-point environment exception handling. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> -#include <math.h> - -int -fesetexceptflag (const fexcept_t *flagp, int excepts) -{ - unsigned int sw[2]; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - - /* Install new enable trap bits */ - sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27; - - /* Store the new status word. */ - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); - - /* Success. */ - return 0; -} diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/sysdeps/hppa/fpu/ftestexcept.c deleted file mode 100644 index d08d4d6..0000000 --- a/sysdeps/hppa/fpu/ftestexcept.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Test exception in current environment. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fetestexcept (int excepts) -{ - unsigned int sw[2]; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - - return (sw[0] >> 27) & excepts & FE_ALL_EXCEPT; -} diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps deleted file mode 100644 index b514496..0000000 --- a/sysdeps/hppa/fpu/libm-test-ulps +++ /dev/null @@ -1,890 +0,0 @@ -# Begin of automatic generation - -# atan2 -Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 -Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 -Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": -float: 1 -ifloat: 1 - -# atanh -Test "atanh (0.75) == 0.972955074527656652552676371721589865": -float: 1 -ifloat: 1 - -# cacosh -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 - -# casin -Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 5 -float: 1 -idouble: 5 -ifloat: 1 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 -Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -float: 3 -ifloat: 3 -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -float: 4 -ifloat: 4 - -# catanh -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -double: 4 -idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -float: 4 -ifloat: 4 -Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -double: 1 -idouble: 1 -Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -float: 6 -ifloat: 6 - -# cbrt -Test "cbrt (-27.0) == -3.0": -double: 1 -idouble: 1 -Test "cbrt (0.75) == 0.908560296416069829445605878163630251": -double: 1 -idouble: 1 -Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": -double: 1 -idouble: 1 - -# ccos -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -float: 1 -ifloat: 1 -Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -float: 1 -ifloat: 1 - -# ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -float: 1 -ifloat: 1 - -# cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -float: 1 -ifloat: 1 -Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -float: 1 -ifloat: 1 - -# clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -float: 3 -ifloat: 3 -Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": -float: 1 -ifloat: 1 - -# clog10 -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": -double: 1 -float: 5 -idouble: 1 -ifloat: 5 -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": -float: 1 -ifloat: 1 - -# cos -Test "cos (M_PI_6l * 2.0) == 0.5": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "cos (M_PI_6l * 4.0) == -0.5": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "cos (pi/2) == 0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# cpow -Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": -double: 2 -float: 3 -idouble: 2 -ifloat: 3 -Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -float: 2 -ifloat: 2 -Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 - -# csinh -Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -double: 1 -idouble: 1 -Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 - -# csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": -float: 1 -ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": -float: 1 -ifloat: 1 - -# ctan -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -double: 1 -idouble: 1 -Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": -double: 1 -idouble: 1 - -# ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": -float: 1 -ifloat: 1 -Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": -double: 1 -idouble: 1 - -# erf -Test "erf (1.25) == 0.922900128256458230136523481197281140": -double: 1 -idouble: 1 - -# erfc -Test "erfc (2.0) == 0.00467773498104726583793074363274707139": -double: 1 -idouble: 1 -Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": -double: 1 -idouble: 1 - -# exp10 -Test "exp10 (-1) == 0.1": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "exp10 (3) == 1000": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 - -# expm1 -Test "expm1 (0.75) == 1.11700001661267466854536981983709561": -double: 1 -idouble: 1 -Test "expm1 (1) == M_El - 1.0": -float: 1 -ifloat: 1 - -# hypot -Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 - -# j0 -Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "j0 (0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "j0 (10.0) == -0.245935764451348335197760862485328754": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "j0 (2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "j0 (8.0) == 0.171650807137553906090869407851972001": -float: 1 -ifloat: 1 - -# j1 -Test "j1 (10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -Test "j1 (2.0) == 0.576724807756873387202448242269137087": -double: 1 -idouble: 1 -Test "j1 (8.0) == 0.234636346853914624381276651590454612": -double: 1 -idouble: 1 - -# jn -Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": -float: 1 -ifloat: 1 -Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": -double: 1 -idouble: 1 -Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": -double: 1 -idouble: 1 -Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 -Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": -float: 4 -ifloat: 4 -Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -# lgamma -Test "lgamma (0.7) == 0.260867246531666514385732417016759578": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "log10 (e) == log10(e)": -float: 1 -ifloat: 1 - -# log1p -Test "log1p (-0.25) == -0.287682072451780927439219005993827432": -float: 1 -ifloat: 1 - -# sincos -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": -float: 1 -ifloat: 1 - -# tan -Test "tan (pi/4) == 1": -double: 1 -idouble: 1 - -# tgamma -Test "tgamma (-0.5) == -2 sqrt (pi)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "tgamma (0.5) == sqrt (pi)": -float: 1 -ifloat: 1 -Test "tgamma (0.7) == 1.29805533264755778568117117915281162": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# y0 -Test "y0 (1.0) == 0.0882569642156769579829267660235151628": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (1.5) == 0.382448923797758843955068554978089862": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (10.0) == 0.0556711672835993914244598774101900481": -float: 1 -ifloat: 1 -Test "y0 (8.0) == 0.223521489387566220527323400498620359": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# y1 -Test "y1 (0.125) == -5.19993611253477499595928744876579921": -double: 1 -idouble: 1 -Test "y1 (1.5) == -0.412308626973911295952829820633445323": -float: 1 -ifloat: 1 -Test "y1 (10.0) == 0.249015424206953883923283474663222803": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "y1 (2.0) == -0.107032431540937546888370772277476637": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "y1 (8.0) == -0.158060461731247494255555266187483550": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -# yn -Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": -float: 1 -ifloat: 1 -Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": -double: 1 -idouble: 1 -Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": -float: 1 -ifloat: 1 -Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "yn (10, 0.125) == -127057845771019398.252538486899753195": -double: 1 -idouble: 1 -Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (10, 1.0) == -121618014.278689189288130426667971145": -double: 1 -idouble: 1 -Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (10, 2.0) == -129184.542208039282635913145923304214": -double: 2 -idouble: 2 -Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": -double: 1 -idouble: 1 -Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": -double: 1 -idouble: 1 - -# Maximal error of functions: -Function: "atan2": -float: 3 -ifloat: 3 - -Function: "atanh": -float: 1 -ifloat: 1 - -Function: Real part of "cacosh": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 - -Function: Imaginary part of "cacosh": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 - -Function: Real part of "casin": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "casinh": -double: 5 -float: 1 -idouble: 5 -ifloat: 1 - -Function: Imaginary part of "casinh": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 - -Function: Real part of "catan": -float: 4 -ifloat: 4 - -Function: Imaginary part of "catan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "catanh": -double: 4 -idouble: 4 - -Function: Imaginary part of "catanh": -float: 6 -ifloat: 6 - -Function: "cbrt": -double: 1 -idouble: 1 - -Function: Real part of "ccos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "ccos": -float: 1 -ifloat: 1 - -Function: Real part of "ccosh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "ccosh": -float: 1 -ifloat: 1 - -Function: Real part of "cexp": -float: 1 -ifloat: 1 - -Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 - -Function: Real part of "clog": -float: 1 -ifloat: 1 - -Function: Imaginary part of "clog": -float: 3 -ifloat: 3 - -Function: Real part of "clog10": -float: 1 -ifloat: 1 - -Function: Imaginary part of "clog10": -double: 1 -float: 5 -idouble: 1 -ifloat: 5 - -Function: "cos": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - -Function: Real part of "cpow": -double: 2 -float: 4 -idouble: 2 -ifloat: 4 - -Function: Imaginary part of "cpow": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 - -Function: Real part of "csinh": -float: 1 -ifloat: 1 - -Function: Imaginary part of "csinh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "csqrt": -float: 1 -ifloat: 1 - -Function: Real part of "ctan": -double: 1 -idouble: 1 - -Function: Imaginary part of "ctan": -double: 1 -idouble: 1 - -Function: Real part of "ctanh": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: Imaginary part of "ctanh": -float: 1 -ifloat: 1 - -Function: "erf": -double: 1 -idouble: 1 - -Function: "erfc": -double: 1 -idouble: 1 - -Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 - -Function: "expm1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: "hypot": -float: 1 -ifloat: 1 - -Function: "j0": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 - -Function: "j1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: "jn": -double: 4 -float: 4 -idouble: 4 -ifloat: 4 - -Function: "lgamma": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: "log10": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: "log1p": -float: 1 -ifloat: 1 - -Function: "sincos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: "tan": -double: 1 -idouble: 1 - -Function: "tgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: "y0": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - -Function: "y1": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 - -Function: "yn": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 - -# end of automatic generation diff --git a/sysdeps/hppa/frame.h b/sysdeps/hppa/frame.h deleted file mode 100644 index 0a234f1..0000000 --- a/sysdeps/hppa/frame.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Definition of stack frame structure. HPPA version. - Copyright (C) 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* PA stacks grow upwards. */ -#define INNER_THAN > - -/* FIXME: will verify this later */ -struct layout -{ - void *next; - void *return_address; -}; diff --git a/sysdeps/hppa/gccframe.h b/sysdeps/hppa/gccframe.h deleted file mode 100644 index 65e44df..0000000 --- a/sysdeps/hppa/gccframe.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Definition of object in frame unwind info. hppa version. - Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Note: For hppa64 this is 61 */ -#define DWARF_FRAME_REGISTERS 89 - -#include <sysdeps/generic/gccframe.h> diff --git a/sysdeps/hppa/hppa1.1/Implies b/sysdeps/hppa/hppa1.1/Implies deleted file mode 100644 index 5f935a2..0000000 --- a/sysdeps/hppa/hppa1.1/Implies +++ /dev/null @@ -1,4 +0,0 @@ -wordsize-32 -ieee754/flt-32 -ieee754/dbl-64 -ieee754/ldbl-128 diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s deleted file mode 100644 index a1fb083..0000000 --- a/sysdeps/hppa/hppa1.1/addmul_1.s +++ /dev/null @@ -1,104 +0,0 @@ -;! HP-PA-1.1 __mpn_addmul_1 -- Multiply a limb vector with a limb and -;! add the result to a second limb vector. - -;! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. - -;! This file is part of the GNU MP Library. - -;! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. - - -;! INPUT PARAMETERS -;! res_ptr r26 -;! s1_ptr r25 -;! size r24 -;! s2_limb r23 - -;! This runs at 11 cycles/limb on a PA7000. With the used instructions, it -;! can not become faster due to data cache contention after a store. On the -;! PA7100 it runs at 10 cycles/limb, and that can not be improved either, -;! since only the xmpyu does not need the integer pipeline, so the only -;! dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb -;! on the PA7100. - -;! There are some ideas described in mul_1.s that applies to this code too. - - .text - .export __mpn_addmul_1 -__mpn_addmul_1: - .proc - .callinfo frame=64,no_calls - .entry - - ldo 64(%r30),%r30 - fldws,ma 4(%r25),%fr5 - stw %r23,-16(%r30) ;! move s2_limb ... - addib,= -1,%r24,L$just_one_limb - fldws -16(%r30),%fr4 ;! ... into fr4 - add %r0,%r0,%r0 ;! clear carry - xmpyu %fr4,%fr5,%fr6 - fldws,ma 4(%r25),%fr7 - fstds %fr6,-16(%r30) - xmpyu %fr4,%fr7,%fr8 - ldw -12(%r30),%r20 ;! least significant limb in product - ldw -16(%r30),%r28 - - fstds %fr8,-16(%r30) - addib,= -1,%r24,L$end - ldw -12(%r30),%r1 - -;! Main loop -L$loop: - ldws 0(%r26),%r29 - fldws,ma 4(%r25),%fr5 - add %r29,%r20,%r20 - stws,ma %r20,4(%r26) - addc %r28,%r1,%r20 - xmpyu %fr4,%fr5,%fr6 - ldw -16(%r30),%r28 - fstds %fr6,-16(%r30) - addc %r0,%r28,%r28 - addib,<> -1,%r24,L$loop - ldw -12(%r30),%r1 - -L$end: - ldw 0(%r26),%r29 - add %r29,%r20,%r20 - stws,ma %r20,4(%r26) - addc %r28,%r1,%r20 - ldw -16(%r30),%r28 - ldws 0(%r26),%r29 - addc %r0,%r28,%r28 - add %r29,%r20,%r20 - stws,ma %r20,4(%r26) - addc %r0,%r28,%r28 - bv 0(%r2) - ldo -64(%r30),%r30 - -L$just_one_limb: - xmpyu %fr4,%fr5,%fr6 - ldw 0(%r26),%r29 - fstds %fr6,-16(%r30) - ldw -12(%r30),%r1 - ldw -16(%r30),%r28 - add %r29,%r1,%r20 - stw %r20,0(%r26) - addc %r0,%r28,%r28 - bv 0(%r2) - ldo -64(%r30),%r30 - - .exit - .procend diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s deleted file mode 100644 index 00c770f..0000000 --- a/sysdeps/hppa/hppa1.1/mul_1.s +++ /dev/null @@ -1,100 +0,0 @@ -;! HP-PA-1.1 __mpn_mul_1 -- Multiply a limb vector with a limb and store -;! the result in a second limb vector. - -;! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. - -;! This file is part of the GNU MP Library. - -;! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. - - -;! INPUT PARAMETERS -;! res_ptr r26 -;! s1_ptr r25 -;! size r24 -;! s2_limb r23 - -;! This runs at 9 cycles/limb on a PA7000. With the used instructions, it can -;! not become faster due to data cache contention after a store. On the -;! PA7100 it runs at 7 cycles/limb, and that can not be improved either, since -;! only the xmpyu does not need the integer pipeline, so the only dual-issue -;! we will get are addc+xmpyu. Unrolling would not help either CPU. - -;! We could use fldds to read two limbs at a time from the S1 array, and that -;! could bring down the times to 8.5 and 6.5 cycles/limb for the PA7000 and -;! PA7100, respectively. We don't do that since it does not seem worth the -;! (alignment) troubles... - -;! At least the PA7100 is rumored to be able to deal with cache-misses -;! without stalling instruction issue. If this is true, and the cache is -;! actually also lockup-free, we should use a deeper software pipeline, and -;! load from S1 very early; (The loads and stores to -12(sp) will surely be -;! in the cache.) - - .text - .export __mpn_mul_1 -__mpn_mul_1: - .proc - .callinfo frame=64,no_calls - .entry - - ldo 64(%r30),%r30 - fldws,ma 4(%r25),%fr5 - stw %r23,-16(%r30) ;! move s2_limb ... - addib,= -1,%r24,L$just_one_limb - fldws -16(%r30),%fr4 ;! ... into fr4 - add %r0,%r0,%r0 ;! clear carry - xmpyu %fr4,%fr5,%fr6 - fldws,ma 4(%r25),%fr7 - fstds %fr6,-16(%r30) - xmpyu %fr4,%fr7,%fr8 - ldw -12(%r30),%r20 ;! least significant limb in product - ldw -16(%r30),%r28 - - fstds %fr8,-16(%r30) - addib,= -1,%r24,L$end - ldw -12(%r30),%r1 - -;! Main loop -L$loop: - fldws,ma 4(%r25),%fr5 - stws,ma %r20,4(%r26) - addc %r28,%r1,%r20 - xmpyu %fr4,%fr5,%fr6 - ldw -16(%r30),%r28 - fstds %fr6,-16(%r30) - addib,<> -1,%r24,L$loop - ldw -12(%r30),%r1 - -L$end: - stws,ma %r20,4(%r26) - addc %r28,%r1,%r20 - ldw -16(%r30),%r28 - stws,ma %r20,4(%r26) - addc %r0,%r28,%r28 - bv 0(%r2) - ldo -64(%r30),%r30 - -L$just_one_limb: - xmpyu %fr4,%fr5,%fr6 - fstds %fr6,-16(%r30) - ldw -16(%r30),%r28 - ldo -64(%r30),%r30 - bv 0(%r2) - fstws %fr6R,0(%r26) - - .exit - .procend diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s deleted file mode 100644 index 997bd6d..0000000 --- a/sysdeps/hppa/hppa1.1/submul_1.s +++ /dev/null @@ -1,113 +0,0 @@ -;! HP-PA-1.1 __mpn_submul_1 -- Multiply a limb vector with a limb and -;! subtract the result from a second limb vector. - -;! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. - -;! This file is part of the GNU MP Library. - -;! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. - - -;! INPUT PARAMETERS -;! res_ptr r26 -;! s1_ptr r25 -;! size r24 -;! s2_limb r23 - -;! This runs at 12 cycles/limb on a PA7000. With the used instructions, it -;! can not become faster due to data cache contention after a store. On the -;! PA7100 it runs at 11 cycles/limb, and that can not be improved either, -;! since only the xmpyu does not need the integer pipeline, so the only -;! dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb -;! on the PA7100. - -;! There are some ideas described in mul_1.s that applies to this code too. - -;! It seems possible to make this run as fast as __mpn_addmul_1, if we use -;! sub,>>= %r29,%r20,%r22 -;! addi 1,%r28,%r28 -;! but that requires reworking the hairy software pipeline... - - .text - .export __mpn_submul_1 -__mpn_submul_1: - .proc - .callinfo frame=64,no_calls - .entry - - ldo 64(%r30),%r30 - fldws,ma 4(%r25),%fr5 - stw %r23,-16(%r30) ;! move s2_limb ... - addib,= -1,%r24,L$just_one_limb - fldws -16(%r30),%fr4 ;! ... into fr4 - add %r0,%r0,%r0 ;! clear carry - xmpyu %fr4,%fr5,%fr6 - fldws,ma 4(%r25),%fr7 - fstds %fr6,-16(%r30) - xmpyu %fr4,%fr7,%fr8 - ldw -12(%r30),%r20 ;! least significant limb in product - ldw -16(%r30),%r28 - - fstds %fr8,-16(%r30) - addib,= -1,%r24,L$end - ldw -12(%r30),%r1 - -;! Main loop -L$loop: - ldws 0(%r26),%r29 - fldws,ma 4(%r25),%fr5 - sub %r29,%r20,%r22 - add %r22,%r20,%r0 - stws,ma %r22,4(%r26) - addc %r28,%r1,%r20 - xmpyu %fr4,%fr5,%fr6 - ldw -16(%r30),%r28 - fstds %fr6,-16(%r30) - addc %r0,%r28,%r28 - addib,<> -1,%r24,L$loop - ldw -12(%r30),%r1 - -L$end: - ldw 0(%r26),%r29 - sub %r29,%r20,%r22 - add %r22,%r20,%r0 - stws,ma %r22,4(%r26) - addc %r28,%r1,%r20 - ldw -16(%r30),%r28 - ldws 0(%r26),%r29 - addc %r0,%r28,%r28 - sub %r29,%r20,%r22 - add %r22,%r20,%r0 - stws,ma %r22,4(%r26) - addc %r0,%r28,%r28 - bv 0(%r2) - ldo -64(%r30),%r30 - -L$just_one_limb: - xmpyu %fr4,%fr5,%fr6 - ldw 0(%r26),%r29 - fstds %fr6,-16(%r30) - ldw -12(%r30),%r1 - ldw -16(%r30),%r28 - sub %r29,%r1,%r22 - add %r22,%r1,%r0 - stw %r22,0(%r26) - addc %r0,%r28,%r28 - bv 0(%r2) - ldo -64(%r30),%r30 - - .exit - .procend diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s deleted file mode 100644 index 7b83619..0000000 --- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s +++ /dev/null @@ -1,78 +0,0 @@ -;! HP-PA __udiv_qrnnd division support, used from longlong.h. -;! This version runs fast on PA 7000 and later. - -;! Copyright (C) 1993, 1994 Free Software Foundation, Inc. - -;! This file is part of the GNU MP Library. - -;! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. - - -;! INPUT PARAMETERS -;! rem_ptr gr26 -;! n1 gr25 -;! n0 gr24 -;! d gr23 - - .text -L$0000: - .word 0x43f00000 - .word 0x0 - .export __udiv_qrnnd -__udiv_qrnnd: - .proc - .callinfo frame=64,no_calls - .entry - ldo 64(%r30),%r30 - - stws %r25,-16(%r30) ;! n_hi - stws %r24,-12(%r30) ;! n_lo - b,l L$0,%r1 - ldo L$0000-L$0(%r1),%r1 -L$0: - fldds -16(%r30),%fr5 - stws %r23,-12(%r30) - comib,<= 0,%r25,L$1 - fcnvxf,dbl,dbl %fr5,%fr5 - fldds 0(%r1),%fr4 - fadd,dbl %fr4,%fr5,%fr5 -L$1: - fcpy,sgl %fr0,%fr6L - fldws -12(%r30),%fr6R - fcnvxf,dbl,dbl %fr6,%fr4 - - fdiv,dbl %fr5,%fr4,%fr5 - - fcnvfx,dbl,dbl %fr5,%fr4 - fstws %fr4R,-16(%r30) - xmpyu %fr4R,%fr6R,%fr6 - ldws -16(%r30),%r28 - fstds %fr6,-16(%r30) - ldws -12(%r30),%r21 - ldws -16(%r30),%r20 - sub %r24,%r21,%r22 - subb %r25,%r20,%r1 - comib,= 0,%r1,L$2 - ldo -64(%r30),%r30 - - add %r22,%r23,%r22 - ldo -1(%r28),%r28 -L$2: - bv 0(%r2) - stws %r22,0(%r26) - - .exit - .procend diff --git a/sysdeps/hppa/jmpbuf-offsets.h b/sysdeps/hppa/jmpbuf-offsets.h deleted file mode 100644 index d95ed8a..0000000 --- a/sysdeps/hppa/jmpbuf-offsets.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Private macros for accessing __jmp_buf contents. HPPA version. - Copyright (C) 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define JB_SP (76/4) diff --git a/sysdeps/hppa/jmpbuf-unwind.h b/sysdeps/hppa/jmpbuf-unwind.h deleted file mode 100644 index 6ea1876..0000000 --- a/sysdeps/hppa/jmpbuf-unwind.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Examine __jmp_buf for unwinding frames. HPPA version. - Copyright (C) 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <setjmp.h> -#include <jmpbuf-offsets.h> - -/* Test if longjmp to JMPBUF would unwind the frame containing a local - variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \ - ((void *) (_address) > \ - (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP]))) diff --git a/sysdeps/hppa/libgcc-compat.c b/sysdeps/hppa/libgcc-compat.c deleted file mode 100644 index 2957eba..0000000 --- a/sysdeps/hppa/libgcc-compat.c +++ /dev/null @@ -1,43 +0,0 @@ -/* pre-.hidden libgcc compatibility - Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Randolph Chung - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - - -#include <stdint.h> -#include <shlib-compat.h> - -#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6) - -symbol_version (__clz_tab_internal, __clz_tab, GLIBC_2.2); - -typedef unsigned int UQItype __attribute__ ((mode (QI))); - -const UQItype __clz_tab_internal[] = -{ - 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -}; - -#endif diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s deleted file mode 100644 index 151b283..0000000 --- a/sysdeps/hppa/lshift.s +++ /dev/null @@ -1,66 +0,0 @@ -;! HP-PA __mpn_lshift -- - -;! Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -;! This file is part of the GNU MP Library. - -;! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. - - -;! INPUT PARAMETERS -;! res_ptr gr26 -;! s_ptr gr25 -;! size gr24 -;! cnt gr23 - - .text - .export __mpn_lshift -__mpn_lshift: - .proc - .callinfo frame=64,no_calls - .entry - - sh2add %r24,%r25,%r25 - sh2add %r24,%r26,%r26 - ldws,mb -4(%r25),%r22 - subi 32,%r23,%r1 - mtsar %r1 - addib,= -1,%r24,L$0004 - vshd %r0,%r22,%r28 ;! compute carry out limb - ldws,mb -4(%r25),%r29 - addib,= -1,%r24,L$0002 - vshd %r22,%r29,%r20 - -L$loop: ldws,mb -4(%r25),%r22 - stws,mb %r20,-4(%r26) - addib,= -1,%r24,L$0003 - vshd %r29,%r22,%r20 - ldws,mb -4(%r25),%r29 - stws,mb %r20,-4(%r26) - addib,<> -1,%r24,L$loop - vshd %r22,%r29,%r20 - -L$0002: stws,mb %r20,-4(%r26) - vshd %r29,%r0,%r20 - bv 0(%r2) - stw %r20,-4(%r26) -L$0003: stws,mb %r20,-4(%r26) -L$0004: vshd %r22,%r0,%r20 - bv 0(%r2) - stw %r20,-4(%r26) - - .exit - .procend diff --git a/sysdeps/hppa/machine-gmon.h b/sysdeps/hppa/machine-gmon.h deleted file mode 100644 index 3eeef67..0000000 --- a/sysdeps/hppa/machine-gmon.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Machine-specific calling sequence for `mcount' profiling function. PA-RISC - Copyright (C) 1995, 1996, 1997, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* We can call _mcount directly since gcc supplies the correct - * arguments */ -#define _MCOUNT_DECL(from, self) \ - void _mcount (u_long from, u_long self) - -#define MCOUNT diff --git a/sysdeps/hppa/memusage.h b/sysdeps/hppa/memusage.h deleted file mode 100644 index d3dd10e..0000000 --- a/sysdeps/hppa/memusage.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define GETSP() ({ register uintptr_t stack_ptr asm ("%r30"); stack_ptr; }) -#define STACK_GROWS_UPWARD 1 - -#include <sysdeps/generic/memusage.h> diff --git a/sysdeps/hppa/mp_clz_tab.c b/sysdeps/hppa/mp_clz_tab.c deleted file mode 100644 index 52d0638..0000000 --- a/sysdeps/hppa/mp_clz_tab.c +++ /dev/null @@ -1 +0,0 @@ -/* __clz_tab not needed on hppa. */ diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s deleted file mode 100644 index dff189d..0000000 --- a/sysdeps/hppa/rshift.s +++ /dev/null @@ -1,63 +0,0 @@ -;! HP-PA __mpn_rshift -- - -;! Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -;! This file is part of the GNU MP Library. - -;! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. - - -;! INPUT PARAMETERS -;! res_ptr gr26 -;! s_ptr gr25 -;! size gr24 -;! cnt gr23 - - .text - .export __mpn_rshift -__mpn_rshift: - .proc - .callinfo frame=64,no_calls - .entry - - ldws,ma 4(%r25),%r22 - mtsar %r23 - addib,= -1,%r24,L$0004 - vshd %r22,%r0,%r28 ;! compute carry out limb - ldws,ma 4(%r25),%r29 - addib,= -1,%r24,L$0002 - vshd %r29,%r22,%r20 - -L$loop: ldws,ma 4(%r25),%r22 - stws,ma %r20,4(%r26) - addib,= -1,%r24,L$0003 - vshd %r22,%r29,%r20 - ldws,ma 4(%r25),%r29 - stws,ma %r20,4(%r26) - addib,<> -1,%r24,L$loop - vshd %r29,%r22,%r20 - -L$0002: stws,ma %r20,4(%r26) - vshd %r0,%r29,%r20 - bv 0(%r2) - stw %r20,0(%r26) -L$0003: stws,ma %r20,4(%r26) -L$0004: vshd %r0,%r22,%r20 - bv 0(%r2) - stw %r20,0(%r26) - - .exit - .procend diff --git a/sysdeps/hppa/setjmp.S b/sysdeps/hppa/setjmp.S deleted file mode 100644 index 0da34db..0000000 --- a/sysdeps/hppa/setjmp.S +++ /dev/null @@ -1,69 +0,0 @@ -/* setjmp for HPPA. - Copyright (C) 1995, 1996, 1997, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#define _ASM -#define _SETJMP_H -#include <bits/setjmp.h> - - - .text - .align 4 - .import __sigjmp_save, code - .globl __sigsetjmp - .export __sigsetjmp, code - .proc - .callinfo -__sigsetjmp: - stw %r3, 0(%r26) - stw %r4, 8(%r26) - stw %r5, 12(%r26) - stw %r6, 16(%r26) - stw %r7, 20(%r26) - stw %r8, 24(%r26) - stw %r9, 28(%r26) - stw %r10, 32(%r26) - stw %r11, 36(%r26) - stw %r12, 40(%r26) - stw %r13, 44(%r26) - stw %r14, 48(%r26) - stw %r15, 52(%r26) - stw %r16, 56(%r26) - stw %r17, 60(%r26) - stw %r18, 64(%r26) - stw %r19, 68(%r26) - stw %r27, 72(%r26) - stw %r30, 76(%r26) - - stw %rp, 80(%r26) - - ldo 88(%r26),%r1 - fstds,ma %fr12, 8(%r1) /* 88 */ - fstds,ma %fr13, 8(%r1) /* 96 */ - fstds,ma %fr14, 8(%r1) /* 104 */ - fstds,ma %fr15, 8(%r1) /* 112 */ - fstds,ma %fr16, 8(%r1) /* 120 */ - fstds,ma %fr17, 8(%r1) /* 128 */ - fstds,ma %fr18, 8(%r1) /* 136 */ - fstds,ma %fr19, 8(%r1) /* 144 */ - fstds,ma %fr20, 8(%r1) /* 152 */ - fstds %fr21, 0(%r1) /* 160 */ - b __sigjmp_save - nop - .procend diff --git a/sysdeps/hppa/stackinfo.h b/sysdeps/hppa/stackinfo.h deleted file mode 100644 index 318de71..0000000 --- a/sysdeps/hppa/stackinfo.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This file contains a bit of information about the stack allocation - of the processor. */ - -#ifndef _STACKINFO_H -#define _STACKINFO_H 1 - -/* On PA the stack grows up. */ -#define _STACK_GROWS_UP 1 - -#endif /* stackinfo.h */ diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s deleted file mode 100644 index 7764961..0000000 --- a/sysdeps/hppa/sub_n.s +++ /dev/null @@ -1,59 +0,0 @@ -;! HP-PA __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and -;! store difference in a third limb vector. - -;! Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -;! This file is part of the GNU MP Library. - -;! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. - - -;! INPUT PARAMETERS -;! res_ptr gr26 -;! s1_ptr gr25 -;! s2_ptr gr24 -;! size gr23 - -;! One might want to unroll this as for other processors, but it turns -;! out that the data cache contention after a store makes such -;! unrolling useless. We can't come under 5 cycles/limb anyway. - - .text - .export __mpn_sub_n -__mpn_sub_n: - .proc - .callinfo frame=0,no_calls - .entry - - ldws,ma 4(%r25),%r21 - ldws,ma 4(%r24),%r20 - - addib,= -1,%r23,L$end ;! check for (SIZE == 1) - sub %r21,%r20,%r28 ;! subtract first limbs ignoring cy - -L$loop: ldws,ma 4(%r25),%r21 - ldws,ma 4(%r24),%r20 - stws,ma %r28,4(%r26) - addib,<> -1,%r23,L$loop - subb %r21,%r20,%r28 - -L$end: stws %r28,0(%r26) - addc %r0,%r0,%r28 - bv 0(%r2) - subi 1,%r28,%r28 - - .exit - .procend diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h deleted file mode 100644 index be36567..0000000 --- a/sysdeps/hppa/sysdep.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Assembler macros for HP/PA. - Copyright (C) 1999, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdeps/generic/sysdep.h> -#include <sys/syscall.h> -#include "config.h" - -#ifndef ASM_LINE_SEP -#define ASM_LINE_SEP ; -#endif - -#ifdef __ASSEMBLER__ - -/* Syntactic details of assembler. */ - -#define ALIGNARG(log2) log2 - - -/* Define an entry point visible from C. - - There is currently a bug in gdb which prevents us from specifying - incomplete stabs information. Fake some entries here which specify - the current source file. */ -#define ENTRY(name) \ - .SPACE $TEXT$ ASM_LINE_SEP \ - .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY ASM_LINE_SEP \ - .align ALIGNARG(4) ASM_LINE_SEP \ - .NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY ASM_LINE_SEP \ - .EXPORT C_SYMBOL_NAME(name),ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR ASM_LINE_SEP\ - C_LABEL(name) \ - CALL_MCOUNT - -#undef END -#define END(name) \ - .PROCEND - - -/* If compiled for profiling, call `mcount' at the start of each function. */ -#ifdef PROF -/* The mcount code relies on a normal frame pointer being on the stack - to locate our caller, so push one just for its benefit. */ -#define CALL_MCOUNT \ - XXX ASM_LINE_SEP -#else -#define CALL_MCOUNT /* Do nothing. */ -#endif - -#define PSEUDO(name, syscall_name, args) \ - ENTRY (name) \ - DO_CALL (syscall_name, args) - -#undef PSEUDO_END -#define PSEUDO_END(name) \ - END (name) - -#undef JUMPTARGET -#define JUMPTARGET(name) name -#define SYSCALL_PIC_SETUP /* Nothing. */ - -/* Local label name for asm code. */ -#ifndef L -#define L(name) name -#endif - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s deleted file mode 100644 index 8e9c07a..0000000 --- a/sysdeps/hppa/udiv_qrnnd.s +++ /dev/null @@ -1,286 +0,0 @@ -;! HP-PA __udiv_qrnnd division support, used from longlong.h. -;! This version runs fast on pre-PA7000 CPUs. - -;! Copyright (C) 1993, 1994 Free Software Foundation, Inc. - -;! This file is part of the GNU MP Library. - -;! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. - - -;! INPUT PARAMETERS -;! rem_ptr gr26 -;! n1 gr25 -;! n0 gr24 -;! d gr23 - -;! The code size is a bit excessive. We could merge the last two ds;addc -;! sequences by simply moving the "bb,< Odd" instruction down. The only -;! trouble is the FFFFFFFF code that would need some hacking. - - .text - .export __udiv_qrnnd -__udiv_qrnnd: - .proc - .callinfo frame=0,no_calls - .entry - - comb,< %r23,%r0,L$largedivisor - sub %r0,%r23,%r1 ;! clear cy as side-effect - ds %r0,%r1,%r0 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r24 - ds %r25,%r23,%r25 - addc %r24,%r24,%r28 - ds %r25,%r23,%r25 - comclr,>= %r25,%r0,%r0 - addl %r25,%r23,%r25 - stws %r25,0(%r26) - bv 0(%r2) - addc %r28,%r28,%r28 - -L$largedivisor: - extru %r24,31,1,%r20 ;! r20 = n0 & 1 - bb,< %r23,31,L$odd - extru %r23,30,31,%r22 ;! r22 = d >> 1 - shd %r25,%r24,1,%r24 ;! r24 = new n0 - extru %r25,30,31,%r25 ;! r25 = new n1 - sub %r0,%r22,%r21 - ds %r0,%r21,%r0 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - comclr,>= %r25,%r0,%r0 - addl %r25,%r22,%r25 - sh1addl %r25,%r20,%r25 - stws %r25,0(%r26) - bv 0(%r2) - addc %r24,%r24,%r28 - -L$odd: addib,sv,n 1,%r22,L$FF.. ;! r22 = (d / 2 + 1) - shd %r25,%r24,1,%r24 ;! r24 = new n0 - extru %r25,30,31,%r25 ;! r25 = new n1 - sub %r0,%r22,%r21 - ds %r0,%r21,%r0 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r24 - ds %r25,%r22,%r25 - addc %r24,%r24,%r28 - comclr,>= %r25,%r0,%r0 - addl %r25,%r22,%r25 - sh1addl %r25,%r20,%r25 -;! We have computed (n1,,n0) / (d + 1), q' = r28, r' = r25 - add,nuv %r28,%r25,%r25 - addl %r25,%r1,%r25 - addc %r0,%r28,%r28 - sub,<< %r25,%r23,%r0 - addl %r25,%r1,%r25 - stws %r25,0(%r26) - bv 0(%r2) - addc %r0,%r28,%r28 - -;! This is just a special case of the code above. -;! We come here when d == 0xFFFFFFFF -L$FF..: add,uv %r25,%r24,%r24 - sub,<< %r24,%r23,%r0 - ldo 1(%r24),%r24 - stws %r24,0(%r26) - bv 0(%r2) - addc %r0,%r25,%r28 - - .exit - .procend diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies deleted file mode 100644 index 5c778d4..0000000 --- a/sysdeps/m68k/Implies +++ /dev/null @@ -1,5 +0,0 @@ -wordsize-32 -# 68k uses IEEE 754 floating point. -ieee754/ldbl-96 -ieee754/dbl-64 -ieee754/flt-32 diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile deleted file mode 100644 index fab6bd5..0000000 --- a/sysdeps/m68k/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 1993, 1994, 1996, 1997, 2003 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, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. - -# The mpn functions need this. All existing 68k ports use MIT syntax. If -# a new port wants to use Motorola or Sony syntax, it can redefine this -# variable. -ifndef m68k-syntax-flag -m68k-syntax-flag = -DMIT_SYNTAX -endif - -asm-CPPFLAGS += $(m68k-syntax-flag) - -pic-ccflag = -fpic - -# Make sure setjmp.c is compiled with a frame pointer -CFLAGS-setjmp.c := -fno-omit-frame-pointer - -# The 68k `long double' is a distinct type we support. -long-double-fcts = yes - -ifeq ($(subdir),elf) -CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused -endif diff --git a/sysdeps/m68k/Versions b/sysdeps/m68k/Versions deleted file mode 100644 index f450291..0000000 --- a/sysdeps/m68k/Versions +++ /dev/null @@ -1,13 +0,0 @@ -libc { - GLIBC_2.0 { - # Functions from libgcc. - __divdi3; __moddi3; __udivdi3; __umoddi3; - } -} -libm { - GLIBC_2.1 { - # A generic bug got this omitted from other configurations' version - # sets, but we always had it. - exp2l; - } -} diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c deleted file mode 100644 index 89ff5ba..0000000 --- a/sysdeps/m68k/__longjmp.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 97 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <setjmp.h> -#include <stdlib.h> - -/* Jump to the position specified by ENV, causing the - setjmp call there to return VAL, or 1 if VAL is 0. */ -void -__longjmp (__jmp_buf env, int val) -{ - /* This restores the FP and SP that setjmp's caller had, - and puts the return address into A0 and VAL into D0. */ - -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__) - /* Restore the floating-point registers. */ - asm volatile("fmovem%.x %0, %/fp0-%/fp7" : - /* No outputs. */ : "g" (env[0].__fpregs[0])); -#endif - - /* Put VAL in D0. */ - asm volatile("move%.l %0, %/d0" : /* No outputs. */ : - "g" (val == 0 ? 1 : val) : "d0"); - - asm volatile(/* Restore the data and address registers. */ - "movem%.l %0, %/d1-%/d7/%/a0-%/a7\n" - /* Return to setjmp's caller. */ -#ifdef __motorola__ - "jmp (%/a0)" -#else - "jmp %/a0@" -#endif - : /* No outputs. */ : "g" (env[0].__dregs[0]) - /* We don't bother with the clobbers, - because this code always jumps out anyway. */ - ); - - /* Avoid `volatile function does return' warnings. */ - for (;;); -} diff --git a/sysdeps/m68k/abort-instr.h b/sysdeps/m68k/abort-instr.h deleted file mode 100644 index b43c9ef..0000000 --- a/sysdeps/m68k/abort-instr.h +++ /dev/null @@ -1,2 +0,0 @@ -/* An instruction which should crash any program is `illegal'. */ -#define ABORT_INSTRUCTION asm ("illegal") diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S deleted file mode 100644 index a955849..0000000 --- a/sysdeps/m68k/add_n.S +++ /dev/null @@ -1,76 +0,0 @@ -/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store - sum in a third limb vector. - -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -/* - INPUT PARAMETERS - res_ptr (sp + 4) - s1_ptr (sp + 8) - s2_ptr (sp + 16) - size (sp + 12) -*/ - -#include "sysdep.h" -#include "asm-syntax.h" - - TEXT -ENTRY(__mpn_add_n) -/* Save used registers on the stack. */ - movel R(d2),MEM_PREDEC(sp) - movel R(a2),MEM_PREDEC(sp) - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,12),R(a2) - movel MEM_DISP(sp,16),R(a0) - movel MEM_DISP(sp,20),R(a1) - movel MEM_DISP(sp,24),R(d2) - - eorw #1,R(d2) - lsrl #1,R(d2) - bcc L(L1) - subql #1,R(d2) /* clears cy as side effect */ - -L(Loop:) - movel MEM_POSTINC(a0),R(d0) - movel MEM_POSTINC(a1),R(d1) - addxl R(d1),R(d0) - movel R(d0),MEM_POSTINC(a2) -L(L1:) movel MEM_POSTINC(a0),R(d0) - movel MEM_POSTINC(a1),R(d1) - addxl R(d1),R(d0) - movel R(d0),MEM_POSTINC(a2) - - dbf R(d2),L(Loop) /* loop until 16 lsb of %4 == -1 */ - subxl R(d0),R(d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ - subl #0x10000,R(d2) - bcs L(L2) - addl R(d0),R(d0) /* restore cy */ - bra L(Loop) - -L(L2:) - negl R(d0) - -/* Restore used registers from stack frame. */ - movel MEM_POSTINC(sp),R(a2) - movel MEM_POSTINC(sp),R(d2) - - rts -END(__mpn_add_n) diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h deleted file mode 100644 index 8e2a4ca..0000000 --- a/sysdeps/m68k/asm-syntax.h +++ /dev/null @@ -1,109 +0,0 @@ -/* Definitions for 68k syntax variations. - Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. Its master source is NOT part of - the C library, however. The master source lives in the GNU MP 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifdef HAVE_ELF - -/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ -#define ALIGNARG(log2) 1<<log2 -/* For ELF we need the `.type' directive to make shared libs work right. */ -#define PROLOG(name) .type name,@function -#define EPILOG(name) .size name,.-name -/* For ELF we need to prefix register names and local labels. */ -#ifdef __STDC__ -#define R_(r) %##r -#define R(r) R_(r) -#define L(label) .##label -#else -#define R(r) %/**/r -#define L(label) ./**/label -#endif - -#else - -#define ALIGNARG(log2) log2 -#define PROLOG(name) /* Nothing. */ -#define EPILOG(name) /* Nothing. */ -#define R(r) r -#define L(label) label - -#endif - -#ifdef MIT_SYNTAX -#define MEM(base)R(base)@ -#define MEM_DISP(base,displacement)R(base)@(displacement) -#define MEM_INDX(base,idx,size_suffix)R(base)@(R(idx):size_suffix) -#define MEM_INDX1(base,idx,size_suffix,scale)R(base)@(R(idx):size_suffix:scale) -#define MEM_PREDEC(memory_base)R(memory_base)@- -#define MEM_POSTINC(memory_base)R(memory_base)@+ -#define TEXT .text -#define ALIGN .even -#define GLOBL .globl -/* Use variable sized opcodes. */ -#define bcc jcc -#define bcs jcs -#define bls jls -#define beq jeq -#define bne jne -#define bra jra -#endif - -#ifdef MOTOROLA_SYNTAX -#define MEM(base)(R(base)) -#define MEM_DISP(base,displacement)(displacement,R(base)) -#define MEM_PREDEC(memory_base)-(R(memory_base)) -#define MEM_POSTINC(memory_base)(R(memory_base))+ -#ifdef __STDC__ -#define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix)) -#define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix) -#define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale)) -#define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale) -#else -#define MEM_INDX(base,idx,size_suffix)(R(base),R(idx).size_suffix) -#define MEM_INDX1(base,idx,size_suffix,scale)(R(base),R(idx).size_suffix*scale) -#endif -#define TEXT .text -#define ALIGN .align ALIGNARG(2) -#define GLOBL .globl -#define bcc jbcc -#define bcs jbcs -#define bls jbls -#define beq jbeq -#define bne jbne -#define bra jbra -#define movel move.l -#define moveml movem.l -#define moveql moveq.l -#define cmpl cmp.l -#define orl or.l -#define clrl clr.l -#define eorw eor.w -#define lsrl lsr.l -#define lsll lsl.l -#define roxrl roxr.l -#define roxll roxl.l -#define addl add.l -#define addxl addx.l -#define addql addq.l -#define subl sub.l -#define subxl subx.l -#define subql subq.l -#define negl neg.l -#define mulul mulu.l -#endif diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h deleted file mode 100644 index 549d445..0000000 --- a/sysdeps/m68k/bits/byteswap.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Macros to swap the order of bytes in integer values. m68k version. - Copyright (C) 1997, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." -#endif - -#ifndef _BITS_BYTESWAP_H -#define _BITS_BYTESWAP_H 1 - -/* Swap bytes in 16 bit value. We don't provide an assembler version - because GCC is smart enough to generate optimal assembler output, and - this allows for better cse. */ -#define __bswap_16(x) \ - ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) - -/* Swap bytes in 32 bit value. */ -#define __bswap_constant_32(x) \ - ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) - -#if defined __GNUC__ && __GNUC__ >= 2 -# define __bswap_32(x) \ - __extension__ \ - ({ unsigned int __bswap_32_v; \ - if (__builtin_constant_p (x)) \ - __bswap_32_v = __bswap_constant_32 (x); \ - else \ - __asm__ __volatile__ ("ror%.w %#8, %0;" \ - "swap %0;" \ - "ror%.w %#8, %0" \ - : "=d" (__bswap_32_v) \ - : "0" ((unsigned int) (x))); \ - __bswap_32_v; }) -#else -# define __bswap_32(x) __bswap_constant_32 (x) -#endif - -#if defined __GNUC__ && __GNUC__ >= 2 -/* Swap bytes in 64 bit value. */ -# define __bswap_64(x) \ - __extension__ \ - ({ union { unsigned long long int __ll; \ - unsigned long int __l[2]; } __bswap_64_v, __bswap_64_r; \ - __bswap_64_v.__ll = (x); \ - __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \ - __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \ - __bswap_64_r.__ll; }) -#endif - -#endif /* _BITS_BYTESWAP_H */ diff --git a/sysdeps/m68k/bits/endian.h b/sysdeps/m68k/bits/endian.h deleted file mode 100644 index bf4ecb6..0000000 --- a/sysdeps/m68k/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* m68k is big-endian. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/sysdeps/m68k/bits/huge_vall.h b/sysdeps/m68k/bits/huge_vall.h deleted file mode 100644 index 8b9630c..0000000 --- a/sysdeps/m68k/bits/huge_vall.h +++ /dev/null @@ -1,43 +0,0 @@ -/* `HUGE_VALL' constant for m68k (where it is infinity). - Used by <stdlib.h> and <math.h> functions for overflow. - Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004 - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _MATH_H -# error "Never use <bits/huge_val.h> directly; include <math.h> instead." -#endif - -#if __GNUC_PREREQ(3,3) -# define HUGE_VALL (__builtin_huge_vall ()) -#elif __GNUC_PREREQ(2,96) -# define HUGE_VALL (__extension__ 0x1.0p32767L) -#elif defined__GNUC__ - -# define HUGE_VALL \ - (__extension__ \ - ((union { unsigned long __l[3]; long double __ld; }) \ - { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld) - -#else /* not GCC */ - -static union { unsigned char __c[12]; long double __ld; } __huge_vall = - { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } }; -# define HUGE_VALL (__huge_vall.__ld) - -#endif /* GCC 2.95. */ diff --git a/sysdeps/m68k/bits/link.h b/sysdeps/m68k/bits/link.h deleted file mode 100644 index 9d0a945..0000000 --- a/sysdeps/m68k/bits/link.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _LINK_H -# error "Never include <bits/link.h> directly; use <link.h> instead." -#endif - - -/* Registers for entry into PLT on M68K. */ -typedef struct La_m68k_regs -{ - uint32_t lr_a0; - uint32_t lr_a1; - uint32_t lr_sp; -} La_m68k_regs; - -/* Return values for calls from PLT on M68K. */ -typedef struct La_m68k_retval -{ - uint32_t lrv_d0; - uint32_t lrv_d1; - uint32_t lrv_a0; - long double lrv_fp0; -} La_m68k_retval; - - -__BEGIN_DECLS - -extern Elf32_Addr la_m68k_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, - uintptr_t *__refcook, - uintptr_t *__defcook, - La_m68k_regs *__regs, - unsigned int *__flags, - const char *__symname, - long int *__framesizep); -extern unsigned int la_m68k_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, - uintptr_t *__refcook, - uintptr_t *__defcook, - const La_m68k_regs *__inregs, - La_m68k_retval *__outregs, - const char *symname); - -__END_DECLS diff --git a/sysdeps/m68k/bits/mathdef.h b/sysdeps/m68k/bits/mathdef.h deleted file mode 100644 index 65cf8d4..0000000 --- a/sysdeps/m68k/bits/mathdef.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#if !defined _MATH_H && !defined _COMPLEX_H -# error "Never use <bits/mathdef.h> directly; include <math.h> instead" -#endif - -#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF -# define _MATH_H_MATHDEF 1 - -/* The m68k FPUs evaluate all values in the 96 bit floating-point format - which is also available for the user as `long double'. Therefore we - define: */ -typedef long double float_t; /* `float' expressions are evaluated as - `long double'. */ -typedef long double double_t; /* `double' expressions are evaluated as - `long double'. */ - -/* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 (-2147483647 - 1) -# define FP_ILOGBNAN (2147483647) - -#endif /* ISO C99 */ diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h deleted file mode 100644 index 2d5a082..0000000 --- a/sysdeps/m68k/bits/setjmp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1997,1998,2005,2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Define the machine-dependent type `jmp_buf'. m68k version. */ -#ifndef _BITS_SETJMP_H -#define _BITS_SETJMP_H 1 - -#if !defined _SETJMP_H && !defined _PTHREAD_H -# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." -#endif - -typedef struct - { - /* There are eight 4-byte data registers, but D0 is not saved. */ - long int __dregs[7]; - - /* There are six 4-byte address registers, plus the FP and SP. */ - int *__aregs[6]; - int *__fp; - int *__sp; - -#if defined __HAVE_68881__ || defined __HAVE_FPU__ - /* There are eight floating point registers which - are saved in IEEE 96-bit extended format. */ - char __fpregs[8 * (96 / 8)]; -#endif - - } __jmp_buf[1]; - -#endif /* bits/setjmp.h */ diff --git a/sysdeps/m68k/bsd-_setjmp.c b/sysdeps/m68k/bsd-_setjmp.c deleted file mode 100644 index a6b404a..0000000 --- a/sysdeps/m68k/bsd-_setjmp.c +++ /dev/null @@ -1,22 +0,0 @@ -/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version. - Copyright (C) 1994, 1997, 2001, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define BSD__SETJMP -#include <sysdeps/m68k/setjmp.c> -libc_hidden_def (_setjmp) diff --git a/sysdeps/m68k/bsd-setjmp.c b/sysdeps/m68k/bsd-setjmp.c deleted file mode 100644 index 59b5acf..0000000 --- a/sysdeps/m68k/bsd-setjmp.c +++ /dev/null @@ -1,21 +0,0 @@ -/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version. - Copyright (C) 1994, 1997, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define BSD_SETJMP -#include <sysdeps/m68k/setjmp.c> diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h deleted file mode 100644 index f31b687..0000000 --- a/sysdeps/m68k/dl-machine.h +++ /dev/null @@ -1,290 +0,0 @@ -/* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef dl_machine_h -#define dl_machine_h - -#define ELF_MACHINE_NAME "m68k" - -#include <sys/param.h> - -/* Return nonzero iff ELF header is compatible with the running host. */ -static inline int -elf_machine_matches_host (const Elf32_Ehdr *ehdr) -{ - return ehdr->e_machine == EM_68K; -} - - -/* Return the link-time address of _DYNAMIC. Conveniently, this is the - first element of the GOT. This must be inlined in a function which - uses global data. */ -static inline Elf32_Addr -elf_machine_dynamic (void) -{ - register Elf32_Addr *got asm ("%a5"); - return *got; -} - - -/* Return the run-time load address of the shared object. */ -static inline Elf32_Addr -elf_machine_load_address (void) -{ - Elf32_Addr addr; - asm ("lea _dl_start(%%pc), %0\n\t" - "sub.l _dl_start@GOT.w(%%a5), %0" - : "=a" (addr)); - return addr; -} - - -/* Set up the loaded object described by L so its unrelocated PLT - entries will jump to the on-demand fixup code in dl-runtime.c. */ - -static inline int __attribute__ ((always_inline)) -elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) -{ - Elf32_Addr *got; - extern void _dl_runtime_resolve (Elf32_Word); - extern void _dl_runtime_profile (Elf32_Word); - - if (l->l_info[DT_JMPREL] && lazy) - { - /* The GOT entries for functions in the PLT have not yet been - filled in. Their initial contents will arrange when called - to push an offset into the .rela.plt section, push - _GLOBAL_OFFSET_TABLE_[1], and then jump to - _GLOBAL_OFFSET_TABLE_[2]. */ - got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]); - got[1] = (Elf32_Addr) l; /* Identify this shared object. */ - - /* The got[2] entry contains the address of a function which gets - called to get the address of a so far unresolved function and - jump to it. The profiling extension of the dynamic linker allows - to intercept the calls to collect information. In this case we - don't store the address in the GOT so that all future calls also - end in this function. */ - if (profile) - { - got[2] = (Elf32_Addr) &_dl_runtime_profile; - - if (GLRO(dl_profile) != NULL - && _dl_name_match_p (GLRO(dl_profile), l)) - { - /* This is the object we are looking for. Say that we really - want profiling and the timers are started. */ - GL(dl_profile_map) = l; - } - } - else - /* This function will get called to fix up the GOT entry indicated by - the offset on the stack, and then jump to the resolved address. */ - got[2] = (Elf32_Addr) &_dl_runtime_resolve; - } - - return lazy; -} - -#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1 - - -/* Mask identifying addresses reserved for the user program, - where the dynamic linker should not map anything. */ -#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL - -/* Initial entry point code for the dynamic linker. - The C function `_dl_start' is the real entry point; - its return value is the user program's entry point. */ - -#define RTLD_START asm ("\ - .text\n\ - .globl _start\n\ - .type _start,@function\n\ -_start:\n\ - move.l %sp, -(%sp)\n\ - jbsr _dl_start\n\ - addq.l #4, %sp\n\ - /* FALLTHRU */\n\ -\n\ - .globl _dl_start_user\n\ - .type _dl_start_user,@function\n\ -_dl_start_user:\n\ - | Save the user entry point address in %a4.\n\ - move.l %d0, %a4\n\ - | See if we were run as a command with the executable file\n\ - | name as an extra leading argument.\n\ - move.l _dl_skip_args(%pc), %d0\n\ - | Pop the original argument count\n\ - move.l (%sp)+, %d1\n\ - | Subtract _dl_skip_args from it.\n\ - sub.l %d0, %d1\n\ - | Adjust the stack pointer to skip _dl_skip_args words.\n\ - lea (%sp, %d0*4), %sp\n\ - | Push back the modified argument count.\n\ - move.l %d1, -(%sp)\n\ - # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ - pea 8(%sp, %d1*4)\n\ - pea 8(%sp)\n\ - move.l %d1, -(%sp)\n\ - move.l _rtld_local(%pc), -(%sp)\n\ - jbsr _dl_init_internal@PLTPC\n\ - addq.l #8, %sp\n\ - addq.l #8, %sp\n\ - | Pass our finalizer function to the user in %a1.\n\ - lea _dl_fini(%pc), %a1\n\ - | Initialize %fp with the stack pointer.\n\ - move.l %sp, %fp\n\ - | Jump to the user's entry point.\n\ - jmp (%a4)\n\ - .size _dl_start_user, . - _dl_start_user\n\ - .previous"); - -/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. - ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one - of the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_type_class(type) \ - ((((type) == R_68K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ - | (((type) == R_68K_COPY) * ELF_RTYPE_CLASS_COPY)) - -/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ -#define ELF_MACHINE_JMP_SLOT R_68K_JMP_SLOT - -/* The m68k never uses Elf32_Rel relocations. */ -#define ELF_MACHINE_NO_REL 1 - -static inline Elf32_Addr -elf_machine_fixup_plt (struct link_map *map, lookup_t t, - const Elf32_Rela *reloc, - Elf32_Addr *reloc_addr, Elf32_Addr value) -{ - return *reloc_addr = value; -} - -/* Return the final value of a plt relocation. On the m68k the JMP_SLOT - relocation ignores the addend. */ -static inline Elf32_Addr -elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, - Elf32_Addr value) -{ - return value; -} - -/* Names of the architecture-specific auditing callback functions. */ -#define ARCH_LA_PLTENTER m68k_gnu_pltenter -#define ARCH_LA_PLTEXIT m68k_gnu_pltexit - -#endif /* !dl_machine_h */ - -#ifdef RESOLVE_MAP - -/* Perform the relocation specified by RELOC and SYM (which is fully resolved). - MAP is the object containing the reloc. */ - -auto inline void __attribute__ ((unused, always_inline)) -elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - const Elf32_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg) -{ - Elf32_Addr *const reloc_addr = reloc_addr_arg; - const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); - - if (__builtin_expect (r_type == R_68K_RELATIVE, 0)) - *reloc_addr = map->l_addr + reloc->r_addend; - else - { - const Elf32_Sym *const refsym = sym; - struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); - Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; - - switch (r_type) - { - case R_68K_COPY: - if (sym == NULL) - /* This can happen in trace mode if an object could not be - found. */ - break; - if (sym->st_size > refsym->st_size - || (sym->st_size < refsym->st_size && GLRO(dl_verbose))) - { - const char *strtab; - - strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); - _dl_error_printf ("\ -%s: Symbol `%s' has different size in shared object, consider re-linking\n", - rtld_progname ?: "<program name unknown>", - strtab + refsym->st_name); - } - memcpy (reloc_addr_arg, (void *) value, - MIN (sym->st_size, refsym->st_size)); - break; - case R_68K_GLOB_DAT: - case R_68K_JMP_SLOT: - *reloc_addr = value; - break; - case R_68K_8: - *(char *) reloc_addr = value + reloc->r_addend; - break; - case R_68K_16: - *(short *) reloc_addr = value + reloc->r_addend; - break; - case R_68K_32: - *reloc_addr = value + reloc->r_addend; - break; - case R_68K_PC8: - *(char *) reloc_addr - = value + reloc->r_addend - (Elf32_Addr) reloc_addr; - break; - case R_68K_PC16: - *(short *) reloc_addr - = value + reloc->r_addend - (Elf32_Addr) reloc_addr; - break; - case R_68K_PC32: - *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr; - break; - case R_68K_NONE: /* Alright, Wilbur. */ - break; - default: - _dl_reloc_bad_type (map, r_type, 0); - break; - } - } -} - -auto inline void __attribute__ ((unused, always_inline)) -elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, - void *const reloc_addr_arg) -{ - Elf32_Addr *const reloc_addr = reloc_addr_arg; - *reloc_addr = l_addr + reloc->r_addend; -} - -auto inline void __attribute__ ((unused, always_inline)) -elf_machine_lazy_rel (struct link_map *map, - Elf32_Addr l_addr, const Elf32_Rela *reloc) -{ - Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); - if (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT) - *reloc_addr += l_addr; - else - _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); -} - -#endif /* RESOLVE_MAP */ diff --git a/sysdeps/m68k/dl-trampoline.S b/sysdeps/m68k/dl-trampoline.S deleted file mode 100644 index 8791280..0000000 --- a/sysdeps/m68k/dl-trampoline.S +++ /dev/null @@ -1,129 +0,0 @@ -/* PLT trampolines. m68k version. - Copyright (C) 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - - .text - .globl _dl_runtime_resolve - .type _dl_runtime_resolve, @function -_dl_runtime_resolve: - | Save %a0 (struct return address) and %a1. - move.l %a0, -(%sp) - move.l %a1, -(%sp) - | Call the real address resolver. - jbsr _dl_fixup - | Restore register %a0 and %a1. - move.l (%sp)+, %a1 - move.l (%sp)+, %a0 - | Pop parameters - addq.l #8, %sp - | Call real function. - jmp (%d0) - .size _dl_runtime_resolve, . - _dl_runtime_resolve - - .text - .globl _dl_runtime_profile - .type _dl_runtime_profile, @function -_dl_runtime_profile: - pea 8(%sp) - move.l %a1, -(%sp) - move.l %a0, -(%sp) - pea -1.w - | Push parameters for _dl_profile_fixup - pea (%sp) - pea 8(%sp) - move.l 32(%sp), -(%sp) - move.l 32(%sp), -(%sp) - move.l 32(%sp), -(%sp) - subq.l #8, %sp - | Call the real address resolver. - jbsr _dl_profile_fixup - | Pop parameters - lea 28(%sp), %sp - move.l (%sp), %d1 - jpl 1f - addq.l #4, %sp - | Restore register %a0 and %a1. - move.l (%sp)+, %a0 - move.l (%sp)+, %a1 - lea 12(%sp), %sp - | Call real function. - jmp (%d0) - - /* - +24 return address - +20 PLT1 - +16 PLT2 - +12 %sp - +8 %a1 - +4 %a0 - %sp free - */ -1: move.l %a2, (%sp) - move.l %sp, %a2 - move.l %sp, %a0 - lea 28(%sp), %a1 - | Round framesize up to even - addq.l #1, %d1 - lsr #1, %d1 - sub.l %d1, %a0 - sub.l %d1, %a0 - move.l %a0, %sp - jra 2f -1: move.w (%a1)+, (%a0)+ -2: dbra %d1,1b - /* - %a2+24 return address - %a2+20 PLT1 - %a2+16 PLT2 - %a2+12 %sp - %a2+8 %a1 - %a2+4 %a0 - %a2 %a2 - %sp copied stack frame - */ - - move.l 4(%a2), %a0 - move.l 8(%a2), %a1 - jsr (%d0) - move.l %a2, %sp - move.l (%sp)+, %a2 - /* - +20 return address - +16 PLT1 - +12 PLT2 - +8 %sp - +4 %a1 - %sp %a0 - */ - fmove.x %fp0, -(%sp) - move.l %d1, -(%sp) - move.l %d0, -(%sp) - pea (%sp) - pea 20(%sp) - move.l 40(%sp), -(%sp) - move.l 40(%sp), -(%sp) - jbsr _dl_call_pltexit - lea 16(%sp), %sp - move.l (%sp)+, %d0 - move.l (%sp)+, %d1 - fmove.x (%sp)+, %fp0 - lea 20(%sp), %sp - rts - .size _dl_runtime_profile, . - _dl_runtime_profile diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S deleted file mode 100644 index 8c89b37..0000000 --- a/sysdeps/m68k/elf/start.S +++ /dev/null @@ -1,100 +0,0 @@ -/* Startup code compliant to the ELF m68k ABI. - Copyright (C) 1996, 1997, 1998, 2001, 2002 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This is the canonical entry point, usually the first thing in the text - segment. The SVR4/m68k ABI says that when the entry point runs, - most registers' values are unspecified, except for: - - %a1 Contains a function pointer to be registered with `atexit'. - This is how the dynamic linker arranges to have DT_FINI - functions called for shared libraries that have been loaded - before this code runs. - - %sp The stack contains the arguments and environment: - 0(%sp) argc - 4(%sp) argv[0] - ... - (4*argc)(%sp) NULL - (4*(argc+1))(%sp) envp[0] - ... - NULL -*/ - - .text - .globl _start - .type _start,@function -_start: - /* Clear the frame pointer. The ABI suggests this be done, to mark - the outermost frame obviously. */ - sub.l %fp, %fp - - /* Extract the arguments as encoded on the stack and set up the - arguments for `main': argc, argv. envp will be determined - later in __libc_start_main. */ - move.l (%sp)+, %d0 /* Pop the argument count. */ - move.l %sp, %a0 /* The argument vector starts just at the - current stack top. */ - - /* Provide the highest stack address to the user code (for stacks - which grow downward). */ - pea (%sp) - - pea (%a1) /* Push address of the shared library - termination function. */ - - /* Push the address of our own entry points to `.fini' and - `.init'. */ - pea __libc_csu_fini - pea __libc_csu_init - - pea (%a0) /* Push second argument: argv. */ - move.l %d0, -(%sp) /* Push first argument: argc. */ - - pea main - - /* Call the user's main function, and exit with its value. But - let the libc call main. */ - jbsr __libc_start_main - - illegal /* Crash if somehow `exit' does return. */ - -/* Define a symbol for the first piece of initialized data. */ - .data - .globl __data_start -__data_start: - .long 0 - .weak data_start - data_start = __data_start diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c deleted file mode 100644 index 2032e86..0000000 --- a/sysdeps/m68k/ffs.c +++ /dev/null @@ -1,48 +0,0 @@ -/* ffs -- find first set bit in a word, counted from least significant end. - For mc68020, mc68030, mc68040. - This file is part of the GNU C Library. - Copyright (C) 1991, 1992, 1997, 1998, 2004, 2005 Free Software Foundation, Inc. - Contributed by Torbjorn Granlund (tege@sics.se). - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define ffsl __something_else -#include <string.h> - -#undef ffs - -#if defined (__GNUC__) && defined (__mc68020__) - -int -__ffs (x) - int x; -{ - int cnt; - - asm ("bfffo %1{#0:#0},%0" : "=d" (cnt) : "dm" (x & -x)); - - return 32 - cnt; -} -weak_alias (__ffs, ffs) -libc_hidden_builtin_def (ffs) -#undef ffsl -weak_alias (__ffs, ffsl) - -#else - -#include <string/ffs.c> - -#endif diff --git a/sysdeps/m68k/fpu/Makefile b/sysdeps/m68k/fpu/Makefile deleted file mode 100644 index 42db638..0000000 --- a/sysdeps/m68k/fpu/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -ifeq ($(subdir),math) -ifndef math-twiddled - -# Avoid twiddling in generic/Makefile. -math-twiddled := t - -endif - -bsdmath_dirs := $(bsdmath_dirs) mc68881 - -endif diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h deleted file mode 100644 index 7c0bcb6..0000000 --- a/sysdeps/m68k/fpu/bits/fenv.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FENV_H -# error "Never use <bits/fenv.h> directly; include <fenv.h> instead." -#endif - - -/* Define bits representing the exception. We use the bit positions of - the appropriate bits in the FPSR Accrued Exception Byte. */ -enum - { - FE_INEXACT = 1 << 3, -#define FE_INEXACT FE_INEXACT - FE_DIVBYZERO = 1 << 4, -#define FE_DIVBYZERO FE_DIVBYZERO - FE_UNDERFLOW = 1 << 5, -#define FE_UNDERFLOW FE_UNDERFLOW - FE_OVERFLOW = 1 << 6, -#define FE_OVERFLOW FE_OVERFLOW - FE_INVALID = 1 << 7 -#define FE_INVALID FE_INVALID - }; - -#define FE_ALL_EXCEPT \ - (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) - -/* The m68k FPU supports all of the four defined rounding modes. We use - the bit positions in the FPCR Mode Control Byte as the values for the - appropriate macros. */ -enum - { - FE_TONEAREST = 0, -#define FE_TONEAREST FE_TONEAREST - FE_TOWARDZERO = 1 << 4, -#define FE_TOWARDZERO FE_TOWARDZERO - FE_DOWNWARD = 2 << 4, -#define FE_DOWNWARD FE_DOWNWARD - FE_UPWARD = 3 << 4 -#define FE_UPWARD FE_UPWARD - }; - - -/* Type representing exception flags. */ -typedef unsigned int fexcept_t; - - -/* Type representing floating-point environment. This structure - corresponds to the layout of the block written by `fmovem'. */ -typedef struct - { - unsigned int __control_register; - unsigned int __status_register; - unsigned int __instruction_address; - } -fenv_t; - -/* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1) - -#ifdef __USE_GNU -/* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) -2) -#endif diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h deleted file mode 100644 index acbac47..0000000 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ /dev/null @@ -1,445 +0,0 @@ -/* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004 - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifdef __GNUC__ - -#ifdef __USE_ISOC99 -/* GCC 3.1 and up have builtins that actually can be used. */ -# if !__GNUC_PREREQ (3,1) -/* ISO C99 defines some macros to perform unordered comparisons. The - m68k FPU supports this with special opcodes and we should use them. - These must not be inline functions since we have to be able to handle - all floating-point types. */ -# undef isgreater -# undef isgreaterequal -# undef isless -# undef islessequal -# undef islessgreater -# undef isunordered -# define isgreater(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsogt %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define isgreaterequal(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsoge %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define isless(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsolt %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define islessequal(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsole %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define islessgreater(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsogl %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define isunordered(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsun %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) -# endif /* GCC 3.1 */ -#endif - - -#if (!defined __NO_MATH_INLINES && defined __OPTIMIZE__) \ - || defined __LIBC_INTERNAL_MATH_INLINES - -#ifdef __LIBC_INTERNAL_MATH_INLINES -/* This is used when defining the functions themselves. Define them with - __ names, and with `static inline' instead of `extern inline' so the - bodies will always be used, never an external function call. */ -# define __m81_u(x) __CONCAT(__,x) -# define __m81_inline static __inline -#else -# define __m81_u(x) x -# ifdef __cplusplus -# define __m81_inline __inline -# else -# define __m81_inline extern __inline -# endif -# define __M81_MATH_INLINES 1 -#endif - -/* Define a const math function. */ -#define __m81_defun(rettype, func, args) \ - __m81_inline rettype __attribute__((__const__)) \ - __m81_u(func) args - -/* Define the three variants of a math function that has a direct - implementation in the m68k fpu. FUNC is the name for C (which will be - suffixed with f and l for the float and long double version, resp). OP - is the name of the fpu operation (without leading f). */ - -#if defined __USE_MISC || defined __USE_ISOC99 -# define __inline_mathop(func, op) \ - __inline_mathop1(double, func, op) \ - __inline_mathop1(float, __CONCAT(func,f), op) \ - __inline_mathop1(long double, __CONCAT(func,l), op) -#else -# define __inline_mathop(func, op) \ - __inline_mathop1(double, func, op) -#endif - -#define __inline_mathop1(float_type,func, op) \ - __m81_defun (float_type, func, (float_type __mathop_x)) \ - { \ - float_type __result; \ - __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ - return __result; \ - } - -__inline_mathop(__atan, atan) -__inline_mathop(__cos, cos) -__inline_mathop(__sin, sin) -__inline_mathop(__tan, tan) -__inline_mathop(__tanh, tanh) -__inline_mathop(__fabs, abs) - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -__inline_mathop(__rint, int) -__inline_mathop(__expm1, etoxm1) -__inline_mathop(__log1p, lognp1) -#endif - -#ifdef __USE_MISC -__inline_mathop(__significand, getman) -#endif - -#ifdef __USE_ISOC99 -__inline_mathop(__trunc, intrz) -#endif - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -__inline_mathop(atan, atan) -__inline_mathop(cos, cos) -__inline_mathop(sin, sin) -__inline_mathop(tan, tan) -__inline_mathop(tanh, tanh) - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -__inline_mathop(rint, int) -__inline_mathop(expm1, etoxm1) -__inline_mathop(log1p, lognp1) -# endif - -# ifdef __USE_MISC -__inline_mathop(significand, getman) -# endif - -# ifdef __USE_ISOC99 -__inline_mathop(trunc, intrz) -# endif - -#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ - -/* This macro contains the definition for the rest of the inline - functions, using FLOAT_TYPE as the domain type and S as the suffix - for the function names. */ - -#define __inline_functions(float_type, s) \ -__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Set rounding towards negative infinity. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \ - /* Convert X to an integer, using -Inf rounding. */ \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - /* Restore the previous rounding mode. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Set rounding towards positive infinity. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg | 0x30)); \ - /* Convert X to an integer, using +Inf rounding. */ \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - /* Restore the previous rounding mode. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} - -__inline_functions(double,) -#if defined __USE_MISC || defined __USE_ISOC99 -__inline_functions(float,f) -__inline_functions(long double,l) -#endif -#undef __inline_functions - -#ifdef __USE_MISC - -# define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for infinity, \ - so we must extract and examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ -} \ - \ -__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for infinity, so we must extract and \ - examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm ("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr & (3 << 24)) == 0; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__scalbn,s), \ - (float_type __x, int __n)) \ -{ \ - float_type __result; \ - __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ - return __result; \ -} - -__inline_functions(double,) -__inline_functions(float,f) -__inline_functions(long double,l) -# undef __inline_functions - -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_XOPEN - -# define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ -{ \ - char __result; \ - __asm("ftst%.x %1\n" \ - "fsun %0" : "=dm" (__result) : "f" (__value)); \ - return __result; \ -} - -__inline_functions(double,) -# ifdef __USE_MISC -__inline_functions(float,f) -__inline_functions(long double,l) -# endif -# undef __inline_functions - -#endif - -#ifdef __USE_ISOC99 - -# define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for the sign bit, so we must extract \ - and examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm ("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr >> 27) & 1; \ -} \ - \ - __m81_defun (float_type, __CONCAT(__scalbln,s), \ - (float_type __x, long int __n)) \ -{ \ - return __CONCAT(__scalbn,s) (__x, __n); \ -} \ - \ -__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Temporarily disable the inexact exception. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg & ~0x200)); \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ -{ \ - long int __result; \ - __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ - return __result; \ -} \ - \ -__m81_inline float_type \ -__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ - float_type __z) \ -{ \ - return (__x * __y) + __z; \ -} - -__inline_functions (double,) -__inline_functions (float,f) -__inline_functions (long double,l) -# undef __inline_functions - -#endif /* Use ISO C9x */ - -#ifdef __USE_GNU - -# define __inline_functions(float_type, s) \ -__m81_inline void \ -__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ - float_type *__cosx) \ -{ \ - __asm ("fsincos%.x %2,%1:%0" \ - : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ -} - -__inline_functions (double,) -__inline_functions (float,f) -__inline_functions (long double,l) -# undef __inline_functions - -#endif - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -/* Define inline versions of the user visible functions. */ - -/* Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work correctly with -traditional. */ -# define __inline_forward_c(rettype, name, args1, args2) \ -extern __inline rettype __attribute__((__const__)) \ - name args1 \ -{ \ - return __CONCAT(__,name) args2; \ -} - -# define __inline_forward(rettype, name, args1, args2) \ -extern __inline rettype name args1 \ -{ \ - return __CONCAT(__,name) args2; \ -} - -__inline_forward_c(double,floor, (double __x), (__x)) -__inline_forward_c(double,ceil, (double __x), (__x)) -# ifdef __USE_MISC -# ifndef __USE_ISOC99 /* Conflict with macro of same name. */ -__inline_forward_c(int,isinf, (double __value), (__value)) -# endif -__inline_forward_c(int,finite, (double __value), (__value)) -__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) -# endif -# if defined __USE_MISC || defined __USE_XOPEN -# ifndef __USE_ISOC99 /* Conflict with macro of same name. */ -__inline_forward_c(int,isnan, (double __value), (__value)) -# endif -# endif -# ifdef __USE_ISOC99 -__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n)) -__inline_forward_c(double,nearbyint, (double __value), (__value)) -__inline_forward_c(long int,lrint, (double __value), (__value)) -__inline_forward_c(double,fma, (double __x, double __y, double __z), - (__x, __y, __z)) -# endif -# ifdef __USE_GNU -__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), - (__x, __sinx, __cosx)) -# endif - -# if defined __USE_MISC || defined __USE_ISOC99 - -__inline_forward_c(float,floorf, (float __x), (__x)) -__inline_forward_c(float,ceilf, (float __x), (__x)) -# ifdef __USE_MISC -__inline_forward_c(int,isinff, (float __value), (__value)) -__inline_forward_c(int,finitef, (float __value), (__value)) -__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) -__inline_forward_c(int,isnanf, (float __value), (__value)) -# endif -# ifdef __USE_ISOC99 -__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n)) -__inline_forward_c(float,nearbyintf, (float __value), (__value)) -__inline_forward_c(long int,lrintf, (float __value), (__value)) -__inline_forward_c(float,fmaf, (float __x, float __y, float __z), - (__x, __y, __z)) -# endif -# ifdef __USE_GNU -__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx), - (__x, __sinx, __cosx)) -# endif - -__inline_forward_c(long double,floorl, (long double __x), (__x)) -__inline_forward_c(long double,ceill, (long double __x), (__x)) -# ifdef __USE_MISC -__inline_forward_c(int,isinfl, (long double __value), (__value)) -__inline_forward_c(int,finitel, (long double __value), (__value)) -__inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n)) -__inline_forward_c(int,isnanl, (long double __value), (__value)) -# endif -# ifdef __USE_ISOC99 -__inline_forward_c(long double,scalblnl, (long double __x, long int __n), - (__x, __n)) -__inline_forward_c(long double,nearbyintl, (long double __value), (__value)) -__inline_forward_c(long int,lrintl, (long double __value), (__value)) -__inline_forward_c(long double,fmal, - (long double __x, long double __y, long double __z), - (__x, __y, __z)) -# endif -# ifdef __USE_GNU -__inline_forward(void,sincosl, - (long double __x, long double *__sinx, long double *__cosx), - (__x, __sinx, __cosx)) -# endif - -#endif /* Use misc or ISO C99 */ - -#undef __inline_forward -#undef __inline_forward_c - -#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ - -#endif -#endif /* GCC. */ diff --git a/sysdeps/m68k/fpu/branred.c b/sysdeps/m68k/fpu/branred.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/branred.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/doasin.c b/sysdeps/m68k/fpu/doasin.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/doasin.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/dosincos.c b/sysdeps/m68k/fpu/dosincos.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/dosincos.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c deleted file mode 100644 index c9f6c6a..0000000 --- a/sysdeps/m68k/fpu/e_acos.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" -#include "mathimpl.h" - -#ifndef FUNC -#define FUNC __ieee754_acos -#endif -#ifndef float_type -#define float_type double -#endif - -float_type -FUNC (x) - float_type x; -{ - return __m81_u(FUNC)(x); -} diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c deleted file mode 100644 index 9066508..0000000 --- a/sysdeps/m68k/fpu/e_acosf.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC __ieee754_acosf -#endif -#define float_type float -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_acosl.c b/sysdeps/m68k/fpu/e_acosl.c deleted file mode 100644 index e3dcd17..0000000 --- a/sysdeps/m68k/fpu/e_acosl.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC __ieee754_acosl -#endif -#define float_type long double -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_asin.c b/sysdeps/m68k/fpu/e_asin.c deleted file mode 100644 index b6176c7..0000000 --- a/sysdeps/m68k/fpu/e_asin.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_asin -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_asinf.c b/sysdeps/m68k/fpu/e_asinf.c deleted file mode 100644 index 05fb826..0000000 --- a/sysdeps/m68k/fpu/e_asinf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_asinf -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_asinl.c b/sysdeps/m68k/fpu/e_asinl.c deleted file mode 100644 index 0dd89fb..0000000 --- a/sysdeps/m68k/fpu/e_asinl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_asinl -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c deleted file mode 100644 index 551b14d..0000000 --- a/sysdeps/m68k/fpu/e_atan2.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (C) 1997, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -float_type -s(__ieee754_atan2) (float_type y, float_type x) -{ - float_type pi, pi_2, z; - unsigned long y_cond, x_cond; - - __asm ("fmovecr%.x %#0, %0" : "=f" (pi)); - __asm ("fscale%.w %#-1, %0" : "=f" (pi_2) : "0" (pi)); - y_cond = __m81_test (y); - x_cond = __m81_test (x); - - if ((x_cond | y_cond) & __M81_COND_NAN) - z = x + y; - else if (y_cond & __M81_COND_ZERO) - { - if (x_cond & __M81_COND_NEG) - z = y_cond & __M81_COND_NEG ? -pi : pi; - else - z = y; - } - else if (x_cond & __M81_COND_INF) - { - if (y_cond & __M81_COND_INF) - { - float_type pi_4; - __asm ("fscale%.w %#-2, %0" : "=f" (pi_4) : "0" (pi)); - z = x_cond & __M81_COND_NEG ? 3 * pi_4 : pi_4; - } - else - z = x_cond & __M81_COND_NEG ? pi : 0; - if (y_cond & __M81_COND_NEG) - z = -z; - } - else if (y_cond & __M81_COND_INF) - z = y_cond & __M81_COND_NEG ? -pi_2 : pi_2; - else if (x_cond & __M81_COND_NEG) - { - if (y_cond & __M81_COND_NEG) - { - if (-x > -y) - z = -pi + m81(__atan) (y / x); - else - z = -pi_2 - m81(__atan) (x / y); - } - else - { - if (-x > y) - z = pi + m81(__atan) (y / x); - else - z = pi_2 - m81(__atan) (x / y); - } - } - else - { - if (y_cond & __M81_COND_NEG) - { - if (x > -y) - z = m81(__atan) (y / x); - else - z = -pi_2 - m81(__atan) (x / y); - } - else - { - if (x > y) - z = m81(__atan) (y / x); - else - z = pi_2 - m81(__atan) (x / y); - } - } - return z; -} diff --git a/sysdeps/m68k/fpu/e_atan2f.c b/sysdeps/m68k/fpu/e_atan2f.c deleted file mode 100644 index a0c750a..0000000 --- a/sysdeps/m68k/fpu/e_atan2f.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <e_atan2.c> diff --git a/sysdeps/m68k/fpu/e_atan2l.c b/sysdeps/m68k/fpu/e_atan2l.c deleted file mode 100644 index 426ca94..0000000 --- a/sysdeps/m68k/fpu/e_atan2l.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <e_atan2.c> diff --git a/sysdeps/m68k/fpu/e_atanh.c b/sysdeps/m68k/fpu/e_atanh.c deleted file mode 100644 index 11bf430..0000000 --- a/sysdeps/m68k/fpu/e_atanh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_atanh -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_atanhf.c b/sysdeps/m68k/fpu/e_atanhf.c deleted file mode 100644 index 7a8f92e..0000000 --- a/sysdeps/m68k/fpu/e_atanhf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_atanhf -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_atanhl.c b/sysdeps/m68k/fpu/e_atanhl.c deleted file mode 100644 index d8975d6..0000000 --- a/sysdeps/m68k/fpu/e_atanhl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_atanhl -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_cosh.c b/sysdeps/m68k/fpu/e_cosh.c deleted file mode 100644 index 93d753c..0000000 --- a/sysdeps/m68k/fpu/e_cosh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_cosh -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_coshf.c b/sysdeps/m68k/fpu/e_coshf.c deleted file mode 100644 index 433faf1..0000000 --- a/sysdeps/m68k/fpu/e_coshf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_coshf -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_coshl.c b/sysdeps/m68k/fpu/e_coshl.c deleted file mode 100644 index 39144fd..0000000 --- a/sysdeps/m68k/fpu/e_coshl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_coshl -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_exp.c b/sysdeps/m68k/fpu/e_exp.c deleted file mode 100644 index 1e95ac47..0000000 --- a/sysdeps/m68k/fpu/e_exp.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_exp10.c b/sysdeps/m68k/fpu/e_exp10.c deleted file mode 100644 index a1dd224..0000000 --- a/sysdeps/m68k/fpu/e_exp10.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp10 -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_exp10f.c b/sysdeps/m68k/fpu/e_exp10f.c deleted file mode 100644 index 1b78bc3..0000000 --- a/sysdeps/m68k/fpu/e_exp10f.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp10f -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_exp10l.c b/sysdeps/m68k/fpu/e_exp10l.c deleted file mode 100644 index 5e90199..0000000 --- a/sysdeps/m68k/fpu/e_exp10l.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp10l -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_exp2.c b/sysdeps/m68k/fpu/e_exp2.c deleted file mode 100644 index 24fac4f..0000000 --- a/sysdeps/m68k/fpu/e_exp2.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp2 -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_exp2f.c b/sysdeps/m68k/fpu/e_exp2f.c deleted file mode 100644 index 593842e..0000000 --- a/sysdeps/m68k/fpu/e_exp2f.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp2f -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_exp2l.c b/sysdeps/m68k/fpu/e_exp2l.c deleted file mode 100644 index 0ab2a42..0000000 --- a/sysdeps/m68k/fpu/e_exp2l.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp2l -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_expf.c b/sysdeps/m68k/fpu/e_expf.c deleted file mode 100644 index 2aeaacf..0000000 --- a/sysdeps/m68k/fpu/e_expf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_expf -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_expl.c b/sysdeps/m68k/fpu/e_expl.c deleted file mode 100644 index 8805a1b..0000000 --- a/sysdeps/m68k/fpu/e_expl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_expl -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c deleted file mode 100644 index bd229ae..0000000 --- a/sysdeps/m68k/fpu/e_fmod.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" -#include "mathimpl.h" - -#ifndef FUNC -#define FUNC __ieee754_fmod -#endif -#ifndef float_type -#define float_type double -#endif - -float_type -FUNC (x, y) - float_type x; - float_type y; -{ - return __m81_u(FUNC)(x, y); -} diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c deleted file mode 100644 index 88c350c..0000000 --- a/sysdeps/m68k/fpu/e_fmodf.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC __ieee754_fmodf -#endif -#define float_type float -#include <e_fmod.c> diff --git a/sysdeps/m68k/fpu/e_fmodl.c b/sysdeps/m68k/fpu/e_fmodl.c deleted file mode 100644 index a46f19e..0000000 --- a/sysdeps/m68k/fpu/e_fmodl.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC __ieee754_fmodl -#endif -#define float_type long double -#include <e_fmod.c> diff --git a/sysdeps/m68k/fpu/e_log.c b/sysdeps/m68k/fpu/e_log.c deleted file mode 100644 index 146dc0c..0000000 --- a/sysdeps/m68k/fpu/e_log.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_log -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_log10.c b/sysdeps/m68k/fpu/e_log10.c deleted file mode 100644 index 06a9b87..0000000 --- a/sysdeps/m68k/fpu/e_log10.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_log10 -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_log10f.c b/sysdeps/m68k/fpu/e_log10f.c deleted file mode 100644 index 3896864..0000000 --- a/sysdeps/m68k/fpu/e_log10f.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_log10f -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_log10l.c b/sysdeps/m68k/fpu/e_log10l.c deleted file mode 100644 index 6dcfc5a..0000000 --- a/sysdeps/m68k/fpu/e_log10l.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_log10l -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_log2.c b/sysdeps/m68k/fpu/e_log2.c deleted file mode 100644 index 5528922..0000000 --- a/sysdeps/m68k/fpu/e_log2.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_log2 -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_log2f.c b/sysdeps/m68k/fpu/e_log2f.c deleted file mode 100644 index 6b49076..0000000 --- a/sysdeps/m68k/fpu/e_log2f.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_log2f -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_log2l.c b/sysdeps/m68k/fpu/e_log2l.c deleted file mode 100644 index 4c92a11..0000000 --- a/sysdeps/m68k/fpu/e_log2l.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_log2l -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_logf.c b/sysdeps/m68k/fpu/e_logf.c deleted file mode 100644 index bc23217..0000000 --- a/sysdeps/m68k/fpu/e_logf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_logf -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_logl.c b/sysdeps/m68k/fpu/e_logl.c deleted file mode 100644 index 03b1830..0000000 --- a/sysdeps/m68k/fpu/e_logl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_logl -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c deleted file mode 100644 index 0b6cee6..0000000 --- a/sysdeps/m68k/fpu/e_pow.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (C) 1997, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -float_type -s(__ieee754_pow) (float_type x, float_type y) -{ - float_type z; - float_type ax; - unsigned long x_cond, y_cond; - - y_cond = __m81_test (y); - if (y_cond & __M81_COND_ZERO) - return 1.0; - if (y_cond & __M81_COND_NAN) - return x == 1.0 ? x : x + y; - - x_cond = __m81_test (x); - if (x_cond & __M81_COND_NAN) - return x + y; - - if (y_cond & __M81_COND_INF) - { - ax = s(fabs) (x); - if (ax == 1.0) - return ax; - if (ax > 1.0) - return y_cond & __M81_COND_NEG ? 0 : y; - else - return y_cond & __M81_COND_NEG ? -y : 0; - } - - if (s(fabs) (y) == 1.0) - return y_cond & __M81_COND_NEG ? 1 / x : x; - - if (y == 2) - return x * x; - if (y == 0.5 && !(x_cond & __M81_COND_NEG)) - return m81(__ieee754_sqrt) (x); - - if (x == 10.0) - { - __asm ("ftentox%.x %1, %0" : "=f" (z) : "f" (y)); - return z; - } - if (x == 2.0) - { - __asm ("ftwotox%.x %1, %0" : "=f" (z) : "f" (y)); - return z; - } - - ax = s(fabs) (x); - if (x_cond & (__M81_COND_INF | __M81_COND_ZERO) || ax == 1.0) - { - z = ax; - if (y_cond & __M81_COND_NEG) - z = 1 / z; - if (x_cond & __M81_COND_NEG) - { - if (y != m81(__rint) (y)) - { - if (x == -1) - z = (z - z) / (z - z); - } - else - goto maybe_negate; - } - return z; - } - - if (x_cond & __M81_COND_NEG) - { - if (y == m81(__rint) (y)) - { - z = m81(__ieee754_exp) (y * m81(__ieee754_log) (-x)); - maybe_negate: - /* We always use the long double format, since y is already in - this format and rounding won't change the result. */ - { - int32_t exponent; - u_int32_t i0, i1; - GET_LDOUBLE_WORDS (exponent, i0, i1, y); - exponent = (exponent & 0x7fff) - 0x3fff; - if (exponent <= 31 - ? i0 & (1 << (31 - exponent)) - : (exponent <= 63 - && i1 & (1 << (63 - exponent)))) - z = -z; - } - } - else - z = (y - y) / (y - y); - } - else - z = m81(__ieee754_exp) (y * m81(__ieee754_log) (x)); - return z; -} diff --git a/sysdeps/m68k/fpu/e_powf.c b/sysdeps/m68k/fpu/e_powf.c deleted file mode 100644 index 3790143..0000000 --- a/sysdeps/m68k/fpu/e_powf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <e_pow.c> diff --git a/sysdeps/m68k/fpu/e_powl.c b/sysdeps/m68k/fpu/e_powl.c deleted file mode 100644 index f71fa34..0000000 --- a/sysdeps/m68k/fpu/e_powl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <e_pow.c> diff --git a/sysdeps/m68k/fpu/e_rem_pio2.c b/sysdeps/m68k/fpu/e_rem_pio2.c deleted file mode 100644 index 1347b04..0000000 --- a/sysdeps/m68k/fpu/e_rem_pio2.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Empty. This file is only meant to avoid compiling the file with the - same name in the libm-ieee754 directory. The code is not used since - there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/e_rem_pio2f.c b/sysdeps/m68k/fpu/e_rem_pio2f.c deleted file mode 100644 index 1347b04..0000000 --- a/sysdeps/m68k/fpu/e_rem_pio2f.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Empty. This file is only meant to avoid compiling the file with the - same name in the libm-ieee754 directory. The code is not used since - there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/e_rem_pio2l.c b/sysdeps/m68k/fpu/e_rem_pio2l.c deleted file mode 100644 index 1347b04..0000000 --- a/sysdeps/m68k/fpu/e_rem_pio2l.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Empty. This file is only meant to avoid compiling the file with the - same name in the libm-ieee754 directory. The code is not used since - there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/e_remainder.c b/sysdeps/m68k/fpu/e_remainder.c deleted file mode 100644 index aa31bc0..0000000 --- a/sysdeps/m68k/fpu/e_remainder.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_remainder -#include <e_fmod.c> diff --git a/sysdeps/m68k/fpu/e_remainderf.c b/sysdeps/m68k/fpu/e_remainderf.c deleted file mode 100644 index b04f0c8..0000000 --- a/sysdeps/m68k/fpu/e_remainderf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_remainderf -#include <e_fmodf.c> diff --git a/sysdeps/m68k/fpu/e_remainderl.c b/sysdeps/m68k/fpu/e_remainderl.c deleted file mode 100644 index b9dc540..0000000 --- a/sysdeps/m68k/fpu/e_remainderl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_remainderl -#include <e_fmodl.c> diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c deleted file mode 100644 index 88edba1..0000000 --- a/sysdeps/m68k/fpu/e_scalb.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -float_type -s(__ieee754_scalb) (float_type x, float_type fn) -{ - float_type retval; - unsigned long x_cond = __m81_test (x); - unsigned long fn_cond = __m81_test (fn); - - if ((x_cond | fn_cond) & __M81_COND_NAN) - return x * fn; - - if (fn_cond & __M81_COND_INF) - { - if (!(fn_cond & __M81_COND_NEG)) - return x * fn; - else if (x_cond & __M81_COND_ZERO) - return x; - else - return x / -fn; - } - - if (m81(__rint) (fn) != fn) - return (x - x) / (x - x); - - __asm ("fscale%.x %1, %0" : "=f" (retval) : "f" (fn), "0" (x)); - return retval; -} diff --git a/sysdeps/m68k/fpu/e_scalbf.c b/sysdeps/m68k/fpu/e_scalbf.c deleted file mode 100644 index 7943571..0000000 --- a/sysdeps/m68k/fpu/e_scalbf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <e_scalb.c> diff --git a/sysdeps/m68k/fpu/e_scalbl.c b/sysdeps/m68k/fpu/e_scalbl.c deleted file mode 100644 index 35fb2dc..0000000 --- a/sysdeps/m68k/fpu/e_scalbl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <e_scalb.c> diff --git a/sysdeps/m68k/fpu/e_sinh.c b/sysdeps/m68k/fpu/e_sinh.c deleted file mode 100644 index c6fed7f..0000000 --- a/sysdeps/m68k/fpu/e_sinh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_sinh -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_sinhf.c b/sysdeps/m68k/fpu/e_sinhf.c deleted file mode 100644 index b5034b7..0000000 --- a/sysdeps/m68k/fpu/e_sinhf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_sinhf -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_sinhl.c b/sysdeps/m68k/fpu/e_sinhl.c deleted file mode 100644 index 2f42d96..0000000 --- a/sysdeps/m68k/fpu/e_sinhl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_sinhl -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/e_sqrt.c b/sysdeps/m68k/fpu/e_sqrt.c deleted file mode 100644 index 70f1971..0000000 --- a/sysdeps/m68k/fpu/e_sqrt.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_sqrt -#include <e_acos.c> diff --git a/sysdeps/m68k/fpu/e_sqrtf.c b/sysdeps/m68k/fpu/e_sqrtf.c deleted file mode 100644 index 5dc1904..0000000 --- a/sysdeps/m68k/fpu/e_sqrtf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_sqrtf -#include <e_acosf.c> diff --git a/sysdeps/m68k/fpu/e_sqrtl.c b/sysdeps/m68k/fpu/e_sqrtl.c deleted file mode 100644 index fede102..0000000 --- a/sysdeps/m68k/fpu/e_sqrtl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_sqrtl -#include <e_acosl.c> diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c deleted file mode 100644 index bcd7a3f..0000000 --- a/sysdeps/m68k/fpu/fclrexcpt.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Clear given exceptions in current floating-point environment. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -__feclearexcept (int excepts) -{ - fexcept_t fpsr; - - /* Mask out unsupported bits/exceptions. */ - excepts &= FE_ALL_EXCEPT; - - /* Fetch the fpu status register. */ - __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); - - /* Clear the relevant bits. */ - fpsr &= ~excepts; - - /* Put the new data in effect. */ - __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feclearexcept, __old_feclearexcept) -compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); -#endif - -versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fedisblxcpt.c b/sysdeps/m68k/fpu/fedisblxcpt.c deleted file mode 100644 index 416e0ba..0000000 --- a/sysdeps/m68k/fpu/fedisblxcpt.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Disable floating-point exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@suse.de>, 2000. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fedisableexcept (int excepts) -{ - unsigned int old_exc, new_exc; - - /* Get the current control register contents. */ - __asm__ ("fmove%.l %!,%0" : "=dm" (new_exc)); - - old_exc = (new_exc >> 6) & FE_ALL_EXCEPT; - - excepts &= FE_ALL_EXCEPT; - - new_exc &= ~(excepts << 6); - __asm__ ("fmove%.l %0,%!" : : "dm" (new_exc)); - - return old_exc; -} diff --git a/sysdeps/m68k/fpu/feenablxcpt.c b/sysdeps/m68k/fpu/feenablxcpt.c deleted file mode 100644 index f963acf..0000000 --- a/sysdeps/m68k/fpu/feenablxcpt.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Enable floating-point exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@suse.de>, 2000. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -feenableexcept (int excepts) -{ - unsigned int new_exc, old_exc; - - /* Get the current control register contents. */ - __asm__ ("fmove%.l %!,%0" : "=dm" (new_exc)); - - old_exc = (new_exc >> 6) & FE_ALL_EXCEPT; - - excepts &= FE_ALL_EXCEPT; - - new_exc |= excepts << 6; - __asm__ ("fmove%.l %0,%!" : : "dm" (new_exc)); - - return old_exc; -} diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c deleted file mode 100644 index 6c94b07..0000000 --- a/sysdeps/m68k/fpu/fegetenv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Store current floating-point environment. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -__fegetenv (fenv_t *envp) -{ - __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp)); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); -#endif - -versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fegetexcept.c b/sysdeps/m68k/fpu/fegetexcept.c deleted file mode 100644 index b34b2c1..0000000 --- a/sysdeps/m68k/fpu/fegetexcept.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Get enabled floating-point exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@suse.de>, 2000. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fegetexcept (void) -{ - unsigned int exc; - - /* Get the current control register contents. */ - __asm__ ("fmove%.l %!,%0" : "=dm" (exc)); - - return (exc >> 6) & FE_ALL_EXCEPT; -} diff --git a/sysdeps/m68k/fpu/fegetround.c b/sysdeps/m68k/fpu/fegetround.c deleted file mode 100644 index 74fc56f..0000000 --- a/sysdeps/m68k/fpu/fegetround.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Return current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fegetround (void) -{ - int fpcr; - - __asm__ ("fmove%.l %!,%0" : "=dm" (fpcr)); - - return fpcr & FE_UPWARD; -} diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c deleted file mode 100644 index 88fb1c5..0000000 --- a/sysdeps/m68k/fpu/feholdexcpt.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -feholdexcept (fenv_t *envp) -{ - fexcept_t fpcr, fpsr; - - /* Store the environment. */ - __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp)); - - /* Now clear all exceptions. */ - fpsr = envp->__status_register & ~FE_ALL_EXCEPT; - __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); - /* And set all exceptions to non-stop. */ - fpcr = envp->__control_register & ~(FE_ALL_EXCEPT << 6); - __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr)); - - return 0; -} diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c deleted file mode 100644 index 20653f0..0000000 --- a/sysdeps/m68k/fpu/fesetenv.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Install given floating-point environment. - Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -__fesetenv (const fenv_t *envp) -{ - fenv_t temp; - - /* Install the environment specified by ENVP. But there are a few - values which we do not want to come from the saved environment. - Therefore, we get the current environment and replace the values - we want to use from the environment specified by the parameter. */ - __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*&temp)); - - temp.__status_register &= ~FE_ALL_EXCEPT; - temp.__control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD); - if (envp == FE_DFL_ENV) - ; - else if (envp == FE_NOMASK_ENV) - temp.__control_register |= FE_ALL_EXCEPT << 6; - else - { - temp.__control_register |= (envp->__control_register - & ((FE_ALL_EXCEPT << 6) | FE_UPWARD)); - temp.__status_register |= envp->__status_register & FE_ALL_EXCEPT; - } - - __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp)); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetenv, __old_fesetenv) -compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); -#endif - -libm_hidden_ver (__fesetenv, fesetenv) -versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c deleted file mode 100644 index 956325d..0000000 --- a/sysdeps/m68k/fpu/fesetround.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Set current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fesetround (int round) -{ - fexcept_t fpcr; - - if (round & ~FE_UPWARD) - /* ROUND is no valid rounding mode. */ - return 1; - - __asm__ ("fmove%.l %!,%0" : "=dm" (fpcr)); - fpcr &= ~FE_UPWARD; - fpcr |= round; - __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr)); - - return 0; -} diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c deleted file mode 100644 index 2a68313..0000000 --- a/sysdeps/m68k/fpu/feupdateenv.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Install given floating-point environment and raise exceptions. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -__feupdateenv (const fenv_t *envp) -{ - fexcept_t fpsr; - - /* Save current exceptions. */ - __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); - fpsr &= FE_ALL_EXCEPT; - - /* Install new environment. */ - fesetenv (envp); - - /* Raise the saved exception. Incidently for us the implementation - defined format of the values in objects of type fexcept_t is the - same as the ones specified using the FE_* constants. */ - feraiseexcept ((int) fpsr); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feupdateenv, __old_feupdateenv) -compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); -#endif - -versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c deleted file mode 100644 index 764b900..0000000 --- a/sysdeps/m68k/fpu/fgetexcptflg.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Store current representation for exceptions. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -__fegetexceptflag (fexcept_t *flagp, int excepts) -{ - fexcept_t fpsr; - - /* Get the current exceptions. */ - __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); - - *flagp = fpsr & excepts & FE_ALL_EXCEPT; - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetexceptflag, __old_fegetexceptflag) -compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); -#endif - -versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c deleted file mode 100644 index 69f746c..0000000 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Raise given exceptions. - Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> -#include <float.h> -#include <math.h> - -int -__feraiseexcept (int excepts) -{ - /* Raise exceptions represented by EXCEPTS. But we must raise only one - signal at a time. It is important that if the overflow/underflow - exception and the divide by zero exception are given at the same - time, the overflow/underflow exception follows the divide by zero - exception. */ - - /* First: invalid exception. */ - if (excepts & FE_INVALID) - { - /* One example of a invalid operation is 0 * Infinity. */ - double d = HUGE_VAL; - __asm__ __volatile__ ("fmul%.s %#0r0,%0; fnop" : "=f" (d) : "0" (d)); - } - - /* Next: division by zero. */ - if (excepts & FE_DIVBYZERO) - { - double d = 1.0; - __asm__ __volatile__ ("fdiv%.s %#0r0,%0; fnop" : "=f" (d) : "0" (d)); - } - - /* Next: overflow. */ - if (excepts & FE_OVERFLOW) - { - long double d = LDBL_MAX; - - __asm__ __volatile__ ("fmul%.x %0,%0; fnop" : "=f" (d) : "0" (d)); - } - - /* Next: underflow. */ - if (excepts & FE_UNDERFLOW) - { - long double d = -LDBL_MAX; - - __asm__ __volatile__ ("fetox%.x %0; fnop" : "=f" (d) : "0" (d)); - } - - /* Last: inexact. */ - if (excepts & FE_INEXACT) - { - long double d = 1.0; - __asm__ __volatile__ ("fdiv%.s %#0r3,%0; fnop" : "=f" (d) : "0" (d)); - } - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feraiseexcept, __old_feraiseexcept) -compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); -#endif - -libm_hidden_ver (__feraiseexcept, feraiseexcept) -versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c deleted file mode 100644 index 51b086a..0000000 --- a/sysdeps/m68k/fpu/fsetexcptflg.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Set floating-point environment exception handling. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> -#include <math.h> - -int -__fesetexceptflag (const fexcept_t *flagp, int excepts) -{ - fexcept_t fpsr; - - /* Get the current status register. */ - __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); - - /* Install the new exception bits in the Accrued Exception Byte. */ - fpsr &= ~(excepts & FE_ALL_EXCEPT); - fpsr |= *flagp & excepts & FE_ALL_EXCEPT; - - /* Store the new status register. */ - __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetexceptflag, __old_fesetexceptflag) -compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); -#endif - -versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/ftestexcept.c b/sysdeps/m68k/fpu/ftestexcept.c deleted file mode 100644 index 3157c90..0000000 --- a/sysdeps/m68k/fpu/ftestexcept.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Test exception in current environment. - Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv.h> - -int -fetestexcept (int excepts) -{ - fexcept_t fpsr; - - /* Get current exceptions. */ - __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); - - return fpsr & excepts & FE_ALL_EXCEPT; -} diff --git a/sysdeps/m68k/fpu/halfulp.c b/sysdeps/m68k/fpu/halfulp.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/halfulp.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c deleted file mode 100644 index dd6c215..0000000 --- a/sysdeps/m68k/fpu/k_cos.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1996, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" - -#ifndef FUNC -#define FUNC cos -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -__CONCATX(__kernel_,FUNC) (x, y) - float_type x; - float_type y; -{ - float_type sin_x, cos_x, sin_y, cos_y; - __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x) - : "f" (x)); - __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y) - : "f" (y)); - return cos_x * cos_y - sin_x * sin_y; -} diff --git a/sysdeps/m68k/fpu/k_cosf.c b/sysdeps/m68k/fpu/k_cosf.c deleted file mode 100644 index 2a366d0..0000000 --- a/sysdeps/m68k/fpu/k_cosf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC cosf -#define float_type float -#include <k_cos.c> diff --git a/sysdeps/m68k/fpu/k_cosl.c b/sysdeps/m68k/fpu/k_cosl.c deleted file mode 100644 index 983b665..0000000 --- a/sysdeps/m68k/fpu/k_cosl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC cosl -#define float_type long double -#include <k_cos.c> diff --git a/sysdeps/m68k/fpu/k_rem_pio2.c b/sysdeps/m68k/fpu/k_rem_pio2.c deleted file mode 100644 index 1347b04..0000000 --- a/sysdeps/m68k/fpu/k_rem_pio2.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Empty. This file is only meant to avoid compiling the file with the - same name in the libm-ieee754 directory. The code is not used since - there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/k_rem_pio2f.c b/sysdeps/m68k/fpu/k_rem_pio2f.c deleted file mode 100644 index 1347b04..0000000 --- a/sysdeps/m68k/fpu/k_rem_pio2f.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Empty. This file is only meant to avoid compiling the file with the - same name in the libm-ieee754 directory. The code is not used since - there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/k_rem_pio2l.c b/sysdeps/m68k/fpu/k_rem_pio2l.c deleted file mode 100644 index 1347b04..0000000 --- a/sysdeps/m68k/fpu/k_rem_pio2l.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Empty. This file is only meant to avoid compiling the file with the - same name in the libm-ieee754 directory. The code is not used since - there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c deleted file mode 100644 index 652ca0e..0000000 --- a/sysdeps/m68k/fpu/k_sin.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1996, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" - -#ifndef FUNC -#define FUNC sin -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -__CONCATX(__kernel_,FUNC) (x, y, iy) - float_type x; - float_type y; - int iy; -{ - float_type sin_x, cos_x, sin_y, cos_y; - if (iy == 0) - return __m81_u(__CONCATX(__,FUNC)) (x); - __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x) - : "f" (x)); - __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y) - : "f" (y)); - return sin_x * cos_y + cos_x * sin_y; -} diff --git a/sysdeps/m68k/fpu/k_sinf.c b/sysdeps/m68k/fpu/k_sinf.c deleted file mode 100644 index 7050347..0000000 --- a/sysdeps/m68k/fpu/k_sinf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC sinf -#define float_type float -#include <k_sin.c> diff --git a/sysdeps/m68k/fpu/k_sinl.c b/sysdeps/m68k/fpu/k_sinl.c deleted file mode 100644 index 5a647ca..0000000 --- a/sysdeps/m68k/fpu/k_sinl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC sinl -#define float_type long double -#include <k_sin.c> diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c deleted file mode 100644 index 28f6a80..0000000 --- a/sysdeps/m68k/fpu/k_tan.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 1996, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" - -#ifndef FUNC -#define FUNC tan -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -__CONCATX(__kernel_,FUNC) (x, y, iy) - float_type x; - float_type y; - int iy; -{ - float_type tan_x, tan_y; - tan_x = __m81_u(__CONCATX(__,FUNC)) (x); - tan_y = __m81_u(__CONCATX(__,FUNC)) (y); - if (iy > 0) - return (tan_x + tan_y) / (1 - tan_x * tan_y); - else - return (tan_x * tan_y - 1) / (tan_x + tan_y); -} diff --git a/sysdeps/m68k/fpu/k_tanf.c b/sysdeps/m68k/fpu/k_tanf.c deleted file mode 100644 index 777af1b..0000000 --- a/sysdeps/m68k/fpu/k_tanf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC tanf -#define float_type float -#include <k_tan.c> diff --git a/sysdeps/m68k/fpu/k_tanl.c b/sysdeps/m68k/fpu/k_tanl.c deleted file mode 100644 index f2570e6..0000000 --- a/sysdeps/m68k/fpu/k_tanl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC tanl -#define float_type long double -#include <k_tan.c> diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps deleted file mode 100644 index 854c10c..0000000 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ /dev/null @@ -1,1165 +0,0 @@ -# Begin of automatic generation - -# acosh -Test "acosh (7) == 2.63391579384963341725009269461593689": -ildouble: 1 -ldouble: 1 - -# asinh -Test "asinh (0.75) == 0.693147180559945309417232121458176568": -ildouble: 1 -ldouble: 1 - -# atan2 -Test "atan2 (0.390625, .00029) == 1.57005392693128974780151246612928941": -ildouble: 1 -ldouble: 1 -Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": -ildouble: 1 -ldouble: 1 - -# atanh -Test "atanh (0.75) == 0.972955074527656652552676371721589865": -ildouble: 1 -ldouble: 1 - -# cacos -Test "Real part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": -float: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -# cacosh -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 -ildouble: 6 -ldouble: 6 -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 -Test "Real part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834467 + 1.11752014915610270578240049553777969 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834467 + 1.11752014915610270578240049553777969 i": -float: 1 -ifloat: 1 - -# casin -Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -double: 1 -float: 5 -idouble: 1 -ifloat: 5 -ildouble: 3 -ldouble: 3 -Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -float: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -# casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 6 -float: 19 -idouble: 6 -ifloat: 19 -ildouble: 5 -ldouble: 5 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 13 -float: 1 -idouble: 13 -ifloat: 1 -ildouble: 6 -ldouble: 6 -Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# catan -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -ildouble: 1 -ldouble: 1 - -# catanh -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -ildouble: 1 -ldouble: 1 - -# cbrt -Test "cbrt (-0.001) == -0.1": -ildouble: 1 -ldouble: 1 -Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": -ildouble: 1 -ldouble: 1 - -# ccos -Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -float: 1 -ifloat: 1 -Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -float: 1 -ifloat: 1 -Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -float: 2 -ifloat: 2 -Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# clog -Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": -ildouble: 1 -ldouble: 1 - -# clog10 -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": -double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": -float: 1 -ifloat: 1 - -# cos -Test "cos (M_PI_6l * 2.0) == 0.5": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "cos (M_PI_6l * 4.0) == -0.5": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "cos (pi/2) == 0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# cpow -Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -float: 1 -ifloat: 1 -ildouble: 9 -ldouble: 9 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 15 -ldouble: 15 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": -ildouble: 5 -ldouble: 5 -Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 4 -ldouble: 4 -Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -float: 6 -ifloat: 6 -ildouble: 2 -ldouble: 2 -Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 2 -float: 3 -idouble: 2 -ifloat: 3 -ildouble: 1 -ldouble: 1 - -# csin -Test "Real part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": -float: 1 -ifloat: 1 -Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": -float: 1 -ifloat: 1 - -# csinh -Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -float: 1 -ifloat: 1 -Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 - -# ctan -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": -ildouble: 2 -ldouble: 2 - -# ctanh -Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": -double: 1 -idouble: 1 -Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# erfc -Test "erfc (0.75) == 0.288844366346484868401062165408589223": -float: 1 -ifloat: 1 -Test "erfc (1.25) == 0.0770998717435417698634765188027188596": -ildouble: 1 -ldouble: 1 -Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": -float: 1 -ifloat: 1 - -# expm1 -Test "expm1 (1) == M_El - 1.0": -ildouble: 1 -ldouble: 1 - -# gamma -Test "gamma (-0.5) == log(2*sqrt(pi))": -ildouble: 1 -ldouble: 1 -Test "gamma (0.5) == log(sqrt(pi))": -ildouble: 1 -ldouble: 1 -Test "gamma (3) == M_LN2l": -ildouble: 1 -ldouble: 1 - -# hypot -Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 - -# j0 -Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "j0 (0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "j0 (1.5) == 0.511827671735918128749051744283411720": -float: 1 -ifloat: 1 -Test "j0 (10.0) == -0.245935764451348335197760862485328754": -double: 1 -idouble: 1 -Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# j1 -Test "j1 (-1.0) == -0.440050585744933515959682203718914913": -float: 1 -ifloat: 1 -Test "j1 (1.0) == 0.440050585744933515959682203718914913": -float: 1 -ifloat: 1 -Test "j1 (1.5) == 0.557936507910099641990121213156089400": -float: 1 -ifloat: 1 -Test "j1 (10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "j1 (2.0) == 0.576724807756873387202448242269137087": -float: 1 -ifloat: 1 -Test "j1 (8.0) == 0.234636346853914624381276651590454612": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# jn -Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "jn (0, 1.5) == 0.511827671735918128749051744283411720": -float: 1 -ifloat: 1 -Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": -double: 1 -idouble: 1 -Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (1, -1.0) == -0.440050585744933515959682203718914913": -float: 1 -ifloat: 1 -Test "jn (1, 1.0) == 0.440050585744933515959682203718914913": -float: 1 -ifloat: 1 -Test "jn (1, 1.5) == 0.557936507910099641990121213156089400": -float: 1 -ifloat: 1 -Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": -float: 1 -ifloat: 1 -Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": -float: 1 -ifloat: 1 -Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": -double: 1 -float: 5 -idouble: 1 -ifloat: 5 -ildouble: 2 -ldouble: 2 -Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (3, 1.0) == 0.0195633539826684059189053216217515083": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -ildouble: 1 -ldouble: 1 - -# lgamma -Test "lgamma (-0.5) == log(2*sqrt(pi))": -ildouble: 1 -ldouble: 1 -Test "lgamma (0.5) == log(sqrt(pi))": -ildouble: 1 -ldouble: 1 -Test "lgamma (0.7) == 0.260867246531666514385732417016759578": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "lgamma (3) == M_LN2l": -ildouble: 1 -ldouble: 1 - -# log -Test "log (0.75) == -0.287682072451780927439219005993827432": -ildouble: 1 -ldouble: 1 -Test "log (2) == M_LN2l": -ildouble: 1 -ldouble: 1 -Test "log (e) == 1": -float: 1 -ifloat: 1 - -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -ildouble: 2 -ldouble: 2 -Test "log10 (e) == log10(e)": -float: 1 -ifloat: 1 - -# log1p -Test "log1p (-0.25) == -0.287682072451780927439219005993827432": -ildouble: 1 -ldouble: 1 - -# log2 -Test "log2 (0.75) == -.415037499278843818546261056052183492": -ildouble: 1 -ldouble: 1 - -# pow -Test "pow (0.75, 1.25) == 0.697953644326574699205914060237425566": -ildouble: 1 -ldouble: 1 - -# sincos -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# sinh -Test "sinh (0.75) == 0.822316731935829980703661634446913849": -ildouble: 1 -ldouble: 1 - -# tan -Test "tan (0.75) == 0.931596459944072461165202756573936428": -ildouble: 1 -ldouble: 1 -Test "tan (pi/4) == 1": -double: 1 -idouble: 1 - -# tgamma -Test "tgamma (-0.5) == -2 sqrt (pi)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "tgamma (0.5) == sqrt (pi)": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "tgamma (0.7) == 1.29805533264755778568117117915281162": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "tgamma (4) == 6": -ildouble: 1 -ldouble: 1 - -# y0 -Test "y0 (0.125) == -1.38968062514384052915582277745018693": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "y0 (0.75) == -0.137172769385772397522814379396581855": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 -Test "y0 (1.0) == 0.0882569642156769579829267660235151628": -ildouble: 1 -ldouble: 1 -Test "y0 (1.5) == 0.382448923797758843955068554978089862": -ildouble: 1 -ldouble: 1 -Test "y0 (10.0) == 0.0556711672835993914244598774101900481": -ildouble: 1 -ldouble: 1 -Test "y0 (2.0) == 0.510375672649745119596606592727157873": -float: 1 -ifloat: 1 -Test "y0 (8.0) == 0.223521489387566220527323400498620359": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# y1 -Test "y1 (0.125) == -5.19993611253477499595928744876579921": -ildouble: 1 -ldouble: 1 -Test "y1 (1.0) == -0.781212821300288716547150000047964821": -double: 1 -idouble: 1 -Test "y1 (10.0) == 0.249015424206953883923283474663222803": -float: 1 -ifloat: 1 -Test "y1 (2.0) == -0.107032431540937546888370772277476637": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "y1 (8.0) == -0.158060461731247494255555266187483550": -ildouble: 1 -ldouble: 1 - -# yn -Test "yn (0, 0.125) == -1.38968062514384052915582277745018693": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (0, 0.75) == -0.137172769385772397522814379396581855": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 -Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": -ildouble: 1 -ldouble: 1 -Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": -ildouble: 1 -ldouble: 1 -Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": -ildouble: 1 -ldouble: 1 -Test "yn (0, 2.0) == 0.510375672649745119596606592727157873": -float: 1 -ifloat: 1 -Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (1, 0.75) == -1.03759455076928541973767132140642198": -float: 1 -ifloat: 1 -Test "yn (1, 1.0) == -0.781212821300288716547150000047964821": -double: 1 -idouble: 1 -Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": -float: 1 -ifloat: 1 -Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": -ildouble: 1 -ldouble: 1 -Test "yn (10, 0.125) == -127057845771019398.252538486899753195": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 -Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": -float: 1 -ifloat: 1 -ildouble: 4 -ldouble: 4 -Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": -ildouble: 1 -ldouble: 1 -Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": -float: 1 -ifloat: 1 - -# Maximal error of functions: -Function: "acosh": -ildouble: 1 -ldouble: 1 - -Function: "asinh": -ildouble: 1 -ldouble: 1 - -Function: "atan2": -ildouble: 1 -ldouble: 1 - -Function: "atanh": -ildouble: 1 -ldouble: 1 - -Function: Real part of "cacos": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "cacos": -float: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -Function: Real part of "cacosh": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 -ildouble: 6 -ldouble: 6 - -Function: Imaginary part of "cacosh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -Function: Real part of "casin": -double: 1 -float: 5 -idouble: 1 -ifloat: 5 -ildouble: 3 -ldouble: 3 - -Function: Imaginary part of "casin": -float: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -Function: Real part of "casinh": -double: 6 -float: 19 -idouble: 6 -ifloat: 19 -ildouble: 5 -ldouble: 5 - -Function: Imaginary part of "casinh": -double: 13 -float: 1 -idouble: 13 -ifloat: 1 -ildouble: 6 -ldouble: 6 - -Function: Real part of "catan": -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "catan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "catanh": -ildouble: 1 -ldouble: 1 - -Function: "cbrt": -ildouble: 1 -ldouble: 1 - -Function: Real part of "ccos": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ccos": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "ccosh": -float: 1 -ifloat: 1 - -Function: Imaginary part of "ccosh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "cexp": -float: 2 -ifloat: 2 - -Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "clog": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "clog": -ildouble: 1 -ldouble: 1 - -Function: Real part of "clog10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "clog10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -Function: "cos": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "cpow": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 15 -ldouble: 15 - -Function: Imaginary part of "cpow": -double: 2 -float: 6 -idouble: 2 -ifloat: 6 -ildouble: 2 -ldouble: 2 - -Function: Real part of "csin": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csin": -float: 1 -ifloat: 1 - -Function: Real part of "csinh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csinh": -float: 1 -ifloat: 1 - -Function: Real part of "ctan": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ctan": -ildouble: 2 -ldouble: 2 - -Function: Imaginary part of "ctanh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "erfc": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "expm1": -ildouble: 1 -ldouble: 1 - -Function: "gamma": -ildouble: 1 -ldouble: 1 - -Function: "hypot": -float: 1 -ifloat: 1 - -Function: "j0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "j1": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "jn": -double: 1 -float: 5 -idouble: 1 -ifloat: 5 -ildouble: 2 -ldouble: 2 - -Function: "lgamma": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "log": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "log10": -float: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -Function: "log1p": -ildouble: 1 -ldouble: 1 - -Function: "log2": -ildouble: 1 -ldouble: 1 - -Function: "pow": -ildouble: 1 -ldouble: 1 - -Function: "sincos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "sinh": -ildouble: 1 -ldouble: 1 - -Function: "tan": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -Function: "tgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "y0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -Function: "y1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "yn": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 4 -ldouble: 4 - -# end of automatic generation diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/fpu/mathimpl.h deleted file mode 100644 index bbcaf84..0000000 --- a/sysdeps/m68k/fpu/mathimpl.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Definitions of libc internal inline math functions implemented - by the m68881/2. - Copyright (C) 1991,92,93,94,96,97,98,99 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This file contains the definitions of the inline math functions that - are only used internally inside libm, not visible to the user. */ - -__inline_mathop (__ieee754_acos, acos) -__inline_mathop (__ieee754_asin, asin) -__inline_mathop (__ieee754_cosh, cosh) -__inline_mathop (__ieee754_sinh, sinh) -__inline_mathop (__ieee754_exp, etox) -__inline_mathop (__ieee754_exp2, twotox) -__inline_mathop (__ieee754_exp10, tentox) -__inline_mathop (__ieee754_log10, log10) -__inline_mathop (__ieee754_log2, log2) -__inline_mathop (__ieee754_log, logn) -__inline_mathop (__ieee754_sqrt, sqrt) -__inline_mathop (__ieee754_atanh, atanh) - -__m81_defun (double, __ieee754_remainder, (double __x, double __y)) -{ - double __result; - __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_defun (float, __ieee754_remainderf, (float __x, float __y)) -{ - float __result; - __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_defun (long double, - __ieee754_remainderl, (long double __x, long double __y)) -{ - long double __result; - __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_defun (double, __ieee754_fmod, (double __x, double __y)) -{ - double __result; - __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_defun (float, __ieee754_fmodf, (float __x, float __y)) -{ - float __result; - __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_defun (long double, - __ieee754_fmodl, (long double __x, long double __y)) -{ - long double __result; - __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -/* Get the m68881 condition codes, to quickly check multiple conditions. */ -static __inline__ unsigned long -__m81_test (long double __val) -{ - unsigned long __fpsr; - __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val)); - return __fpsr; -} - -/* Bit values returned by __m81_test. */ -#define __M81_COND_NAN (1 << 24) -#define __M81_COND_INF (2 << 24) -#define __M81_COND_ZERO (4 << 24) -#define __M81_COND_NEG (8 << 24) diff --git a/sysdeps/m68k/fpu/mpa.c b/sysdeps/m68k/fpu/mpa.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/mpa.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mpatan.c b/sysdeps/m68k/fpu/mpatan.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/mpatan.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mpatan2.c b/sysdeps/m68k/fpu/mpatan2.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/mpatan2.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mpexp.c b/sysdeps/m68k/fpu/mpexp.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/mpexp.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mplog.c b/sysdeps/m68k/fpu/mplog.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/mplog.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mpsqrt.c b/sysdeps/m68k/fpu/mpsqrt.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/mpsqrt.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mptan.c b/sysdeps/m68k/fpu/mptan.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/mptan.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c deleted file mode 100644 index 8cca490..0000000 --- a/sysdeps/m68k/fpu/s_atan.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1996, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -#ifndef FUNC -#define FUNC atan -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -__CONCATX(__,FUNC) (x) - float_type x; -{ - return __m81_u(__CONCATX(__,FUNC))(x); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c deleted file mode 100644 index c98559a..0000000 --- a/sysdeps/m68k/fpu/s_atanf.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC atanf -#endif -#define float_type float -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_atanl.c b/sysdeps/m68k/fpu/s_atanl.c deleted file mode 100644 index b7e608a..0000000 --- a/sysdeps/m68k/fpu/s_atanl.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC atanl -#endif -#define float_type long double -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c deleted file mode 100644 index d302d3d..0000000 --- a/sysdeps/m68k/fpu/s_ccos.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Complex cosine function. m68k fpu version - Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <complex.h> -#include <math.h> -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -__complex__ float_type -s(__ccos) (__complex__ float_type x) -{ - __complex__ float_type retval; - unsigned long rx_cond = __m81_test (__real__ x); - - if ((rx_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) - { - /* Real part is finite. */ - float_type sin_rx, cos_rx; - - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_rx), "=f" (cos_rx) - : "f" (__real__ x)); - __real__ retval = cos_rx * m81(__ieee754_cosh) (__imag__ x); - if (rx_cond & __M81_COND_ZERO) - __imag__ retval = (m81(__signbit) (__imag__ x) - ? __real__ x : -__real__ x); - else - __imag__ retval = -sin_rx * m81(__ieee754_sinh) (__imag__ x); - } - else - { - unsigned long ix_cond = __m81_test (__imag__ x); - - if (ix_cond & __M81_COND_INF) - __real__ retval = s(fabs) (__imag__ x); - else - __real__ retval = __real__ x - __real__ x; - if (ix_cond & __M81_COND_ZERO) - __imag__ retval = __imag__ x; - else - __imag__ retval = __real__ x - __real__ x; - } - - return retval; -} -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (s(__ccos), s(ccos)) diff --git a/sysdeps/m68k/fpu/s_ccosf.c b/sysdeps/m68k/fpu/s_ccosf.c deleted file mode 100644 index f5e8a41..0000000 --- a/sysdeps/m68k/fpu/s_ccosf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_ccos.c> diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c deleted file mode 100644 index 1698881..0000000 --- a/sysdeps/m68k/fpu/s_ccosh.c +++ /dev/null @@ -1,78 +0,0 @@ -/* Complex cosine hyperbole function. m68k fpu version - Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <complex.h> -#include <math.h> -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -__complex__ float_type -s(__ccosh) (__complex__ float_type x) -{ - __complex__ float_type retval; - unsigned long ix_cond = __m81_test (__imag__ x); - - if ((ix_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) - { - /* Imaginary part is finite. */ - float_type sin_ix, cos_ix; - - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) - : "f" (__imag__ x)); - __real__ retval = cos_ix * m81(__ieee754_cosh) (__real__ x); - if (ix_cond & __M81_COND_ZERO) - __imag__ retval = (m81(__signbit) (__real__ x) - ? -__imag__ x : __imag__ x); - else - __imag__ retval = sin_ix * m81(__ieee754_sinh) (__real__ x); - } - else - { - unsigned long rx_cond = __m81_test (__real__ x); - - if (rx_cond & __M81_COND_ZERO) - { - __real__ retval = __imag__ x - __imag__ x; - __imag__ retval = __real__ x; - } - else - { - if (rx_cond & __M81_COND_INF) - __real__ retval = s(fabs) (__real__ x); - else - __real__ retval = 0.0/0.0; - __imag__ retval = __imag__ x - __imag__ x; - } - } - - return retval; -} -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (s(__ccosh), s(ccosh)) diff --git a/sysdeps/m68k/fpu/s_ccoshf.c b/sysdeps/m68k/fpu/s_ccoshf.c deleted file mode 100644 index 3c8e7c7..0000000 --- a/sysdeps/m68k/fpu/s_ccoshf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_ccosh.c> diff --git a/sysdeps/m68k/fpu/s_ccoshl.c b/sysdeps/m68k/fpu/s_ccoshl.c deleted file mode 100644 index 772d578..0000000 --- a/sysdeps/m68k/fpu/s_ccoshl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_ccosh.c> diff --git a/sysdeps/m68k/fpu/s_ccosl.c b/sysdeps/m68k/fpu/s_ccosl.c deleted file mode 100644 index aaff365..0000000 --- a/sysdeps/m68k/fpu/s_ccosl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_ccos.c> diff --git a/sysdeps/m68k/fpu/s_ceil.c b/sysdeps/m68k/fpu/s_ceil.c deleted file mode 100644 index 93d5ad7..0000000 --- a/sysdeps/m68k/fpu/s_ceil.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC ceil -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_ceilf.c b/sysdeps/m68k/fpu/s_ceilf.c deleted file mode 100644 index b3ba6a5..0000000 --- a/sysdeps/m68k/fpu/s_ceilf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC ceilf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_ceill.c b/sysdeps/m68k/fpu/s_ceill.c deleted file mode 100644 index 2bf95b0..0000000 --- a/sysdeps/m68k/fpu/s_ceill.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC ceill -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c deleted file mode 100644 index 4babf12..0000000 --- a/sysdeps/m68k/fpu/s_cexp.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Complex exponential function. m68k fpu version - Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <complex.h> -#include <math.h> -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -__complex__ float_type -s(__cexp) (__complex__ float_type x) -{ - __complex__ float_type retval; - unsigned long ix_cond; - - ix_cond = __m81_test (__imag__ x); - - if ((ix_cond & (__M81_COND_NAN|__M81_COND_INF)) == 0) - { - /* Imaginary part is finite. */ - float_type exp_val = m81(__ieee754_exp) (__real__ x); - - __real__ retval = __imag__ retval = exp_val; - if (m81(__finite) (exp_val)) - { - float_type sin_ix, cos_ix; - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) - : "f" (__imag__ x)); - __real__ retval *= cos_ix; - if (ix_cond & __M81_COND_ZERO) - __imag__ retval = __imag__ x; - else - __imag__ retval *= sin_ix; - } - else - { - /* Compute the sign of the result. */ - float_type remainder, pi_2; - int quadrant; - - __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2)); - __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" - : "=f" (remainder), "=dm" (quadrant) - : "f" (pi_2), "0" (__imag__ x)); - quadrant = (quadrant >> 16) & 0x83; - if (quadrant & 0x80) - quadrant ^= 0x83; - switch (quadrant) - { - default: - break; - case 1: - __real__ retval = -__real__ retval; - break; - case 2: - __real__ retval = -__real__ retval; - case 3: - __imag__ retval = -__imag__ retval; - break; - } - if (ix_cond & __M81_COND_ZERO && !m81(__isnan) (exp_val)) - __imag__ retval = __imag__ x; - } - } - else - { - unsigned long rx_cond = __m81_test (__real__ x); - - if (rx_cond & __M81_COND_INF) - { - /* Real part is infinite. */ - if (rx_cond & __M81_COND_NEG) - { - __real__ retval = __imag__ retval = 0.0; - if (ix_cond & __M81_COND_NEG) - __imag__ retval = -__imag__ retval; - } - else - { - __real__ retval = __real__ x; - __imag__ retval = __imag__ x - __imag__ x; - } - } - else - __real__ retval = __imag__ retval = __imag__ x - __imag__ x; - } - - return retval; -} -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (s(__cexp), s(cexp)) diff --git a/sysdeps/m68k/fpu/s_cexpf.c b/sysdeps/m68k/fpu/s_cexpf.c deleted file mode 100644 index 177a360..0000000 --- a/sysdeps/m68k/fpu/s_cexpf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_cexp.c> diff --git a/sysdeps/m68k/fpu/s_cexpl.c b/sysdeps/m68k/fpu/s_cexpl.c deleted file mode 100644 index bbda4ba..0000000 --- a/sysdeps/m68k/fpu/s_cexpl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_cexp.c> diff --git a/sysdeps/m68k/fpu/s_cos.c b/sysdeps/m68k/fpu/s_cos.c deleted file mode 100644 index 9c96076..0000000 --- a/sysdeps/m68k/fpu/s_cos.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC cos -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_cosf.c b/sysdeps/m68k/fpu/s_cosf.c deleted file mode 100644 index db965b8..0000000 --- a/sysdeps/m68k/fpu/s_cosf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC cosf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_cosl.c b/sysdeps/m68k/fpu/s_cosl.c deleted file mode 100644 index 4198fee..0000000 --- a/sysdeps/m68k/fpu/s_cosl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC cosl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c deleted file mode 100644 index 7c590e4..0000000 --- a/sysdeps/m68k/fpu/s_csin.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Complex sine function. m68k fpu version - Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <complex.h> -#include <math.h> -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -__complex__ float_type -s(__csin) (__complex__ float_type x) -{ - __complex__ float_type retval; - unsigned long rx_cond = __m81_test (__real__ x); - - if ((rx_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) - { - /* Real part is finite. */ - float_type sin_rx, cos_rx; - - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_rx), "=f" (cos_rx) - : "f" (__real__ x)); - if (rx_cond & __M81_COND_ZERO) - __real__ retval = __real__ x; - else - __real__ retval = sin_rx * m81(__ieee754_cosh) (__imag__ x); - __imag__ retval = cos_rx * m81(__ieee754_sinh) (__imag__ x); - } - else - { - unsigned long ix_cond = __m81_test (__imag__ x); - - __real__ retval = __real__ x - __real__ x; - if (ix_cond & (__M81_COND_ZERO|__M81_COND_INF|__M81_COND_NAN)) - __imag__ retval = __imag__ x; - else - __imag__ retval = __real__ retval; - } - - return retval; -} -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (s(__csin), s(csin)) diff --git a/sysdeps/m68k/fpu/s_csinf.c b/sysdeps/m68k/fpu/s_csinf.c deleted file mode 100644 index b760e19..0000000 --- a/sysdeps/m68k/fpu/s_csinf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_csin.c> diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c deleted file mode 100644 index dafb82a..0000000 --- a/sysdeps/m68k/fpu/s_csinh.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Complex sine hyperbole function. m68k fpu version - Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <complex.h> -#include <math.h> -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -__complex__ float_type -s(__csinh) (__complex__ float_type x) -{ - __complex__ float_type retval; - unsigned long ix_cond; - - ix_cond = __m81_test (__imag__ x); - - if ((ix_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) - { - /* Imaginary part is finite. */ - float_type sin_ix, cos_ix; - - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) - : "f" (__imag__ x)); - __real__ retval = cos_ix * m81(__ieee754_sinh) (__real__ x); - if (ix_cond & __M81_COND_ZERO) - __imag__ retval = __imag__ x; - else - __imag__ retval = sin_ix * m81(__ieee754_cosh) (__real__ x); - } - else - { - unsigned long rx_cond = __m81_test (__real__ x); - - __imag__ retval = __imag__ x - __imag__ x; - if (rx_cond & (__M81_COND_ZERO|__M81_COND_INF|__M81_COND_NAN)) - __real__ retval = __real__ x; - else - __real__ retval = __imag__ retval; - } - - return retval; -} -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (s(__csinh), s(csinh)) diff --git a/sysdeps/m68k/fpu/s_csinhf.c b/sysdeps/m68k/fpu/s_csinhf.c deleted file mode 100644 index 2f7a43e..0000000 --- a/sysdeps/m68k/fpu/s_csinhf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_csinh.c> diff --git a/sysdeps/m68k/fpu/s_csinhl.c b/sysdeps/m68k/fpu/s_csinhl.c deleted file mode 100644 index 026a20e..0000000 --- a/sysdeps/m68k/fpu/s_csinhl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_csinh.c> diff --git a/sysdeps/m68k/fpu/s_csinl.c b/sysdeps/m68k/fpu/s_csinl.c deleted file mode 100644 index ea2dad0..0000000 --- a/sysdeps/m68k/fpu/s_csinl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_csin.c> diff --git a/sysdeps/m68k/fpu/s_expm1.c b/sysdeps/m68k/fpu/s_expm1.c deleted file mode 100644 index 1ef99e2..0000000 --- a/sysdeps/m68k/fpu/s_expm1.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC expm1 -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_expm1f.c b/sysdeps/m68k/fpu/s_expm1f.c deleted file mode 100644 index 84935b1..0000000 --- a/sysdeps/m68k/fpu/s_expm1f.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC expm1f -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_expm1l.c b/sysdeps/m68k/fpu/s_expm1l.c deleted file mode 100644 index feee07a..0000000 --- a/sysdeps/m68k/fpu/s_expm1l.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC expm1l -#include <s_atanl.c> -libm_hidden_def (__expm1l) diff --git a/sysdeps/m68k/fpu/s_fabs.c b/sysdeps/m68k/fpu/s_fabs.c deleted file mode 100644 index 1f0631e..0000000 --- a/sysdeps/m68k/fpu/s_fabs.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC fabs -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_fabsf.c b/sysdeps/m68k/fpu/s_fabsf.c deleted file mode 100644 index 8f94219..0000000 --- a/sysdeps/m68k/fpu/s_fabsf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC fabsf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_fabsl.c b/sysdeps/m68k/fpu/s_fabsl.c deleted file mode 100644 index 8ac14d5..0000000 --- a/sysdeps/m68k/fpu/s_fabsl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC fabsl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_finite.c b/sysdeps/m68k/fpu/s_finite.c deleted file mode 100644 index dafbd59..0000000 --- a/sysdeps/m68k/fpu/s_finite.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC finite -#include <s_isinf.c> diff --git a/sysdeps/m68k/fpu/s_finitef.c b/sysdeps/m68k/fpu/s_finitef.c deleted file mode 100644 index b81342e..0000000 --- a/sysdeps/m68k/fpu/s_finitef.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC finitef -#include <s_isinff.c> diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/fpu/s_finitel.c deleted file mode 100644 index bd346a2..0000000 --- a/sysdeps/m68k/fpu/s_finitel.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC finitel -#include <s_isinfl.c> diff --git a/sysdeps/m68k/fpu/s_floor.c b/sysdeps/m68k/fpu/s_floor.c deleted file mode 100644 index e1219c6..0000000 --- a/sysdeps/m68k/fpu/s_floor.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC floor -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_floorf.c b/sysdeps/m68k/fpu/s_floorf.c deleted file mode 100644 index f4f9b9a..0000000 --- a/sysdeps/m68k/fpu/s_floorf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC floorf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_floorl.c b/sysdeps/m68k/fpu/s_floorl.c deleted file mode 100644 index 2c1ffd7..0000000 --- a/sysdeps/m68k/fpu/s_floorl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC floorl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_fpclassifyl.c b/sysdeps/m68k/fpu/s_fpclassifyl.c deleted file mode 100644 index a8cb099..0000000 --- a/sysdeps/m68k/fpu/s_fpclassifyl.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Return classification value corresponding to argument. m68k version. - Copyright (C) 1997, 2001, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - Fixed for m68k by Andreas Schwab <schwab@suse.de>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -#include "math_private.h" - - -int -__fpclassifyl (long double x) -{ - u_int32_t ex, hx, lx; - int retval = FP_NORMAL; - - GET_LDOUBLE_WORDS (ex, hx, lx, x); - ex &= 0x7fff; - if ((ex | hx | lx) == 0) - retval = FP_ZERO; - else if (ex == 0 && (hx & 0x80000000) == 0) - retval = FP_SUBNORMAL; - else if (ex == 0x7fff) - retval = ((hx & 0x7fffffff) | lx) != 0 ? FP_NAN : FP_INFINITE; - - return retval; -} -libm_hidden_def (__fpclassifyl) diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c deleted file mode 100644 index b061412..0000000 --- a/sysdeps/m68k/fpu/s_frexp.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1996, 1997, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -#ifndef FUNC -#define FUNC frexp -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -__CONCATX(__,FUNC) (float_type value, int *expptr) -{ - float_type mantissa, exponent; - int iexponent; - unsigned long fpsr; - - __asm ("ftst%.x %1\n" - "fmove%.l %/fpsr, %0" - : "=dm" (fpsr) : "f" (value)); - if (fpsr & (7 << 24)) - { - /* Not finite or zero. */ - *expptr = 0; - return value; - } - __asm ("fgetexp%.x %1, %0" : "=f" (exponent) : "f" (value)); - iexponent = (int) exponent + 1; - *expptr = iexponent; - __asm ("fscale%.l %2, %0" - : "=f" (mantissa) - : "0" (value), "dmi" (-iexponent)); - return mantissa; -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c deleted file mode 100644 index 893b6ad..0000000 --- a/sysdeps/m68k/fpu/s_frexpf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC frexpf -#define float_type float -#include <s_frexp.c> diff --git a/sysdeps/m68k/fpu/s_frexpl.c b/sysdeps/m68k/fpu/s_frexpl.c deleted file mode 100644 index f9a5315..0000000 --- a/sysdeps/m68k/fpu/s_frexpl.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -long double -__frexpl (long double value, int *expptr) -{ - long double mantissa, exponent; - int iexponent; - unsigned long fpsr; - - __asm ("ftst%.x %1\n" - "fmove%.l %/fpsr, %0" - : "=dm" (fpsr) : "f" (value)); - if (fpsr & (7 << 24)) - { - /* Not finite or zero. */ - *expptr = 0; - return value; - } - __asm ("fgetexp%.x %1, %0" : "=f" (exponent) : "f" (value)); - iexponent = (int) exponent + 1; - *expptr = iexponent; - /* Unnormalized numbers must be handled specially, otherwise fscale - results in overflow. */ - if (iexponent <= -16384) - { - value *= 0x1p16383L; - iexponent += 16383; - } - else if (iexponent >= 16384) - { - value *= 0x1p-16383L; - iexponent -= 16383; - } - - __asm ("fscale%.l %2, %0" - : "=f" (mantissa) - : "0" (value), "dmi" (-iexponent)); - return mantissa; -} - -weak_alias (__frexpl, frexpl) diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c deleted file mode 100644 index ee1e397..0000000 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -int -s(__ilogb) (float_type x) -{ - float_type result; - unsigned long x_cond; - - x_cond = __m81_test (x); - /* We must return consistent values for zero and NaN. */ - if (x_cond & __M81_COND_ZERO) - return FP_ILOGB0; - if (x_cond & (__M81_COND_NAN | __M81_COND_INF)) - return FP_ILOGBNAN; - - __asm ("fgetexp%.x %1, %0" : "=f" (result) : "f" (x)); - return (int) result; -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (s(__ilogb), s(ilogb)) diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c deleted file mode 100644 index 4031c42..0000000 --- a/sysdeps/m68k/fpu/s_ilogbf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_ilogb.c> diff --git a/sysdeps/m68k/fpu/s_ilogbl.c b/sysdeps/m68k/fpu/s_ilogbl.c deleted file mode 100644 index 9c55a11..0000000 --- a/sysdeps/m68k/fpu/s_ilogbl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_ilogb.c> diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c deleted file mode 100644 index 5fb43ea..0000000 --- a/sysdeps/m68k/fpu/s_isinf.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 1996, 1997, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -#ifndef FUNC -#define FUNC isinf -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -int -__CONCATX(__,FUNC) (x) - float_type x; -{ - return __m81_u(__CONCATX(__,FUNC))(x); -} - -#define hidden_defx(a) hidden_def(a) -hidden_defx(__CONCATX(__,FUNC)) -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c deleted file mode 100644 index ebf4f2a..0000000 --- a/sysdeps/m68k/fpu/s_isinff.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC isinff -#endif -#define float_type float -#include <s_isinf.c> diff --git a/sysdeps/m68k/fpu/s_isinfl.c b/sysdeps/m68k/fpu/s_isinfl.c deleted file mode 100644 index 963725a..0000000 --- a/sysdeps/m68k/fpu/s_isinfl.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC isinfl -#endif -#define float_type long double -#include <s_isinf.c> diff --git a/sysdeps/m68k/fpu/s_isnan.c b/sysdeps/m68k/fpu/s_isnan.c deleted file mode 100644 index 151d6dc..0000000 --- a/sysdeps/m68k/fpu/s_isnan.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC isnan -#include <s_isinf.c> diff --git a/sysdeps/m68k/fpu/s_isnanf.c b/sysdeps/m68k/fpu/s_isnanf.c deleted file mode 100644 index 667bca7..0000000 --- a/sysdeps/m68k/fpu/s_isnanf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC isnanf -#include <s_isinff.c> diff --git a/sysdeps/m68k/fpu/s_isnanl.c b/sysdeps/m68k/fpu/s_isnanl.c deleted file mode 100644 index bbacb64..0000000 --- a/sysdeps/m68k/fpu/s_isnanl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC isnanl -#include <s_isinfl.c> diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c deleted file mode 100644 index 8f24429..0000000 --- a/sysdeps/m68k/fpu/s_llrint.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Round argument to nearest integral value according to current rounding - direction. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" -#include "mathimpl.h" - -long long int -__llrint (double x) -{ - int32_t e; - u_int32_t h, l, s; - long long int result; - - x = __m81_u(__rint) (x); - - /* We could use __fixxfdi from libgcc, but here we can take advantage of - the known floating point format. */ - EXTRACT_WORDS (h, l, x); - - e = ((h >> 20) & 0x7ff) - 0x3ff; - if (e < 0) - return 0; - s = h; - h &= 0xfffff; - h |= 0x100000; - - if (e < 63) - { - if (e > 52) - { - h <<= e - 52; - h |= l >> (84 - e); - l <<= e - 52; - result = ((long long int) h << 32) | l; - } - else if (e > 20) - { - l >>= 52 - e; - l |= h << (e - 20); - h >>= 52 - e; - result = ((long long int) h << 32) | l; - } - else - result = h >> (20 - e); - if (s & 0x80000000) - result = -result; - } - else - /* The number is too large or not finite. The standard leaves it - undefined what to return when the number is too large to fit in a - `long long int'. */ - result = -1LL; - - return result; -} - -weak_alias (__llrint, llrint) diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c deleted file mode 100644 index bd573b2..0000000 --- a/sysdeps/m68k/fpu/s_llrintf.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Round argument to nearest integral value according to current rounding - direction. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" -#include "mathimpl.h" - -long long int -__llrintf (float x) -{ - int32_t e; - u_int32_t i, s; - long long int result; - - x = __m81_u(__rintf) (x); - - GET_FLOAT_WORD (i, x); - - e = ((i >> 23) & 0xff) - 0x7f; - if (e < 0) - return 0; - s = i; - i &= 0x7fffff; - i |= 0x800000; - - if (e < 63) - { - if (e > 55) - result = (long long int) (i << (e - 55)) << 32; - else if (e > 31) - result = (((long long int) (i >> (55 - e)) << 32) | (i << (e - 23))); - else if (e > 23) - result = i << (e - 23); - else - result = i >> (23 - e); - if (s & 0x80000000) - result = -result; - } - else - /* The number is too large or not finite. The standard leaves it - undefined what to return when the number is too large to fit in a - `long long int'. */ - result = -1LL; - - return result; -} - -weak_alias (__llrintf, llrintf) diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c deleted file mode 100644 index d749f35..0000000 --- a/sysdeps/m68k/fpu/s_llrintl.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Round argument to nearest integral value according to current rounding - direction. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "math_private.h" -#include "mathimpl.h" - -long long int -__llrintl (long double x) -{ - int32_t e, s; - u_int32_t h, l; - long long int result; - - x = __m81_u(__rintl) (x); - - GET_LDOUBLE_WORDS (e, h, l, x); - - s = e; - e = (e & 0x7fff) - 0x3fff; - if (e < 0) - return 0; - - if (e < 63) - { - if (e > 31) - { - l >>= 63 - e; - l |= h << (e - 31); - h >>= 63 - e; - result = ((long long int) h << 32) | l; - } - else - result = h >> (31 - e); - if (s & 0x8000) - result = -result; - } - else - /* The number is too large or not finite. The standard leaves it - undefined what to return when the number is too large to fit in a - `long long int'. */ - result = -1LL; - - return result; -} - -weak_alias (__llrintl, llrintl) diff --git a/sysdeps/m68k/fpu/s_log1p.c b/sysdeps/m68k/fpu/s_log1p.c deleted file mode 100644 index 1840ced..0000000 --- a/sysdeps/m68k/fpu/s_log1p.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log1p -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_log1pf.c b/sysdeps/m68k/fpu/s_log1pf.c deleted file mode 100644 index cb7235a..0000000 --- a/sysdeps/m68k/fpu/s_log1pf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log1pf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_log1pl.c b/sysdeps/m68k/fpu/s_log1pl.c deleted file mode 100644 index 8dbef89..0000000 --- a/sysdeps/m68k/fpu/s_log1pl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log1pl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c deleted file mode 100644 index 0a23f29..0000000 --- a/sysdeps/m68k/fpu/s_lrint.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Round argument to nearest integral value according to current rounding - direction. - Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -#ifndef suffix -#define suffix /*empty*/ -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) - -long int -CONCATX(__lrint,suffix) (float_type x) -{ - return __m81_u(CONCATX(__lrint,suffix)) (x); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (CONCATX(__lrint,suffix), CONCATX(lrint,suffix)) diff --git a/sysdeps/m68k/fpu/s_lrintf.c b/sysdeps/m68k/fpu/s_lrintf.c deleted file mode 100644 index 44924cb..0000000 --- a/sysdeps/m68k/fpu/s_lrintf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define suffix f -#define float_type float -#include <s_lrint.c> diff --git a/sysdeps/m68k/fpu/s_lrintl.c b/sysdeps/m68k/fpu/s_lrintl.c deleted file mode 100644 index cd0bd23..0000000 --- a/sysdeps/m68k/fpu/s_lrintl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define suffix l -#define float_type long double -#include <s_lrint.c> diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c deleted file mode 100644 index 2f5a83d..0000000 --- a/sysdeps/m68k/fpu/s_modf.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -float_type -s(__modf) (float_type x, float_type *iptr) -{ - float_type x_int, result; - unsigned long x_cond; - - __asm ("fintrz%.x %1, %0" : "=f" (x_int) : "f" (x)); - *iptr = x_int; - x_cond = __m81_test (x); - if (x_cond & __M81_COND_INF) - { - result = 0; - if (x_cond & __M81_COND_NEG) - result = -result; - } - else if (x_cond & __M81_COND_ZERO) - result = x; - else - result = x - x_int; - return result; -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx(s(__modf), s(modf)) diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c deleted file mode 100644 index 0c44d7c..0000000 --- a/sysdeps/m68k/fpu/s_modff.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_modf.c> diff --git a/sysdeps/m68k/fpu/s_modfl.c b/sysdeps/m68k/fpu/s_modfl.c deleted file mode 100644 index c7075b3..0000000 --- a/sysdeps/m68k/fpu/s_modfl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_modf.c> diff --git a/sysdeps/m68k/fpu/s_nearbyint.c b/sysdeps/m68k/fpu/s_nearbyint.c deleted file mode 100644 index b87f5e2..0000000 --- a/sysdeps/m68k/fpu/s_nearbyint.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC nearbyint -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_nearbyintf.c b/sysdeps/m68k/fpu/s_nearbyintf.c deleted file mode 100644 index 70d08ab..0000000 --- a/sysdeps/m68k/fpu/s_nearbyintf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC nearbyintf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_nearbyintl.c b/sysdeps/m68k/fpu/s_nearbyintl.c deleted file mode 100644 index 230cd77..0000000 --- a/sysdeps/m68k/fpu/s_nearbyintl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC nearbyintl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_nextafterl.c b/sysdeps/m68k/fpu/s_nextafterl.c deleted file mode 100644 index 70ab5a4..0000000 --- a/sysdeps/m68k/fpu/s_nextafterl.c +++ /dev/null @@ -1,109 +0,0 @@ -/* s_nextafterl.c -- long double version of s_nextafter.c. - * Conversion to long double by Ulrich Drepper, - * Cygnus Support, drepper@cygnus.com. - * Fixed for m68k by Andreas Schwab <schwab@suse.de>. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: $"; -#endif - -/* IEEE functions - * nextafterl(x,y) - * return the next machine floating-point number of x in the - * direction toward y. - * Special cases: - */ - -#include "math.h" -#include "math_private.h" - -#ifdef __STDC__ - long double __nextafterl(long double x, long double y) -#else - long double __nextafterl(x,y) - long double x,y; -#endif -{ - int32_t ix,iy,esx,esy; - u_int32_t hx,hy,lx,ly; - - GET_LDOUBLE_WORDS(esx,hx,lx,x); - GET_LDOUBLE_WORDS(esy,hy,ly,y); - ix = esx&0x7fff; /* |x| */ - iy = esy&0x7fff; /* |y| */ - - if(((ix==0x7fff)&&((hx&0x7fffffff)|lx)!=0) || /* x is nan */ - ((iy==0x7fff)&&((hy&0x7fffffff)|ly)!=0)) /* y is nan */ - return x+y; - if(x==y) return y; /* x=y, return y */ - if((ix|hx|lx)==0) { /* x == 0 */ - SET_LDOUBLE_WORDS(x,esy&0x8000,0,1);/* return +-minsubnormal */ - y = x*x; - if(y==x) return y; else return x; /* raise underflow flag */ - } - if(esx>=0) { /* x > 0 */ - if(esx>esy||((esx==esy) && (hx>hy||((hx==hy)&&(lx>ly))))) { - /* x > y, x -= ulp */ - if(lx==0) { - if (ix != 0 && hx == 0x80000000) hx = 0; - if (hx==0) esx -= 1; - hx -= 1; - } - lx -= 1; - } else { /* x < y, x += ulp */ - lx += 1; - if(lx==0) { - hx += 1; - if (hx==0) { - hx = 0x80000000; - esx += 1; - } - } - } - } else { /* x < 0 */ - if(esy>=0||esx>esy||((esx==esy) && (hx>hy||((hx==hy)&&(lx>ly))))){ - /* x < y, x -= ulp */ - if(lx==0) { - if (ix != 0 && hx == 0x80000000) hx = 0; - if (hx==0) esx -= 1; - hx -= 1; - } - lx -= 1; - } else { /* x > y, x += ulp */ - lx += 1; - if(lx==0) { - hx += 1; - if (hx==0) { - hx = 0x80000000; - esx += 1; - } - } - } - } - esy = esx&0x7fff; - if(esy==0x7fff) return x+x; /* overflow */ - if(esy==0 && (hx & 0x80000000) == 0) { /* underflow */ - y = x*x; - if(y!=x) { /* raise underflow flag */ - SET_LDOUBLE_WORDS(y,esx,hx,lx); - return y; - } - } - SET_LDOUBLE_WORDS(x,esx,hx,lx); - return x; -} -weak_alias (__nextafterl, nextafterl) -strong_alias (__nextafterl, __nexttowardl) -weak_alias (__nextafterl, nexttowardl) diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c deleted file mode 100644 index 5b65f85..0000000 --- a/sysdeps/m68k/fpu/s_remquo.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Compute remainder and a congruent to the quotient. m68k fpu version - Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) - -float_type -s(__remquo) (float_type x, float_type y, int *quo) -{ - float_type result; - int cquo, fpsr; - - __asm ("frem%.x %2,%0\n\tfmove%.l %/fpsr,%1" - : "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x)); - cquo = (fpsr >> 16) & 0x7f; - if (fpsr & (1 << 23)) - cquo = -cquo; - *quo = cquo; - return result; -} -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (s(__remquo), s(remquo)) diff --git a/sysdeps/m68k/fpu/s_remquof.c b/sysdeps/m68k/fpu/s_remquof.c deleted file mode 100644 index 8a292fc..0000000 --- a/sysdeps/m68k/fpu/s_remquof.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_remquo.c> diff --git a/sysdeps/m68k/fpu/s_remquol.c b/sysdeps/m68k/fpu/s_remquol.c deleted file mode 100644 index d236cfd..0000000 --- a/sysdeps/m68k/fpu/s_remquol.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_remquo.c> diff --git a/sysdeps/m68k/fpu/s_rint.c b/sysdeps/m68k/fpu/s_rint.c deleted file mode 100644 index f0f18c7..0000000 --- a/sysdeps/m68k/fpu/s_rint.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC rint -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_rintf.c b/sysdeps/m68k/fpu/s_rintf.c deleted file mode 100644 index 4e00cab..0000000 --- a/sysdeps/m68k/fpu/s_rintf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC rintf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_rintl.c b/sysdeps/m68k/fpu/s_rintl.c deleted file mode 100644 index 305667b..0000000 --- a/sysdeps/m68k/fpu/s_rintl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC rintl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_scalbln.c b/sysdeps/m68k/fpu/s_scalbln.c deleted file mode 100644 index 1009713..0000000 --- a/sysdeps/m68k/fpu/s_scalbln.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Nothing to do. This function is the same as scalbn. So we define an - alias. */ diff --git a/sysdeps/m68k/fpu/s_scalblnf.c b/sysdeps/m68k/fpu/s_scalblnf.c deleted file mode 100644 index 5e558c3..0000000 --- a/sysdeps/m68k/fpu/s_scalblnf.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Nothing to do. This function is the same as scalbnf. So we define an - alias. */ diff --git a/sysdeps/m68k/fpu/s_scalblnl.c b/sysdeps/m68k/fpu/s_scalblnl.c deleted file mode 100644 index cda2ec1..0000000 --- a/sysdeps/m68k/fpu/s_scalblnl.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Nothing to do. This function is the same as scalbnl. So we define an - alias. */ diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c deleted file mode 100644 index d76d94d..0000000 --- a/sysdeps/m68k/fpu/s_scalbn.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1996, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define scalbln __no_scalbln_decl -#define scalblnf __no_scalblnf_decl -#define scalblnl __no_scalblnl_decl -#define __scalbln __no__scalbln_decl -#define __scalblnf __no__scalblnf_decl -#define __scalblnl __no__scalblnl_decl -#include <math.h> -#undef scalbln -#undef scalblnf -#undef scalblnl -#undef __scalbln -#undef __scalblnf -#undef __scalblnl - -#ifndef suffix -#define suffix /*empty*/ -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -__CONCATX(__scalbn,suffix) (x, exp) - float_type x; - int exp; -{ - return __m81_u(__CONCATX(__scalbn,suffix))(x, exp); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -#define strong_aliasx(a,b) strong_alias(a,b) -weak_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(scalbn,suffix)) -strong_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(__scalbln,suffix)) -weak_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(scalbln,suffix)) diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c deleted file mode 100644 index 5479718..0000000 --- a/sysdeps/m68k/fpu/s_scalbnf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define suffix f -#define float_type float -#include <s_scalbn.c> diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c deleted file mode 100644 index 874bafb..0000000 --- a/sysdeps/m68k/fpu/s_scalbnl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define suffix l -#define float_type long double -#include <s_scalbn.c> diff --git a/sysdeps/m68k/fpu/s_significand.c b/sysdeps/m68k/fpu/s_significand.c deleted file mode 100644 index 34d4ea3..0000000 --- a/sysdeps/m68k/fpu/s_significand.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC significand -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_significandf.c b/sysdeps/m68k/fpu/s_significandf.c deleted file mode 100644 index 4e769ca..0000000 --- a/sysdeps/m68k/fpu/s_significandf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC significandf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_significandl.c b/sysdeps/m68k/fpu/s_significandl.c deleted file mode 100644 index 8c6fc7e..0000000 --- a/sysdeps/m68k/fpu/s_significandl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC significandl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_sin.c b/sysdeps/m68k/fpu/s_sin.c deleted file mode 100644 index 0d4abdb..0000000 --- a/sysdeps/m68k/fpu/s_sin.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC sin -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/fpu/s_sincos.c deleted file mode 100644 index 5df4a5a..0000000 --- a/sysdeps/m68k/fpu/s_sincos.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -#ifndef FUNC -#define FUNC sincos -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) - -void -CONCATX(__,FUNC) (x, sinx, cosx) - float_type x, *sinx, *cosx; -{ - __m81_u(CONCATX(__,FUNC))(x, sinx, cosx); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_sincosf.c b/sysdeps/m68k/fpu/s_sincosf.c deleted file mode 100644 index 7ee2ec6..0000000 --- a/sysdeps/m68k/fpu/s_sincosf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC sincosf -#define float_type float -#include <s_sincos.c> diff --git a/sysdeps/m68k/fpu/s_sincosl.c b/sysdeps/m68k/fpu/s_sincosl.c deleted file mode 100644 index f998cc0..0000000 --- a/sysdeps/m68k/fpu/s_sincosl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC sincosl -#define float_type long double -#include <s_sincos.c> diff --git a/sysdeps/m68k/fpu/s_sinf.c b/sysdeps/m68k/fpu/s_sinf.c deleted file mode 100644 index 9b23d48..0000000 --- a/sysdeps/m68k/fpu/s_sinf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC sinf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_sinl.c b/sysdeps/m68k/fpu/s_sinl.c deleted file mode 100644 index 9ac532c..0000000 --- a/sysdeps/m68k/fpu/s_sinl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC sinl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_tan.c b/sysdeps/m68k/fpu/s_tan.c deleted file mode 100644 index ca7fb0e..0000000 --- a/sysdeps/m68k/fpu/s_tan.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tan -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_tanf.c b/sysdeps/m68k/fpu/s_tanf.c deleted file mode 100644 index 95fe9c7..0000000 --- a/sysdeps/m68k/fpu/s_tanf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tanf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_tanh.c b/sysdeps/m68k/fpu/s_tanh.c deleted file mode 100644 index ac2e7db..0000000 --- a/sysdeps/m68k/fpu/s_tanh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tanh -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_tanhf.c b/sysdeps/m68k/fpu/s_tanhf.c deleted file mode 100644 index 1addaae..0000000 --- a/sysdeps/m68k/fpu/s_tanhf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tanhf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_tanhl.c b/sysdeps/m68k/fpu/s_tanhl.c deleted file mode 100644 index 6e99791..0000000 --- a/sysdeps/m68k/fpu/s_tanhl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tanhl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_tanl.c b/sysdeps/m68k/fpu/s_tanl.c deleted file mode 100644 index 64fcb54..0000000 --- a/sysdeps/m68k/fpu/s_tanl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tanl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/s_trunc.c b/sysdeps/m68k/fpu/s_trunc.c deleted file mode 100644 index 96f29a7..0000000 --- a/sysdeps/m68k/fpu/s_trunc.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC trunc -#include <s_atan.c> diff --git a/sysdeps/m68k/fpu/s_truncf.c b/sysdeps/m68k/fpu/s_truncf.c deleted file mode 100644 index 44dca74..0000000 --- a/sysdeps/m68k/fpu/s_truncf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC truncf -#include <s_atanf.c> diff --git a/sysdeps/m68k/fpu/s_truncl.c b/sysdeps/m68k/fpu/s_truncl.c deleted file mode 100644 index 8d35777..0000000 --- a/sysdeps/m68k/fpu/s_truncl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC truncl -#include <s_atanl.c> diff --git a/sysdeps/m68k/fpu/sincos32.c b/sysdeps/m68k/fpu/sincos32.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/sincos32.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/slowexp.c b/sysdeps/m68k/fpu/slowexp.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/slowexp.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/slowpow.c b/sysdeps/m68k/fpu/slowpow.c deleted file mode 100644 index 1cc8931..0000000 --- a/sysdeps/m68k/fpu/slowpow.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h deleted file mode 100644 index c5a0f71..0000000 --- a/sysdeps/m68k/fpu/switch/68881-sw.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _68881_SWITCH_H - -#define _68881_SWITCH_H 1 -#include <sys/cdefs.h> - -/* This is the format of the data at the code label for a function which - wants to switch depending on whether or not a 68881 is present. - - Initially, `insn' is a `jsr' instruction, and `target' is __68881_switch. - The first time such a function is called, __68881_switch determines whether - or not a 68881 is present, and modifies the function accordingly. - Then `insn' is a `jmp' instruction, and `target' is the value of `fpu' - if there is 68881, or the value of `soft' if not. */ - -struct switch_caller - { - unsigned short int insn; /* The `jsr' or `jmp' instruction. */ - void *target; /* The target of the instruction. */ - void *soft; /* The address of the soft function. */ - void *fpu; /* The address of the 68881 function. */ - }; - -/* These are opcodes (values for `insn', above) for `jmp' and `jsr' - instructions, respectively, to 32-bit absolute addresses. */ -#define JMP 0x4ef9 -#define JSR 0x4eb9 - - -/* Function to determine whether or not a 68881 is available, - and modify its caller (which must be a `struct switch_caller', above, - in data space) to use the appropriate version. */ -extern void __68881_switch (int __dummy) __THROW; - - -/* Define FUNCTION as a `struct switch_caller' which will call - `__FUNCTION_68881' if a 68881 is present, and `__FUNCTION_soft' if not. -#define switching_function(FUNCTION) \ - struct switch_caller FUNCTION = \ - { \ - JSR, (__ptr_t) __68881_switch, \ - __CONCAT(__CONCAT(__,FUNCTION),_soft), \ - __CONCAT(__CONCAT(__,FUNCTION),_68881) \ - } - - -#endif /* 68881-switch.h */ diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile deleted file mode 100644 index c041071..0000000 --- a/sysdeps/m68k/fpu/switch/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 1991, 1992, 1997 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, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. - -ifeq ($(subdir),math) - -sysdep_routines := $(sysdep_routines) switch - -# Find all the sources that have 68881 versions. -+68881-sources := \ - $(notdir $(wildcard $(addprefix $(filter %/fpu,$(sysdirs)),$(sources)))) - -# Sysdep directories other than fpu and fpu/switch (this one). -+non68881-dirs := $(filter-out %/fpu %/fpu/switch,$(+sysdep_dirs)) - -# Get a non-68881 version of the target. -+non68881-version = $(firstword $(wildcard $(addsuffix /$@,$(+non68881-dirs)))) - -# Directory containing 68881 sources. -+68881-dir := $(filter %/fpu,$(+sysdep_dirs)) - -# For all the files that have 68881 versions and don't exist already in -# the source directory (math), automatically make ones that switch between -# 68881 and soft versions. -$(addprefix $(objpfx), \ - $(filter-out $(wildcard $(+68881-sources)),$(+68881-sources))): - (echo '#include <68881-sw.h>' ;\ - echo '#define $* __$*_68881' ;\ - echo '#include <$(+68881-dir)/$@>' ;\ - echo '#undef $*' ;\ - echo '#define $* __$*_soft' ;\ - echo '#include <$(non68881-version)>' ;\ - echo '#undef $*' ;\ - echo 'switching_function($*);') > $@-tmp - mv $@-tmp $@ - -endif diff --git a/sysdeps/m68k/fpu/switch/bits/mathinline.h b/sysdeps/m68k/fpu/switch/bits/mathinline.h deleted file mode 100644 index c0f6966..0000000 --- a/sysdeps/m68k/fpu/switch/bits/mathinline.h +++ /dev/null @@ -1 +0,0 @@ -/* We don't want any inlines when we might not have a 68881. */ diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c deleted file mode 100644 index e055817..0000000 --- a/sysdeps/m68k/fpu/switch/switch.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <signal.h> -#include <68881-sw.h> - - -/* The signal that is sent when a 68881 instruction - is executed and there is no 68881. */ -#ifndef TRAPSIG -#define TRAPSIG SIGILL -#endif - -/* Zero if no 68881, one if we have a 68881, or -1 if we don't know yet. */ -static int have_fpu = -1; - - -/* Signal handler for the trap that happens if we don't have a 68881. */ -static void -trap (sig) - int sig; -{ - have_fpu = 0; -} - -/* This function is called by functions that want to switch. - The calling function must be a `struct switch_caller' in data space. - It determines whether a 68881 is present, and modifies its caller - to be a static jump to either the 68881 version or the soft version. - It then returns into the function it has chosen to do the work. */ -void -__68881_switch (dummy) - int dummy; -{ - void **return_address_location = &((void **) &dummy)[-1]; - struct switch_caller *const caller - = (struct switch_caller *) (((short int *) *return_address_location) - 1); - - if (have_fpu < 0) - { - /* Figure out whether or not we have a 68881. */ - __sighandler_t handler = signal (TRAPSIG, trap); - if (handler == SIG_ERR) - /* We can't figure it out, so assume we don't have a 68881. - This assumption will never cause us any problems other than - lost performance, while the reverse assumption could cause - the program to crash. */ - have_fpu = 0; - else - { - /* We set `have_fpu' to nonzero, and then execute a 68881 - no-op instruction. If we have a 68881, this will do nothing. - If we don't have one, this will trap and the signal handler - will clear `have_fpu'. */ - have_fpu = 1; - asm ("fnop"); - - /* Restore the old signal handler. */ - (void) signal (TRAPSIG, handler); - } - } - - /* Modify the caller to be a jump to the appropriate address. */ - caller->insn = JMP; - caller->target = have_fpu ? caller->fpu : caller->soft; - - /* Make the address we will return to be the target we have chosen. - Our return will match the `jsr' done by the caller we have - just modified, and it will be just as if that had instead - been a `jmp' to the new target. */ - *return_address_location = caller->target; -} diff --git a/sysdeps/m68k/fpu/t_exp.c b/sysdeps/m68k/fpu/t_exp.c deleted file mode 100644 index fd37963..0000000 --- a/sysdeps/m68k/fpu/t_exp.c +++ /dev/null @@ -1 +0,0 @@ -/* Empty. Not needed. */ diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h deleted file mode 100644 index 86358e6..0000000 --- a/sysdeps/m68k/fpu_control.h +++ /dev/null @@ -1,101 +0,0 @@ -/* 68k FPU control word definitions. - Copyright (C) 1996, 1997, 1998 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FPU_CONTROL_H -#define _FPU_CONTROL_H - -/* - * Motorola floating point control register bits. - * - * 31-16 -> reserved (read as 0, ignored on write) - * 15 -> enable trap for BSUN exception - * 14 -> enable trap for SNAN exception - * 13 -> enable trap for OPERR exception - * 12 -> enable trap for OVFL exception - * 11 -> enable trap for UNFL exception - * 10 -> enable trap for DZ exception - * 9 -> enable trap for INEX2 exception - * 8 -> enable trap for INEX1 exception - * 7-6 -> Precision Control - * 5-4 -> Rounding Control - * 3-0 -> zero (read as 0, write as 0) - * - * - * Precision Control: - * 00 - round to extended precision - * 01 - round to single precision - * 10 - round to double precision - * 11 - undefined - * - * Rounding Control: - * 00 - rounding to nearest (RN) - * 01 - rounding toward zero (RZ) - * 10 - rounding (down)toward minus infinity (RM) - * 11 - rounding (up) toward plus infinity (RP) - * - * The hardware default is 0x0000. I choose 0x5400. - */ - -#include <features.h> - -/* masking of interrupts */ -#define _FPU_MASK_BSUN 0x8000 -#define _FPU_MASK_SNAN 0x4000 -#define _FPU_MASK_OPERR 0x2000 -#define _FPU_MASK_OVFL 0x1000 -#define _FPU_MASK_UNFL 0x0800 -#define _FPU_MASK_DZ 0x0400 -#define _FPU_MASK_INEX1 0x0200 -#define _FPU_MASK_INEX2 0x0100 - -/* precision control */ -#define _FPU_EXTENDED 0x00 /* RECOMMENDED */ -#define _FPU_DOUBLE 0x80 -#define _FPU_SINGLE 0x40 /* DO NOT USE */ - -/* rounding control */ -#define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */ -#define _FPU_RC_ZERO 0x10 -#define _FPU_RC_DOWN 0x20 -#define _FPU_RC_UP 0x30 - -#define _FPU_RESERVED 0xFFFF000F /* Reserved bits in fpucr */ - - -/* Now two recommended fpucr */ - -/* The fdlibm code requires no interrupts for exceptions. Don't - change the rounding mode, it would break long double I/O! */ -#define _FPU_DEFAULT 0x00000000 - -/* IEEE: same as above, but exceptions. We must make it non-zero so - that __setfpucw works. This bit will be ignored. */ -#define _FPU_IEEE 0x00000001 - -/* Type of the control word. */ -typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); - -/* Macros for accessing the hardware control word. */ -#define _FPU_GETCW(cw) __asm__ ("fmove%.l %!, %0" : "=dm" (cw)) -#define _FPU_SETCW(cw) __asm__ volatile ("fmove%.l %0, %!" : : "dm" (cw)) - -/* Default control word set at startup. */ -extern fpu_control_t __fpu_control; - -#endif /* _M68K_FPU_CONTROL_H */ diff --git a/sysdeps/m68k/gccframe.h b/sysdeps/m68k/gccframe.h deleted file mode 100644 index 452f53f..0000000 --- a/sysdeps/m68k/gccframe.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Definition of object in frame unwind info. m68k version. - Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define FIRST_PSEUDO_REGISTER 24 - -#include <sysdeps/generic/gccframe.h> diff --git a/sysdeps/m68k/jmpbuf-unwind.h b/sysdeps/m68k/jmpbuf-unwind.h deleted file mode 100644 index 3490c79..0000000 --- a/sysdeps/m68k/jmpbuf-unwind.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Examine __jmp_buf for unwinding frames. m68k version. - Copyright (C) 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <setjmp.h> - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle ((jmpbuf)->__sp)) diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S deleted file mode 100644 index 434b344..0000000 --- a/sysdeps/m68k/lshift.S +++ /dev/null @@ -1,147 +0,0 @@ -/* mc68020 __mpn_lshift -- Shift left a low-level natural-number integer. - -Copyright (C) 1996, 1998 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -/* - INPUT PARAMETERS - res_ptr (sp + 4) - s_ptr (sp + 8) - s_size (sp + 16) - cnt (sp + 12) -*/ - -#include "sysdep.h" -#include "asm-syntax.h" - -#define res_ptr a1 -#define s_ptr a0 -#define s_size d6 -#define cnt d4 - - TEXT -ENTRY(__mpn_lshift) - -/* Save used registers on the stack. */ - moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) - -/* Copy the arguments to registers. */ - movel MEM_DISP(sp,28),R(res_ptr) - movel MEM_DISP(sp,32),R(s_ptr) - movel MEM_DISP(sp,36),R(s_size) - movel MEM_DISP(sp,40),R(cnt) - - moveql #1,R(d5) - cmpl R(d5),R(cnt) - bne L(Lnormal) - cmpl R(s_ptr),R(res_ptr) - bls L(Lspecial) /* jump if s_ptr >= res_ptr */ -#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) - lea MEM_INDX1(s_ptr,s_size,l,4),R(a2) -#else /* not mc68020 */ - movel R(s_size),R(d0) - asll #2,R(d0) - lea MEM_INDX(s_ptr,d0,l),R(a2) -#endif - cmpl R(res_ptr),R(a2) - bls L(Lspecial) /* jump if res_ptr >= s_ptr + s_size */ - -L(Lnormal:) - moveql #32,R(d5) - subl R(cnt),R(d5) - -#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) - lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr) - lea MEM_INDX1(res_ptr,s_size,l,4),R(res_ptr) -#else /* not mc68000 */ - movel R(s_size),R(d0) - asll #2,R(d0) - addl R(s_size),R(s_ptr) - addl R(s_size),R(res_ptr) -#endif - movel MEM_PREDEC(s_ptr),R(d2) - movel R(d2),R(d0) - lsrl R(d5),R(d0) /* compute carry limb */ - - lsll R(cnt),R(d2) - movel R(d2),R(d1) - subql #1,R(s_size) - beq L(Lend) - lsrl #1,R(s_size) - bcs L(L1) - subql #1,R(s_size) - -L(Loop:) - movel MEM_PREDEC(s_ptr),R(d2) - movel R(d2),R(d3) - lsrl R(d5),R(d3) - orl R(d3),R(d1) - movel R(d1),MEM_PREDEC(res_ptr) - lsll R(cnt),R(d2) -L(L1:) - movel MEM_PREDEC(s_ptr),R(d1) - movel R(d1),R(d3) - lsrl R(d5),R(d3) - orl R(d3),R(d2) - movel R(d2),MEM_PREDEC(res_ptr) - lsll R(cnt),R(d1) - - dbf R(s_size),L(Loop) - subl #0x10000,R(s_size) - bcc L(Loop) - -L(Lend:) - movel R(d1),MEM_PREDEC(res_ptr) /* store least significant limb */ - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) - rts - -/* We loop from least significant end of the arrays, which is only - permissible if the source and destination don't overlap, since the - function is documented to work for overlapping source and destination. */ - -L(Lspecial:) - clrl R(d0) /* initialize carry */ - eorw #1,R(s_size) - lsrl #1,R(s_size) - bcc L(LL1) - subql #1,R(s_size) - -L(LLoop:) - movel MEM_POSTINC(s_ptr),R(d2) - addxl R(d2),R(d2) - movel R(d2),MEM_POSTINC(res_ptr) -L(LL1:) - movel MEM_POSTINC(s_ptr),R(d2) - addxl R(d2),R(d2) - movel R(d2),MEM_POSTINC(res_ptr) - - dbf R(s_size),L(LLoop) - addxl R(d0),R(d0) /* save cy in lsb */ - subl #0x10000,R(s_size) - bcs L(LLend) - lsrl #1,R(d0) /* restore cy */ - bra L(LLoop) - -L(LLend:) -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) - rts -END(__mpn_lshift) diff --git a/sysdeps/m68k/m68020/Makefile b/sysdeps/m68k/m68020/Makefile deleted file mode 100644 index b176354..0000000 --- a/sysdeps/m68k/m68020/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),db2) -CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_MC68020_GCC=1 -endif diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S deleted file mode 100644 index 05d1d8a..0000000 --- a/sysdeps/m68k/m68020/addmul_1.S +++ /dev/null @@ -1,80 +0,0 @@ -/* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add - the result to a second limb vector. - -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -/* - INPUT PARAMETERS - res_ptr (sp + 4) - s1_ptr (sp + 8) - s1_size (sp + 12) - s2_limb (sp + 16) -*/ - -#include "sysdep.h" -#include "asm-syntax.h" - - TEXT -ENTRY(__mpn_addmul_1) - -#define res_ptr a0 -#define s1_ptr a1 -#define s1_size d2 -#define s2_limb d4 - -/* Save used registers on the stack. */ - moveml R(d2)-R(d5),MEM_PREDEC(sp) - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,20),R(res_ptr) - movel MEM_DISP(sp,24),R(s1_ptr) - movel MEM_DISP(sp,28),R(s1_size) - movel MEM_DISP(sp,32),R(s2_limb) - - eorw #1,R(s1_size) - clrl R(d1) - clrl R(d5) - lsrl #1,R(s1_size) - bcc L(L1) - subql #1,R(s1_size) - subl R(d0),R(d0) /* (d0,cy) <= (0,0) */ - -L(Loop:) - movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d1):R(d3) - addxl R(d0),R(d3) - addxl R(d5),R(d1) - addl R(d3),MEM_POSTINC(res_ptr) -L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d0):R(d3) - addxl R(d1),R(d3) - addxl R(d5),R(d0) - addl R(d3),MEM_POSTINC(res_ptr) - - dbf R(s1_size),L(Loop) - addxl R(d5),R(d0) - subl #0x10000,R(s1_size) - bcc L(Loop) - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d5) - - rts -END(__mpn_addmul_1) diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h deleted file mode 100644 index 6b6db71..0000000 --- a/sysdeps/m68k/m68020/bits/atomic.h +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@suse.de>, 2003. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <stdint.h> - - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int16_t atomic16_t; -typedef uint16_t uatomic16_t; -typedef int_fast16_t atomic_fast16_t; -typedef uint_fast16_t uatomic_fast16_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - -#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ - ({ __typeof (*(mem)) __ret; \ - __asm __volatile ("cas%.b %0,%2,%1" \ - : "=d" (__ret), "+m" (*(mem)) \ - : "d" (newval), "0" (oldval)); \ - __ret; }) - -#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ - ({ __typeof (*(mem)) __ret; \ - __asm __volatile ("cas%.w %0,%2,%1" \ - : "=d" (__ret), "+m" (*(mem)) \ - : "d" (newval), "0" (oldval)); \ - __ret; }) - -#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ - ({ __typeof (*(mem)) __ret; \ - __asm __volatile ("cas%.l %0,%2,%1" \ - : "=d" (__ret), "+m" (*(mem)) \ - : "d" (newval), "0" (oldval)); \ - __ret; }) - -# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ - ({ __typeof (*(mem)) __ret; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ("cas2%.l %0:%R0,%1:%R1,(%2):(%3)" \ - : "=d" (__ret) \ - : "d" (newval), "r" (__memp), \ - "r" ((char *) __memp + 4), "0" (oldval) \ - : "memory"); \ - __ret; }) - -#define atomic_exchange_acq(mem, newvalue) \ - ({ __typeof (*(mem)) __result = *(mem); \ - if (sizeof (*(mem)) == 1) \ - __asm __volatile ("1: cas%.b %0,%2,%1;" \ - " jbne 1b" \ - : "=d" (__result), "+m" (*(mem)) \ - : "d" (newvalue), "0" (__result)); \ - else if (sizeof (*(mem)) == 2) \ - __asm __volatile ("1: cas%.w %0,%2,%1;" \ - " jbne 1b" \ - : "=d" (__result), "+m" (*(mem)) \ - : "d" (newvalue), "0" (__result)); \ - else if (sizeof (*(mem)) == 4) \ - __asm __volatile ("1: cas%.l %0,%2,%1;" \ - " jbne 1b" \ - : "=d" (__result), "+m" (*(mem)) \ - : "d" (newvalue), "0" (__result)); \ - else \ - { \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ("1: cas2%.l %0:%R0,%1:%R1,(%2):(%3);" \ - " jbne 1b" \ - : "=d" (__result) \ - : "d" (newvalue), "r" (__memp), \ - "r" ((char *) __memp + 4), "0" (__result) \ - : "memory"); \ - } \ - __result; }) - -#define atomic_exchange_and_add(mem, value) \ - ({ __typeof (*(mem)) __result = *(mem); \ - __typeof (*(mem)) __temp; \ - if (sizeof (*(mem)) == 1) \ - __asm __volatile ("1: move%.b %0,%2;" \ - " add%.b %3,%2;" \ - " cas%.b %0,%2,%1;" \ - " jbne 1b" \ - : "=d" (__result), "+m" (*(mem)), \ - "=&d" (__temp) \ - : "d" (value), "0" (__result)); \ - else if (sizeof (*(mem)) == 2) \ - __asm __volatile ("1: move%.w %0,%2;" \ - " add%.w %3,%2;" \ - " cas%.w %0,%2,%1;" \ - " jbne 1b" \ - : "=d" (__result), "+m" (*(mem)), \ - "=&d" (__temp) \ - : "d" (value), "0" (__result)); \ - else if (sizeof (*(mem)) == 4) \ - __asm __volatile ("1: move%.l %0,%2;" \ - " add%.l %3,%2;" \ - " cas%.l %0,%2,%1;" \ - " jbne 1b" \ - : "=d" (__result), "+m" (*(mem)), \ - "=&d" (__temp) \ - : "d" (value), "0" (__result)); \ - else \ - { \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ("1: move%.l %0,%1;" \ - " move%.l %R0,%R1;" \ - " add%.l %2,%1;" \ - " addx%.l %R2,%R1;" \ - " cas2%.l %0:%R0,%1:%R1,(%3):(%4);" \ - " jbne 1b" \ - : "=d" (__result), "=&d" (__temp) \ - : "d" (value), "r" (__memp), \ - "r" ((char *) __memp + 4), "0" (__result) \ - : "memory"); \ - } \ - __result; }) - -#define atomic_add(mem, value) \ - (void) ({ if (sizeof (*(mem)) == 1) \ - __asm __volatile ("add%.b %1,%0" \ - : "+m" (*(mem)) \ - : "id" (value)); \ - else if (sizeof (*(mem)) == 2) \ - __asm __volatile ("add%.w %1,%0" \ - : "+m" (*(mem)) \ - : "id" (value)); \ - else if (sizeof (*(mem)) == 4) \ - __asm __volatile ("add%.l %1,%0" \ - : "+m" (*(mem)) \ - : "id" (value)); \ - else \ - { \ - __typeof (mem) __memp = (mem); \ - __typeof (*(mem)) __oldval = *__memp; \ - __typeof (*(mem)) __temp; \ - __asm __volatile ("1: move%.l %0,%1;" \ - " move%.l %R0,%R1;" \ - " add%.l %2,%1;" \ - " addx%.l %R2,%R1;" \ - " cas2%.l %0:%R0,%1:%R1,(%3):(%4);" \ - " jbne 1b" \ - : "=d" (__oldval), "=&d" (__temp) \ - : "d" (value), "r" (__memp), \ - "r" ((char *) __memp + 4), "0" (__oldval) \ - : "memory"); \ - } \ - }) - -#define atomic_increment_and_test(mem) \ - ({ char __result; \ - if (sizeof (*(mem)) == 1) \ - __asm __volatile ("addq%.b %#1,%1; seq %0" \ - : "=dm" (__result), "+m" (*(mem))); \ - else if (sizeof (*(mem)) == 2) \ - __asm __volatile ("addq%.w %#1,%1; seq %0" \ - : "=dm" (__result), "+m" (*(mem))); \ - else if (sizeof (*(mem)) == 4) \ - __asm __volatile ("addq%.l %#1,%1; seq %0" \ - : "=dm" (__result), "+m" (*(mem))); \ - else \ - { \ - __typeof (mem) __memp = (mem); \ - __typeof (*(mem)) __oldval = *__memp; \ - __typeof (*(mem)) __temp; \ - __asm __volatile ("1: move%.l %1,%2;" \ - " move%.l %R1,%R2;" \ - " addq%.l %#1,%2;" \ - " addx%.l %5,%R2;" \ - " seq %0;" \ - " cas2%.l %1:%R1,%2:%R2,(%3):(%4);" \ - " jbne 1b" \ - : "=&dm" (__result), "=d" (__oldval), \ - "=&d" (__temp) \ - : "r" (__memp), "r" ((char *) __memp + 4), \ - "d" (0), "1" (__oldval) \ - : "memory"); \ - } \ - __result; }) - -#define atomic_decrement_and_test(mem) \ - ({ char __result; \ - if (sizeof (*(mem)) == 1) \ - __asm __volatile ("subq%.b %#1,%1; seq %0" \ - : "=dm" (__result), "+m" (*(mem))); \ - else if (sizeof (*(mem)) == 2) \ - __asm __volatile ("subq%.w %#1,%1; seq %0" \ - : "=dm" (__result), "+m" (*(mem))); \ - else if (sizeof (*(mem)) == 4) \ - __asm __volatile ("subq%.l %#1,%1; seq %0" \ - : "=dm" (__result), "+m" (*(mem))); \ - else \ - { \ - __typeof (mem) __memp = (mem); \ - __typeof (*(mem)) __oldval = *__memp; \ - __typeof (*(mem)) __temp; \ - __asm __volatile ("1: move%.l %1,%2;" \ - " move%.l %R1,%R2;" \ - " subq%.l %#1,%2;" \ - " subx%.l %5,%R2;" \ - " seq %0;" \ - " cas2%.l %1:%R1,%2:%R2,(%3):(%4);" \ - " jbne 1b" \ - : "=&dm" (__result), "=d" (__oldval), \ - "=&d" (__temp) \ - : "r" (__memp), "r" ((char *) __memp + 4), \ - "d" (0), "1" (__oldval) \ - : "memory"); \ - } \ - __result; }) - -#define atomic_bit_set(mem, bit) \ - __asm __volatile ("bfset %0{%1,#1}" \ - : "+m" (*(mem)) \ - : "di" (sizeof (*(mem)) * 8 - (bit) - 1)) - -#define atomic_bit_test_set(mem, bit) \ - ({ char __result; \ - __asm __volatile ("bfset %1{%2,#1}; sne %0" \ - : "=dm" (__result), "+m" (*(mem)) \ - : "di" (sizeof (*(mem)) * 8 - (bit) - 1)); \ - __result; }) diff --git a/sysdeps/m68k/m68020/bits/string.h b/sysdeps/m68k/m68020/bits/string.h deleted file mode 100644 index 84be224..0000000 --- a/sysdeps/m68k/m68020/bits/string.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Optimized, inlined string functions. m680x0 version, x >= 2. - Copyright (C) 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _STRING_H -# error "Never use <bits/string.h> directly; include <string.h> instead." -#endif - -/* Currently the only purpose of this file is to tell the generic inline - macros that unaligned memory access is possible. */ -#define _STRING_ARCH_unaligned 1 diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S deleted file mode 100644 index f3e450e..0000000 --- a/sysdeps/m68k/m68020/mul_1.S +++ /dev/null @@ -1,87 +0,0 @@ -/* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store - the result in a second limb vector. - -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -/* - INPUT PARAMETERS - res_ptr (sp + 4) - s1_ptr (sp + 8) - s1_size (sp + 12) - s2_limb (sp + 16) -*/ - -#include "sysdep.h" -#include "asm-syntax.h" - - TEXT -ENTRY(__mpn_mul_1) - -#define res_ptr a0 -#define s1_ptr a1 -#define s1_size d2 -#define s2_limb d4 - -/* Save used registers on the stack. */ - moveml R(d2)-R(d4),MEM_PREDEC(sp) -#if 0 - movel R(d2),MEM_PREDEC(sp) - movel R(d3),MEM_PREDEC(sp) - movel R(d4),MEM_PREDEC(sp) -#endif - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,16),R(res_ptr) - movel MEM_DISP(sp,20),R(s1_ptr) - movel MEM_DISP(sp,24),R(s1_size) - movel MEM_DISP(sp,28),R(s2_limb) - - eorw #1,R(s1_size) - clrl R(d1) - lsrl #1,R(s1_size) - bcc L(L1) - subql #1,R(s1_size) - subl R(d0),R(d0) /* (d0,cy) <= (0,0) */ - -L(Loop:) - movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d1):R(d3) - addxl R(d0),R(d3) - movel R(d3),MEM_POSTINC(res_ptr) -L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d0):R(d3) - addxl R(d1),R(d3) - movel R(d3),MEM_POSTINC(res_ptr) - - dbf R(s1_size),L(Loop) - clrl R(d3) - addxl R(d3),R(d0) - subl #0x10000,R(s1_size) - bcc L(Loop) - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d4) -#if 0 - movel MEM_POSTINC(sp),R(d4) - movel MEM_POSTINC(sp),R(d3) - movel MEM_POSTINC(sp),R(d2) -#endif - rts -END(__mpn_mul_1) diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S deleted file mode 100644 index 7522046..0000000 --- a/sysdeps/m68k/m68020/submul_1.S +++ /dev/null @@ -1,80 +0,0 @@ -/* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract - the result from a second limb vector. - -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -/* - INPUT PARAMETERS - res_ptr (sp + 4) - s1_ptr (sp + 8) - s1_size (sp + 12) - s2_limb (sp + 16) -*/ - -#include "sysdep.h" -#include "asm-syntax.h" - - TEXT -ENTRY(__mpn_submul_1) - -#define res_ptr a0 -#define s1_ptr a1 -#define s1_size d2 -#define s2_limb d4 - -/* Save used registers on the stack. */ - moveml R(d2)-R(d5),MEM_PREDEC(sp) - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,20),R(res_ptr) - movel MEM_DISP(sp,24),R(s1_ptr) - movel MEM_DISP(sp,28),R(s1_size) - movel MEM_DISP(sp,32),R(s2_limb) - - eorw #1,R(s1_size) - clrl R(d1) - clrl R(d5) - lsrl #1,R(s1_size) - bcc L(L1) - subql #1,R(s1_size) - subl R(d0),R(d0) /* (d0,cy) <= (0,0) */ - -L(Loop:) - movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d1):R(d3) - addxl R(d0),R(d3) - addxl R(d5),R(d1) - subl R(d3),MEM_POSTINC(res_ptr) -L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d0):R(d3) - addxl R(d1),R(d3) - addxl R(d5),R(d0) - subl R(d3),MEM_POSTINC(res_ptr) - - dbf R(s1_size),L(Loop) - addxl R(d5),R(d0) - subl #0x10000,R(s1_size) - bcc L(Loop) - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d5) - - rts -END(__mpn_submul_1) diff --git a/sysdeps/m68k/m68020/wordcopy.S b/sysdeps/m68k/m68020/wordcopy.S deleted file mode 100644 index 4fb1a45..0000000 --- a/sysdeps/m68k/m68020/wordcopy.S +++ /dev/null @@ -1 +0,0 @@ -/* Empty, not needed. */ diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S deleted file mode 100644 index fab65a9..0000000 --- a/sysdeps/m68k/memchr.S +++ /dev/null @@ -1,232 +0,0 @@ -/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the - first N bytes of STR. - For Motorola 68000. - Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@gnu.org>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#include "asm-syntax.h" - - TEXT -ENTRY(__memchr) - /* Save the callee-saved registers we use. */ - moveml R(d2)-R(d4),MEM_PREDEC(sp) - - /* Get string pointer, character and length. */ - movel MEM_DISP(sp,16),R(a0) - moveb MEM_DISP(sp,23),R(d0) - movel MEM_DISP(sp,24),R(d4) - - /* Check if at least four bytes left to search. */ - moveql #4,R(d1) - cmpl R(d1),R(d4) - bcs L(L6) - - /* Distribute the character to all bytes of a longword. */ - movel R(d0),R(d1) - lsll #8,R(d1) - moveb R(d0),R(d1) - movel R(d1),R(d0) - swap R(d0) - movew R(d1),R(d0) - - /* First search for the character one byte at a time until the - pointer is aligned to a longword boundary. */ - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - subql #1,R(d4) - beq L(L7) - - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - subql #1,R(d4) - beq L(L7) - - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - subql #1,R(d4) - beq L(L7) - -L(L1:) - /* Load the magic bits. Unlike the generic implementation we can - use the carry bit as the fourth hole. */ - movel #0xfefefeff,R(d3) - - /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to - change any of the hole bits of LONGWORD. - - 1) Is this safe? Will it catch all the zero bytes? - Suppose there is a byte with all zeros. Any carry bits - propagating from its left will fall into the hole at its - least significant bit and stop. Since there will be no - carry from its most significant bit, the LSB of the - byte to the left will be unchanged, and the zero will be - detected. - - 2) Is this worthwhile? Will it ignore everything except - zero bytes? Suppose every byte of LONGWORD has a bit set - somewhere. There will be a carry into bit 8. If bit 8 - is set, this will carry into bit 16. If bit 8 is clear, - one of bits 9-15 must be set, so there will be a carry - into bit 16. Similarly, there will be a carry into bit - 24. If one of bits 24-31 is set, there will be a carry - into bit 32 (=carry flag), so all of the hole bits will - be changed. - - 3) But wait! Aren't we looking for C, not zero? - Good point. So what we do is XOR LONGWORD with a longword, - each of whose bytes is C. This turns each byte that is C - into a zero. */ - - /* Still at least 4 bytes to search? */ - subql #4,R(d4) - bcs L(L6) - -L(L2:) - /* Get the longword in question. */ - movel MEM_POSTINC(a0),R(d1) - /* XOR with the byte we search for. */ - eorl R(d0),R(d1) - - /* Add the magic value. We get carry bits reported for each byte - which is not C. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits. */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word equals - C. */ - bne L(L8) - - /* Still at least 4 bytes to search? */ - subql #4,R(d4) - bcs L(L6) - - /* Get the longword in question. */ - movel MEM_POSTINC(a0),R(d1) - /* XOR with the byte we search for. */ - eorl R(d0),R(d1) - - /* Add the magic value. We get carry bits reported for each byte - which is not C. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word equals - C. */ - bne L(L8) - - /* Still at least 4 bytes to search? */ - subql #4,R(d4) - bcc L(L2) - -L(L6:) - /* Search one byte at a time in the remaining less than 4 bytes. */ - andw #3,R(d4) - beq L(L7) - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - subqw #1,R(d4) - beq L(L7) - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - subqw #1,R(d4) - beq L(L7) - cmpb MEM(a0),R(d0) - beq L(L9) - -L(L7:) - /* Return NULL. */ - clrl R(d0) - movel R(d0),R(a0) - moveml MEM_POSTINC(sp),R(d2)-R(d4) - rts - -L(L8:) - /* We have a hit. Check to see which byte it was. First - compensate for the autoincrement in the loop. */ - subql #4,R(a0) - - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - /* Otherwise the fourth byte must equal C. */ -L(L9:) - movel R(a0),R(d0) - moveml MEM_POSTINC(sp),R(d2)-R(d4) - rts -END(__memchr) - -weak_alias (__memchr, memchr) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif -libc_hidden_builtin_def (memchr) diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h deleted file mode 100644 index 0951eea..0000000 --- a/sysdeps/m68k/memcopy.h +++ /dev/null @@ -1,100 +0,0 @@ -/* memcopy.h -- definitions for memory copy functions. Motorola 68020 version. - Copyright (C) 1991, 1997, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Torbjorn Granlund (tege@sics.se). - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdeps/generic/memcopy.h> - -#if defined(__mc68020__) || defined(mc68020) - -#undef OP_T_THRES -#define OP_T_THRES 16 - -/* WORD_COPY_FWD and WORD_COPY_BWD are not symmetric on the 68020, - because of its weird instruction overlap characteristics. */ - -#undef WORD_COPY_FWD -#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ - do \ - { \ - size_t __nwords = (nbytes) / sizeof (op_t); \ - size_t __nblocks = __nwords / 8 + 1; \ - dst_bp -= (8 - __nwords % 8) * sizeof (op_t); \ - src_bp -= (8 - __nwords % 8) * sizeof (op_t); \ - switch (__nwords % 8) \ - do \ - { \ - ((op_t *) dst_bp)[0] = ((op_t *) src_bp)[0]; \ - case 7: \ - ((op_t *) dst_bp)[1] = ((op_t *) src_bp)[1]; \ - case 6: \ - ((op_t *) dst_bp)[2] = ((op_t *) src_bp)[2]; \ - case 5: \ - ((op_t *) dst_bp)[3] = ((op_t *) src_bp)[3]; \ - case 4: \ - ((op_t *) dst_bp)[4] = ((op_t *) src_bp)[4]; \ - case 3: \ - ((op_t *) dst_bp)[5] = ((op_t *) src_bp)[5]; \ - case 2: \ - ((op_t *) dst_bp)[6] = ((op_t *) src_bp)[6]; \ - case 1: \ - ((op_t *) dst_bp)[7] = ((op_t *) src_bp)[7]; \ - case 0: \ - src_bp += 32; \ - dst_bp += 32; \ - __nblocks--; \ - } \ - while (__nblocks != 0); \ - (nbytes_left) = (nbytes) % sizeof (op_t); \ - } while (0) - -#undef WORD_COPY_BWD -#define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes) \ - do \ - { \ - size_t __nblocks = (nbytes) / 32 + 1; \ - op_t *__dst_ep = (op_t *) (dst_ep); \ - op_t *__src_ep = (op_t *) (src_ep); \ - switch ((nbytes) / sizeof (op_t) % 8) \ - do \ - { \ - *--__dst_ep = *--__src_ep; \ - case 7: \ - *--__dst_ep = *--__src_ep; \ - case 6: \ - *--__dst_ep = *--__src_ep; \ - case 5: \ - *--__dst_ep = *--__src_ep; \ - case 4: \ - *--__dst_ep = *--__src_ep; \ - case 3: \ - *--__dst_ep = *--__src_ep; \ - case 2: \ - *--__dst_ep = *--__src_ep; \ - case 1: \ - *--__dst_ep = *--__src_ep; \ - case 0: \ - __nblocks--; \ - } \ - while (__nblocks != 0); \ - (nbytes_left) = (nbytes) % sizeof (op_t); \ - (dst_ep) = (unsigned long) __dst_ep; \ - (src_ep) = (unsigned long) __src_ep; \ - } while (0) - -#endif diff --git a/sysdeps/m68k/memusage.h b/sysdeps/m68k/memusage.h deleted file mode 100644 index bb22c0a..0000000 --- a/sysdeps/m68k/memusage.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - - -#define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; }) - -#include <sysdeps/generic/memusage.h> diff --git a/sysdeps/m68k/printf_fphex.c b/sysdeps/m68k/printf_fphex.c deleted file mode 100644 index d021a09..0000000 --- a/sysdeps/m68k/printf_fphex.c +++ /dev/null @@ -1,2 +0,0 @@ -#define LONG_DOUBLE_DENORM_BIAS IEEE854_LONG_DOUBLE_BIAS -#include <sysdeps/ieee754/ldbl-96/printf_fphex.c> diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S deleted file mode 100644 index acd8f76..0000000 --- a/sysdeps/m68k/rawmemchr.S +++ /dev/null @@ -1,180 +0,0 @@ -/* rawmemchr (str, ch) -- Return pointer to first occurrence of CH in STR. - For Motorola 68000. - Copyright (C) 1999, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@gnu.org>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#include "asm-syntax.h" - - TEXT -ENTRY(__rawmemchr) - /* Save the callee-saved registers we use. */ - movel R(d2),MEM_PREDEC(sp) - movel R(d3),MEM_PREDEC(sp) - - /* Get string pointer and character. */ - movel MEM_DISP(sp,12),R(a0) - moveb MEM_DISP(sp,19),R(d0) - - /* Distribute the character to all bytes of a longword. */ - movel R(d0),R(d1) - lsll #8,R(d1) - moveb R(d0),R(d1) - movel R(d1),R(d0) - swap R(d0) - movew R(d1),R(d0) - - /* First search for the character one byte at a time until the - pointer is aligned to a longword boundary. */ - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - -L(L1:) - /* Load the magic bits. Unlike the generic implementation we can - use the carry bit as the fourth hole. */ - movel #0xfefefeff,R(d3) - - /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to - change any of the hole bits of LONGWORD. - - 1) Is this safe? Will it catch all the zero bytes? - Suppose there is a byte with all zeros. Any carry bits - propagating from its left will fall into the hole at its - least significant bit and stop. Since there will be no - carry from its most significant bit, the LSB of the - byte to the left will be unchanged, and the zero will be - detected. - - 2) Is this worthwhile? Will it ignore everything except - zero bytes? Suppose every byte of LONGWORD has a bit set - somewhere. There will be a carry into bit 8. If bit 8 - is set, this will carry into bit 16. If bit 8 is clear, - one of bits 9-15 must be set, so there will be a carry - into bit 16. Similarly, there will be a carry into bit - 24. If one of bits 24-31 is set, there will be a carry - into bit 32 (=carry flag), so all of the hole bits will - be changed. - - 3) But wait! Aren't we looking for C, not zero? - Good point. So what we do is XOR LONGWORD with a longword, - each of whose bytes is C. This turns each byte that is C - into a zero. */ - -L(L2:) - /* Get the longword in question. */ - movel MEM_POSTINC(a0),R(d1) - /* XOR with the byte we search for. */ - eorl R(d0),R(d1) - - /* Add the magic value. We get carry bits reported for each byte - which is not C. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits. */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word equals - C. */ - bne L(L8) - - /* Get the longword in question. */ - movel MEM_POSTINC(a0),R(d1) - /* XOR with the byte we search for. */ - eorl R(d0),R(d1) - - /* Add the magic value. We get carry bits reported for each byte - which is not C. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word equals - C. */ - beq L(L2) - -L(L8:) - /* We have a hit. Check to see which byte it was. First - compensate for the autoincrement in the loop. */ - subql #4,R(a0) - - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - cmpb MEM(a0),R(d0) - beq L(L9) - addql #1,R(a0) - - /* Otherwise the fourth byte must equal C. */ -L(L9:) - movel R(a0),R(d0) - movel MEM_POSTINC(sp),R(d3) - movel MEM_POSTINC(sp),R(d2) - rts -END(__rawmemchr) - -libc_hidden_def (__rawmemchr) -weak_alias (__rawmemchr, rawmemchr) diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S deleted file mode 100644 index 5e6abce..0000000 --- a/sysdeps/m68k/rshift.S +++ /dev/null @@ -1,146 +0,0 @@ -/* mc68020 __mpn_rshift -- Shift right a low-level natural-number integer. - -Copyright (C) 1996, 1998 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -/* - INPUT PARAMETERS - res_ptr (sp + 4) - s_ptr (sp + 8) - s_size (sp + 16) - cnt (sp + 12) -*/ - -#include "sysdep.h" -#include "asm-syntax.h" - -#define res_ptr a1 -#define s_ptr a0 -#define s_size d6 -#define cnt d4 - - TEXT -ENTRY(__mpn_rshift) -/* Save used registers on the stack. */ - moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) - -/* Copy the arguments to registers. */ - movel MEM_DISP(sp,28),R(res_ptr) - movel MEM_DISP(sp,32),R(s_ptr) - movel MEM_DISP(sp,36),R(s_size) - movel MEM_DISP(sp,40),R(cnt) - - moveql #1,R(d5) - cmpl R(d5),R(cnt) - bne L(Lnormal) - cmpl R(res_ptr),R(s_ptr) - bls L(Lspecial) /* jump if res_ptr >= s_ptr */ -#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) - lea MEM_INDX1(res_ptr,s_size,l,4),R(a2) -#else /* not mc68020 */ - movel R(s_size),R(d0) - asll #2,R(d0) - lea MEM_INDX(res_ptr,d0,l),R(a2) -#endif - cmpl R(s_ptr),R(a2) - bls L(Lspecial) /* jump if s_ptr >= res_ptr + s_size */ - -L(Lnormal:) - moveql #32,R(d5) - subl R(cnt),R(d5) - movel MEM_POSTINC(s_ptr),R(d2) - movel R(d2),R(d0) - lsll R(d5),R(d0) /* compute carry limb */ - - lsrl R(cnt),R(d2) - movel R(d2),R(d1) - subql #1,R(s_size) - beq L(Lend) - lsrl #1,R(s_size) - bcs L(L1) - subql #1,R(s_size) - -L(Loop:) - movel MEM_POSTINC(s_ptr),R(d2) - movel R(d2),R(d3) - lsll R(d5),R(d3) - orl R(d3),R(d1) - movel R(d1),MEM_POSTINC(res_ptr) - lsrl R(cnt),R(d2) -L(L1:) - movel MEM_POSTINC(s_ptr),R(d1) - movel R(d1),R(d3) - lsll R(d5),R(d3) - orl R(d3),R(d2) - movel R(d2),MEM_POSTINC(res_ptr) - lsrl R(cnt),R(d1) - - dbf R(s_size),L(Loop) - subl #0x10000,R(s_size) - bcc L(Loop) - -L(Lend:) - movel R(d1),MEM(res_ptr) /* store most significant limb */ - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) - rts - -/* We loop from most significant end of the arrays, which is only - permissible if the source and destination don't overlap, since the - function is documented to work for overlapping source and destination. */ - -L(Lspecial:) -#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) - lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr) - lea MEM_INDX1(res_ptr,s_size,l,4),R(res_ptr) -#else /* not mc68000 */ - movel R(s_size),R(d0) - asll #2,R(d0) - addl R(s_size),R(s_ptr) - addl R(s_size),R(res_ptr) -#endif - - clrl R(d0) /* initialize carry */ - eorw #1,R(s_size) - lsrl #1,R(s_size) - bcc L(LL1) - subql #1,R(s_size) - -L(LLoop:) - movel MEM_PREDEC(s_ptr),R(d2) - roxrl #1,R(d2) - movel R(d2),MEM_PREDEC(res_ptr) -L(LL1:) - movel MEM_PREDEC(s_ptr),R(d2) - roxrl #1,R(d2) - movel R(d2),MEM_PREDEC(res_ptr) - - dbf R(s_size),L(LLoop) - roxrl #1,R(d0) /* save cy in msb */ - subl #0x10000,R(s_size) - bcs L(LLend) - addl R(d0),R(d0) /* restore cy */ - bra L(LLoop) - -L(LLend:) -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) - rts -END(__mpn_rshift) diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/s_isinfl.c deleted file mode 100644 index 2502039..0000000 --- a/sysdeps/m68k/s_isinfl.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "ieee754.h" - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -int -__isinfl (long double value) -{ - union ieee854_long_double u; - - u.d = value; - - /* An IEEE 854 infinity has an exponent with the - maximum possible value and a zero mantissa. - In Motorola's interpretation the integer bit is ignored. */ - if ((u.ieee.exponent & 0x7fff) == 0x7fff && - (u.ieee.mantissa0 & 0x7fffffff) == 0 && u.ieee.mantissa1 == 0) - return u.ieee.negative ? -1 : 1; - - return 0; -} - -hidden_def (__isinfl) -weak_alias (__isinfl, isinfl); diff --git a/sysdeps/m68k/s_isnanl.c b/sysdeps/m68k/s_isnanl.c deleted file mode 100644 index 999746f..0000000 --- a/sysdeps/m68k/s_isnanl.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include "ieee754.h" - -/* Return nonzero if VALUE is not a number. */ -int -__isnanl (long double value) -{ - union ieee854_long_double u; - - u.d = value; - - /* IEEE 854 NaN's have the maximum possible - exponent and a nonzero mantissa. In Motorola's - interpretation the integer bit is ignored. */ - return ((u.ieee.exponent & 0x7fff) == 0x7fff && - ((u.ieee.mantissa0 & 0x7fffffff) != 0 || u.ieee.mantissa1 != 0)); -} - -hidden_def (__isnanl) -weak_alias (__isnanl, isnanl); diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c deleted file mode 100644 index 8a6c3f9..0000000 --- a/sysdeps/m68k/setjmp.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1997, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <setjmp.h> - -/* Save the current program position in ENV and return 0. */ -int -#if defined BSD_SETJMP -# undef setjmp -# define savemask 1 -setjmp (jmp_buf env) -#elif defined BSD__SETJMP -# undef _setjmp -# define savemask 0 -_setjmp (jmp_buf env) -#else -__sigsetjmp (jmp_buf env, int savemask) -#endif -{ - /* Save data registers D1 through D7. */ - asm volatile ("movem%.l %/d1-%/d7, %0" - : : "m" (env[0].__jmpbuf[0].__dregs[0])); - - /* Save return address in place of register A0. */ - env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1]; - - /* Save address registers A1 through A5. */ - asm volatile ("movem%.l %/a1-%/a5, %0" - : : "m" (env[0].__jmpbuf[0].__aregs[1])); - - /* Save caller's FP, not our own. */ - env[0].__jmpbuf[0].__fp = ((void **) &env)[-2]; - - /* Save caller's SP, not our own. */ - env[0].__jmpbuf[0].__sp = (void *) &env; - -#if defined __HAVE_68881__ || defined __HAVE_FPU__ - /* Save floating-point (68881) registers FP0 through FP7. */ - asm volatile ("fmovem%.x %/fp0-%/fp7, %0" - : : "m" (env[0].__jmpbuf[0].__fpregs[0])); -#endif - - /* Save the signal mask if requested. */ - return __sigjmp_save (env, savemask); -} -#if !defined BSD_SETJMP && !defined BSD__SETJMP -hidden_def (__sigsetjmp) -#endif diff --git a/sysdeps/m68k/stackinfo.h b/sysdeps/m68k/stackinfo.h deleted file mode 100644 index 66e5a17..0000000 --- a/sysdeps/m68k/stackinfo.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This file contains a bit of information about the stack allocation - of the processor. */ - -#ifndef _STACKINFO_H -#define _STACKINFO_H 1 - -/* On m68k the stack grows down. */ -#define _STACK_GROWS_DOWN 1 - -#endif /* stackinfo.h */ diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S deleted file mode 100644 index 04626ff..0000000 --- a/sysdeps/m68k/strchr.S +++ /dev/null @@ -1,258 +0,0 @@ -/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR. - For Motorola 68000. - Copyright (C) 1999, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@gnu.org>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#include "asm-syntax.h" - - TEXT -ENTRY(strchr) - /* Save the callee-saved registers we use. */ - movel R(d2),MEM_PREDEC(sp) - movel R(d3),MEM_PREDEC(sp) - - /* Get string pointer and character. */ - movel MEM_DISP(sp,12),R(a0) - moveb MEM_DISP(sp,19),R(d0) - - /* Distribute the character to all bytes of a longword. */ - movel R(d0),R(d1) - lsll #8,R(d1) - moveb R(d0),R(d1) - movel R(d1),R(d0) - swap R(d0) - movew R(d1),R(d0) - - /* First search for the character one byte at a time until the - pointer is aligned to a longword boundary. */ - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L3) - addql #1,R(a0) - - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L3) - addql #1,R(a0) - - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L3) - addql #1,R(a0) - -L(L1:) - /* Load the magic bits. Unlike the generic implementation we can - use the carry bit as the fourth hole. */ - movel #0xfefefeff,R(d3) - - /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to - change any of the hole bits of LONGWORD. - - 1) Is this safe? Will it catch all the zero bytes? - Suppose there is a byte with all zeros. Any carry bits - propagating from its left will fall into the hole at its - least significant bit and stop. Since there will be no - carry from its most significant bit, the LSB of the - byte to the left will be unchanged, and the zero will be - detected. - - 2) Is this worthwhile? Will it ignore everything except - zero bytes? Suppose every byte of LONGWORD has a bit set - somewhere. There will be a carry into bit 8. If bit 8 - is set, this will carry into bit 16. If bit 8 is clear, - one of bits 9-15 must be set, so there will be a carry - into bit 16. Similarly, there will be a carry into bit - 24. If one of bits 24-31 is set, there will be a carry - into bit 32 (=carry flag), so all of the hole bits will - be changed. - - 3) But wait! Aren't we looking for C, not zero? - Good point. So what we do is XOR LONGWORD with a longword, - each of whose bytes is C. This turns each byte that is C - into a zero. */ - -L(L2:) - /* Get the longword in question. */ - movel MEM_POSTINC(a0),R(d1) - /* XOR with the byte we search for. */ - eorl R(d0),R(d1) - - /* Add the magic value. We get carry bits reported for each byte - which is not C. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits. */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word equals - C. */ - bne L(L8) - - /* Next look for a NUL byte. - Restore original longword without reload. */ - eorl R(d0),R(d1) - /* Add the magic value. We get carry bits reported for each byte - which is not NUL. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit, and return NULL. */ - bcc L(L3) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits. */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word was NUL - and we return NULL. Otherwise continue with the next longword. */ - bne L(L3) - - /* Get the longword in question. */ - movel MEM_POSTINC(a0),R(d1) - /* XOR with the byte we search for. */ - eorl R(d0),R(d1) - - /* Add the magic value. We get carry bits reported for each byte - which is not C. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word equals - C. */ - bne L(L8) - - /* Next look for a NUL byte. - Restore original longword without reload. */ - eorl R(d0),R(d1) - /* Add the magic value. We get carry bits reported for each byte - which is not NUL. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit, and return NULL. */ - bcc L(L3) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word was NUL - and we return NULL. Otherwise continue with the next longword. */ - beq L(L2) - -L(L3:) - /* Return NULL. */ - clrl R(d0) - movel R(d0),R(a0) - movel MEM_POSTINC(sp),R(d3) - movel MEM_POSTINC(sp),R(d2) - rts - -L(L8:) - /* We have a hit. Check to see which byte it was. First - compensate for the autoincrement in the loop. */ - subql #4,R(a0) - - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L3) - addql #1,R(a0) - - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L3) - addql #1,R(a0) - - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L3) - addql #1,R(a0) - - /* Otherwise the fourth byte must equal C. */ -L(L9:) - movel R(a0),R(d0) - movel MEM_POSTINC(sp),R(d3) - movel MEM_POSTINC(sp),R(d2) - rts -END(strchr) - -weak_alias (strchr, index) -libc_hidden_builtin_def (strchr) diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S deleted file mode 100644 index 3fee2b2..0000000 --- a/sysdeps/m68k/strchrnul.S +++ /dev/null @@ -1,250 +0,0 @@ -/* strchrnul (str, ch) -- Return pointer to first occurrence of CH in STR - or the final NUL byte. - For Motorola 68000. - Copyright (C) 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@gnu.org>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#include "asm-syntax.h" - - TEXT -ENTRY(__strchrnul) - /* Save the callee-saved registers we use. */ - movel R(d2),MEM_PREDEC(sp) - movel R(d3),MEM_PREDEC(sp) - - /* Get string pointer and character. */ - movel MEM_DISP(sp,12),R(a0) - moveb MEM_DISP(sp,19),R(d0) - - /* Distribute the character to all bytes of a longword. */ - movel R(d0),R(d1) - lsll #8,R(d1) - moveb R(d0),R(d1) - movel R(d1),R(d0) - swap R(d0) - movew R(d1),R(d0) - - /* First search for the character one byte at a time until the - pointer is aligned to a longword boundary. */ - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L9) - addql #1,R(a0) - - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L9) - addql #1,R(a0) - - movel R(a0),R(d1) - andw #3,R(d1) - beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L9) - addql #1,R(a0) - -L(L1:) - /* Load the magic bits. Unlike the generic implementation we can - use the carry bit as the fourth hole. */ - movel #0xfefefeff,R(d3) - - /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to - change any of the hole bits of LONGWORD. - - 1) Is this safe? Will it catch all the zero bytes? - Suppose there is a byte with all zeros. Any carry bits - propagating from its left will fall into the hole at its - least significant bit and stop. Since there will be no - carry from its most significant bit, the LSB of the - byte to the left will be unchanged, and the zero will be - detected. - - 2) Is this worthwhile? Will it ignore everything except - zero bytes? Suppose every byte of LONGWORD has a bit set - somewhere. There will be a carry into bit 8. If bit 8 - is set, this will carry into bit 16. If bit 8 is clear, - one of bits 9-15 must be set, so there will be a carry - into bit 16. Similarly, there will be a carry into bit - 24. If one of bits 24-31 is set, there will be a carry - into bit 32 (=carry flag), so all of the hole bits will - be changed. - - 3) But wait! Aren't we looking for C, not zero? - Good point. So what we do is XOR LONGWORD with a longword, - each of whose bytes is C. This turns each byte that is C - into a zero. */ - -L(L2:) - /* Get the longword in question. */ - movel MEM_POSTINC(a0),R(d1) - /* XOR with the byte we search for. */ - eorl R(d0),R(d1) - - /* Add the magic value. We get carry bits reported for each byte - which is not C. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits. */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word equals - C. */ - bne L(L8) - - /* Next look for a NUL byte. - Restore original longword without reload. */ - eorl R(d0),R(d1) - /* Add the magic value. We get carry bits reported for each byte - which is not NUL. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits. */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word was - NUL. Otherwise continue with the next longword. */ - bne L(L8) - - /* Get the longword in question. */ - movel MEM_POSTINC(a0),R(d1) - /* XOR with the byte we search for. */ - eorl R(d0),R(d1) - - /* Add the magic value. We get carry bits reported for each byte - which is not C. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word equals - C. */ - bne L(L8) - - /* Next look for a NUL byte. - Restore original longword without reload. */ - eorl R(d0),R(d1) - /* Add the magic value. We get carry bits reported for each byte - which is not NUL. */ - movel R(d3),R(d2) - addl R(d1),R(d2) - - /* Check the fourth carry bit before it is clobbered by the next - XOR. If it is not set we have a hit. */ - bcc L(L8) - - /* We are only interested in carry bits that change due to the - previous add, so remove original bits */ - eorl R(d1),R(d2) - - /* Now test for the other three overflow bits. - Set all non-carry bits. */ - orl R(d3),R(d2) - /* Add 1 to get zero if all carry bits were set. */ - addql #1,R(d2) - - /* If we don't get zero then at least one byte of the word was - NUL. Otherwise continue with the next longword. */ - beq L(L2) - -L(L8:) - /* We have a hit. Check to see which byte it was. First - compensate for the autoincrement in the loop. */ - subql #4,R(a0) - - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L9) - addql #1,R(a0) - - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L9) - addql #1,R(a0) - - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) - beq L(L9) - tstb R(d1) - beq L(L9) - addql #1,R(a0) - - /* Otherwise the fourth byte must equal C or be NUL. */ -L(L9:) - movel R(a0),R(d0) - movel MEM_POSTINC(sp),R(d3) - movel MEM_POSTINC(sp),R(d2) - rts -END(__strchrnul) - -weak_alias (__strchrnul, strchrnul) diff --git a/sysdeps/m68k/strtold_l.c b/sysdeps/m68k/strtold_l.c deleted file mode 100644 index 481d992..0000000 --- a/sysdeps/m68k/strtold_l.c +++ /dev/null @@ -1,2 +0,0 @@ -#define DENORM_EXP (MIN_EXP - 1) -#include <sysdeps/ieee754/ldbl-96/strtold_l.c> diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S deleted file mode 100644 index 5833dd2..0000000 --- a/sysdeps/m68k/sub_n.S +++ /dev/null @@ -1,76 +0,0 @@ -/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and - store difference in a third limb vector. - -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -/* - INPUT PARAMETERS - res_ptr (sp + 4) - s1_ptr (sp + 8) - s2_ptr (sp + 16) - size (sp + 12) -*/ - -#include "sysdep.h" -#include "asm-syntax.h" - - TEXT -ENTRY(__mpn_sub_n) -/* Save used registers on the stack. */ - movel R(d2),MEM_PREDEC(sp) - movel R(a2),MEM_PREDEC(sp) - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,12),R(a2) - movel MEM_DISP(sp,16),R(a0) - movel MEM_DISP(sp,20),R(a1) - movel MEM_DISP(sp,24),R(d2) - - eorw #1,R(d2) - lsrl #1,R(d2) - bcc L(L1) - subql #1,R(d2) /* clears cy as side effect */ - -L(Loop:) - movel MEM_POSTINC(a0),R(d0) - movel MEM_POSTINC(a1),R(d1) - subxl R(d1),R(d0) - movel R(d0),MEM_POSTINC(a2) -L(L1:) movel MEM_POSTINC(a0),R(d0) - movel MEM_POSTINC(a1),R(d1) - subxl R(d1),R(d0) - movel R(d0),MEM_POSTINC(a2) - - dbf R(d2),L(Loop) /* loop until 16 lsb of %4 == -1 */ - subxl R(d0),R(d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ - subl #0x10000,R(d2) - bcs L(L2) - addl R(d0),R(d0) /* restore cy */ - bra L(Loop) - -L(L2:) - negl R(d0) - -/* Restore used registers from stack frame. */ - movel MEM_POSTINC(sp),R(a2) - movel MEM_POSTINC(sp),R(d2) - - rts -END(__mpn_sub_n) diff --git a/sysdeps/m68k/sys/ucontext.h b/sysdeps/m68k/sys/ucontext.h deleted file mode 100644 index 857ed6b..0000000 --- a/sysdeps/m68k/sys/ucontext.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1997, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* System V/m68k ABI compliant context switching support. */ - -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include <features.h> -#include <signal.h> - -/* Type for general register. */ -typedef int greg_t; - -/* Number of general registers. */ -#define NGREG 18 - -/* Container for all general registers. */ -typedef greg_t gregset_t[NGREG]; - -/* Number of each register is the `gregset_t' array. */ -enum -{ - R_D0 = 0, -#define R_D0 R_D0 - R_D1 = 1, -#define R_D1 R_D1 - R_D2 = 2, -#define R_D2 R_D2 - R_D3 = 3, -#define R_D3 R_D3 - R_D4 = 4, -#define R_D4 R_D4 - R_D5 = 5, -#define R_D5 R_D5 - R_D6 = 6, -#define R_D6 R_D6 - R_D7 = 7, -#define R_D7 R_D7 - R_A0 = 8, -#define R_A0 R_A0 - R_A1 = 9, -#define R_A1 R_A1 - R_A2 = 10, -#define R_A2 R_A2 - R_A3 = 11, -#define R_A3 R_A3 - R_A4 = 12, -#define R_A4 R_A4 - R_A5 = 13, -#define R_A5 R_A5 - R_A6 = 14, -#define R_A6 R_A6 - R_A7 = 15, -#define R_A7 R_A7 - R_SP = 15, -#define R_SP R_SP - R_PC = 16, -#define R_PC R_PC - R_PS = 17 -#define R_PS R_PS -}; - -/* Structure to describe FPU registers. */ -typedef struct fpregset -{ - int f_pcr; - int f_psr; - int f_fpiaddr; - int f_fpregs[8][3]; -} fpregset_t; - -/* Context to describe whole processor state. */ -typedef struct -{ - int version; - gregset_t gregs; -} mcontext_t; - -#define MCONTEXT_VERSION 1 - -/* Userlevel context. */ -typedef struct ucontext -{ - unsigned long int uc_flags; - struct ucontext *uc_link; - __sigset_t uc_sigmask; - stack_t uc_stack; - mcontext_t uc_mcontext; - long int uc_filler[201]; -} ucontext_t; - -#endif /* sys/ucontext.h */ diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h deleted file mode 100644 index f492ff6..0000000 --- a/sysdeps/m68k/sysdep.h +++ /dev/null @@ -1,100 +0,0 @@ -/* Assembler macros for m68k. - Copyright (C) 1998, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdeps/generic/sysdep.h> - -#ifdef __ASSEMBLER__ - -/* Syntactic details of assembler. */ - -# ifdef HAVE_ELF - -/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ -# define ALIGNARG(log2) 1<<log2 -/* For ELF we need the `.type' directive to make shared libs work right. */ -# define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg -# define ASM_SIZE_DIRECTIVE(name) .size name,.-name - -/* In ELF C symbols are asm symbols. */ -# undef NO_UNDERSCORES -# define NO_UNDERSCORES - -# else - -# define ALIGNARG(log2) log2 -# define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */ -# define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */ - -# endif - - -/* Define an entry point visible from C. - - There is currently a bug in gdb which prevents us from specifying - incomplete stabs information. Fake some entries here which specify - the current source file. */ -# define ENTRY(name) \ - .globl C_SYMBOL_NAME(name); \ - ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function); \ - .align ALIGNARG(2); \ - C_LABEL(name) \ - CALL_MCOUNT - -# undef END -# define END(name) ASM_SIZE_DIRECTIVE(name) - - -/* If compiled for profiling, call `_mcount' at the start of each function. */ -# ifdef PROF -/* The mcount code relies on a normal frame pointer being on the stack - to locate our caller, so push one just for its benefit. */ -# define CALL_MCOUNT \ - move.l %fp, -(%sp); move.l %sp, %fp; \ - jbsr JUMPTARGET (mcount); \ - move.l (%sp)+, %fp; -# else -# define CALL_MCOUNT /* Do nothing. */ -# endif - -# ifdef NO_UNDERSCORES -/* Since C identifiers are not normally prefixed with an underscore - on this system, the asm identifier `syscall_error' intrudes on the - C name space. Make sure we use an innocuous name. */ -# define syscall_error __syscall_error -# define mcount _mcount -# endif - -# define PSEUDO(name, syscall_name, args) \ - .globl syscall_error; \ - ENTRY (name) \ - DO_CALL (syscall_name, args); \ - jcc JUMPTARGET(syscall_error) - -# undef PSEUDO_END -# define PSEUDO_END(name) \ - END (name) - -# undef JUMPTARGET -# ifdef PIC -# define JUMPTARGET(name) name##@PLTPC -# else -# define JUMPTARGET(name) name -# endif - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/mach/hppa/machine-lock.h b/sysdeps/mach/hppa/machine-lock.h deleted file mode 100644 index 8c71d40..0000000 --- a/sysdeps/mach/hppa/machine-lock.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Machine-specific definition for spin locks. HPPA version. - Copyright (C) 1995, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _MACHINE_LOCK_H -#define _MACHINE_LOCK_H - -/* The type of a spin lock variable. */ - -typedef __volatile int __spin_lock_t __attribute__ ((__aligned__ (16))); - -/* Value to initialize `__spin_lock_t' variables to. */ - -#define __SPIN_LOCK_INITIALIZER -1 - - -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE extern __inline -#endif - -/* Unlock LOCK. */ - -_EXTERN_INLINE void -__spin_unlock (__spin_lock_t *__lock) -{ - *__lock = -1; -} - -/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ - -_EXTERN_INLINE int -__spin_try_lock (__spin_lock_t *__lock) -{ - register int __result; - __asm__ __volatile__ ("ldcws %0, %1" : "=m" (*__lock), "=r" (__result)); - return __result != 0; -} - -/* Return nonzero if LOCK is locked. */ - -_EXTERN_INLINE int -__spin_lock_locked (__spin_lock_t *__lock) -{ - return *__lock == 0; -} - - -#endif /* machine-lock.h */ diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h deleted file mode 100644 index 5db43fc..0000000 --- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Machine-dependent signal context structure for GNU Hurd. HPPA version. - Copyright (C) 1995,97,2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." -#endif - -#ifndef sc_parisc_thread_state - -/* Signal handlers are actually called: - void handler (int sig, int code, struct sigcontext *scp); */ - -/* State of this thread when the signal was taken. */ -struct sigcontext - { - /* These first members are machine-independent. */ - - int sc_onstack; /* Nonzero if running on sigstack. */ - __sigset_t sc_mask; /* Blocked signals to restore. */ - - /* MiG reply port this thread is using. */ - unsigned int sc_reply_port; - - /* Port this thread is doing an interruptible RPC on. */ - unsigned int sc_intr_port; - - /* Error code associated with this signal (interpreted as `error_t'). */ - int sc_error; - - /* All following members are machine-dependent. The rest of this - structure is written to be laid out identically to a `struct - parisc_thread_state'. trampoline.c knows this, so it must be - changed if this changes. */ - -#define sc_parisc_thread_state sc_flags /* Beginning of correspondence. */ - /* "General" registers $1..$31. */ - unsigned int sc_regs[31]; - - /* Control registers. */ - unsigned int sc_cr11; /* sar */ - /* These four registers make up the PC. */ - unsigned int iioq_head; - unsigned int iisq_head; - unsigned int iioq_tail; - unsigned int iisq_tail; - unsigned int sc_cr15; - unsigned int sc_cr19; - unsigned int sc_cr20; - unsigned int sc_cr21; - unsigned int sc_cr22; /* ipsw */ - unsigned int sc_bsd_goto; /* unused */ - unsigned int sc_sr4; - unsigned int sc_sr0; - unsigned int sc_sr1; - unsigned int sc_sr2; - unsigned int sc_sr3; - unsigned int sc_sr5; - unsigned int sc_sr6; - unsigned int sc_sr7; - unsigned int sc_cr0; - unsigned int sc_cr8; - unsigned int sc_cr9; - unsigned int sc_cr10; /* unused */ - unsigned int sc_cr12; - unsigned int sc_cr13; - unsigned int sc_cr24; /* unused */ - unsigned int sc_cr25; /* unused */ - unsigned int sc_cr26; /* unused */ - unsigned sc_mpsfu_high; /* unused */ - unsigned sc_mpsfu_low; /* unused */ - unsigned sc_mpsfu_ovflo; /* unused */ - int sc_pad; - - /* Floating point registers $f0..$f31. */ - double sc_fpregs[32]; - }; - -#endif /* sc_parisc_thread_state */ diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c deleted file mode 100644 index fc811c5..0000000 --- a/sysdeps/mach/hurd/hppa/trampoline.c +++ /dev/null @@ -1,230 +0,0 @@ -/* Set thread_state for sighandler, and sigcontext to recover. HPPA version. - Copyright (C) 1995, 1997, 1998, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <hurd/signal.h> -#include <thread_state.h> -#include <assert.h> -#include <errno.h> -#include "hurdfault.h" - - -struct mach_msg_trap_regargs - { - /* These first four arguments are in registers 26..23. */ - mach_msg_size_t rcv_size; /* arg3 */ - mach_msg_size_t send_size; /* arg2 */ - mach_msg_option_t option; /* arg1 */ - mach_msg_header_t *msg; /* arg0 */ - }; - -struct sigcontext * -_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, - int signo, long int sigcode, - volatile int rpc_wait, - struct machine_thread_all_state *state) -{ - __label__ trampoline, rpc_wait_trampoline; - void *volatile sigsp; - struct sigcontext *scp; - - if (ss->context) - { - /* We have a previous sigcontext that sigreturn was about - to restore when another signal arrived. We will just base - our setup on that. */ - if (_hurdsig_catch_fault (SIGSEGV)) - assert (_hurdsig_fault_sigcode >= (long int) ss->context && - _hurdsig_fault_sigcode < (long int) (ss->context + 1)); - else - { - memcpy (&state->basic, &ss->context->sc_parisc_thread_state, - sizeof (state->basic)); - state->set = (1 << PARISC_THREAD_STATE); - assert (! rpc_wait); - /* The intr_port slot was cleared before sigreturn sent us the - sig_post that made us notice this pending signal, so - _hurd_internal_post_signal wouldn't do interrupt_operation. - After we return, our caller will set SCP->sc_intr_port (in the - new context) from SS->intr_port and clear SS->intr_port. Now - that we are restoring this old context recorded by sigreturn, - we want to restore its intr_port too; so store it in - SS->intr_port now, so it will end up in SCP->sc_intr_port - later. */ - ss->intr_port = ss->context->sc_intr_port; - } - /* If the sigreturn context was bogus, just ignore it. */ - ss->context = NULL; - } - else if (! machine_get_basic_state (ss->thread, state)) - return NULL; - - if ((ss->actions[signo].sa_flags & SA_ONSTACK) && - !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) - { - sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; - ss->sigaltstack.ss_flags |= SS_ONSTACK; - /* XXX need to set up base of new stack for - per-thread variables, cthreads. */ - } - else - sigsp = (char *) state->basic.uesp; - - /* Push the signal context on the stack. */ - sigsp -= sizeof (*scp); - scp = sigsp; - - if (_hurdsig_catch_fault (SIGSEGV)) - { - assert (_hurdsig_fault_sigcode >= (long int) scp && - _hurdsig_fault_sigcode <= (long int) (scp + 1)); - /* We got a fault trying to write the stack frame. - We cannot set up the signal handler. - Returning NULL tells our caller, who will nuke us with a SIGILL. */ - return NULL; - } - else - { - int ok; - - /* Set up the sigcontext from the current state of the thread. */ - - scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; - - /* struct sigcontext is laid out so that starting at sc_regs mimics a - struct parisc_thread_state. */ - memcpy (&scp->sc_parisc_thread_state, - &state->basic, sizeof (state->basic)); - - _hurdsig_end_catch_fault (); - - if (! ok) - return NULL; - } - - /* Modify the thread state to call the trampoline code on the new stack. */ - if (rpc_wait) - { - /* The signalee thread was blocked in a mach_msg_trap system call, - still waiting for a reply. We will have it run the special - trampoline code which retries the message receive before running - the signal handler. - - To do this we change the OPTION argument on its stack to enable only - message reception, since the request message has already been - sent. */ - - struct mach_msg_trap_regargs *args = (void *) &state->basic.r23; - - if (_hurdsig_catch_fault (SIGSEGV)) - { - assert (_hurdsig_fault_sigcode >= (long int) args && - _hurdsig_fault_sigcode < (long int) (args + 1)); - /* Faulted accessing ARGS. Bomb. */ - return NULL; - } - - assert (args->option & MACH_RCV_MSG); - /* Disable the message-send, since it has already completed. The - calls we retry need only wait to receive the reply message. */ - args->option &= ~MACH_SEND_MSG; - - /* Limit the time to receive the reply message, in case the server - claimed that `interrupt_operation' succeeded but in fact the RPC - is hung. */ - args->option |= MACH_RCV_TIMEOUT; - args->timeout = _hurd_interrupted_rpc_timeout; - - _hurdsig_end_catch_fault (); - - MACHINE_THREAD_STATE_SET_PC (&state->basic, &&rpc_wait_trampoline); - /* The reply-receiving trampoline code runs initially on the original - user stack. We pass it the signal stack pointer in %r5. */ - state->basic.r5 = (int) sigsp; - /* After doing the message receive, the trampoline code will need to - update the %r28 value to be restored by sigreturn. To simplify - the assembly code, we pass the address of its slot in SCP to the - trampoline code in %r4. */ - state->basic.r4 = (unsigned int) &scp->sc_regs[27]; - /* Set up the arguments for the handler function in callee-saved - registers that we will move to the argument registers after - mach_msg_trap returns. */ - state->basic.r6 = signo; - state->basic.r7 = sigcode; - state->basic.r8 = (unsigned int) scp; - } - else - { - MACHINE_THREAD_STATE_SET_PC (&state->basic, &&trampoline); - state->basic.r20 = (unsigned int) sigsp; - /* Set up the arguments for the handler function. */ - state->basic.r26 = signo; - state->basic.r25 = sigcode; - state->basic.r24 = (unsigned int) scp; - } - - /* We pass the handler function to the trampoline code in %r9. */ - state->basic.r9 = (unsigned int) handler; - /* For convenience, we pass the address of __sigreturn in %r10. */ - state->basic.r10 = (unsigned int) &__sigreturn; - /* The extra copy of SCP for the __sigreturn arg goes in %r8. */ - state->basic.r10 = (unsigned int) scp; - - return scp; - - /* The trampoline code follows. This is not actually executed as part of - this function, it is just convenient to write it that way. */ - - rpc_wait_trampoline: - /* This is the entry point when we have an RPC reply message to receive - before running the handler. The MACH_MSG_SEND bit has already been - cleared in the OPTION argument on our stack. The interrupted user - stack pointer has not been changed, so the system call can find its - arguments; the signal stack pointer is in %ebx. For our convenience, - %ecx points to the sc_eax member of the sigcontext. */ - asm volatile - (/* Retry the interrupted mach_msg system call. */ - "ldil L%0xC0000000,%r1\nble 4(%sr7,%r1)\n" - "ldi -25, %r22\n" /* mach_msg_trap */ - /* When the sigcontext was saved, %r28 was MACH_RCV_INTERRUPTED. But - now the message receive has completed and the original caller of - the RPC (i.e. the code running when the signal arrived) needs to - see the final return value of the message receive in %r28. So - store the new %r28 value into the sc_regs[27] member of the sigcontext - (whose address is in %r4 to make this code simpler). */ - "stw (%r4), %r28\n" - /* Switch to the signal stack. */ - "copy %r5, %r30\n" - /* Copy the handler arguments to the argument registers. */ - "copy %r6, %r26\n" - "copy %r7, %r25\n" - "copy %r8, %r24\n" - ); - - trampoline: - /* Entry point for running the handler normally. The arguments to the - handler function are already in the argument registers. */ - asm volatile - ("bv (%r9); nop" /* Call the handler function. */ - "bv (%r10)\n" /* Call __sigreturn (SCP); never returns. */ - "copy %r8, %r26" /* Set up arg in delay slot. */ - : : "i" (&__sigreturn)); - - /* NOTREACHED */ - return NULL; -} diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S deleted file mode 100644 index d7b8ec2..0000000 --- a/sysdeps/unix/bsd/m68k/pipe.S +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1991,1992,1993,1995,1997,2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - -SYSCALL__ (pipe, 1) -#ifdef __motorola__ - move.l 4(sp), a0 - movem.l d0-d1, (a0) -#else - movel sp@(4), a0 - moveml d0-d1, a0@ -#endif - clrl d0 - rts - -libc_hidden_def (__pipe) -weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/m68k/start.c b/sysdeps/unix/bsd/m68k/start.c deleted file mode 100644 index 1067853..0000000 --- a/sysdeps/unix/bsd/m68k/start.c +++ /dev/null @@ -1,3 +0,0 @@ -#define DUMMIES ignore0 - -#include <sysdeps/unix/start.c> diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S deleted file mode 100644 index eb1a8ec..0000000 --- a/sysdeps/unix/bsd/m68k/syscall.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1993, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - -ENTRY (syscall) - movel sp@+, a0 /* Pop return address into A0. */ - DO_CALL (sp@, 0) /* Do system call. */ - jmp a0@ /* Return to A0. */ -error: movel a0, sp@- /* Error; push return address */ - jmp syscall_error /* and jump to error handler. */ diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S deleted file mode 100644 index 90f35c9..0000000 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define _ERRNO_H -#include <bits/errno.h> - -.globl syscall_error -syscall_error: - /* We translate the system's EWOULDBLOCK error into EAGAIN. - The GNU C library always defines EWOULDBLOCK==EAGAIN. - EWOULDBLOCK_sys is the original number. */ -#ifdef __motorola__ -#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN - cmp.l #EWOULDBLOCK_sys, d0 - bne store - moveq.l #EAGAIN, d0 -#endif -store: move.l d0, _errno - moveq.l #-1, d0 -#else -#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN - cmpl #EWOULDBLOCK_sys, d0 - bne store - moveq #EAGAIN, d0 -#endif -store: movel d0, _errno - moveq #-1, d0 -#endif - rts diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S deleted file mode 100644 index 9fb4fd9..0000000 --- a/sysdeps/unix/bsd/m68k/wait.S +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1995, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - -SYSCALL__ (wait, 1) -#ifdef __motorola__ - tst.l 4(sp) - beq 1f - movea.l 4(sp), a0 - move.l d1, (a0) -#else - tstl sp@(4) - beq 1f - moveal sp@(4), a0 - movel d1, a0@ -#endif -1: rts - -weak_alias (__wait, wait) diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile deleted file mode 100644 index 1c93ec5..0000000 --- a/sysdeps/unix/sysv/linux/hppa/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# linux/hppa does not use -lmilli anymore -gnulib := -lgcc diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions deleted file mode 100644 index e15c822..0000000 --- a/sysdeps/unix/sysv/linux/hppa/Versions +++ /dev/null @@ -1,25 +0,0 @@ -libc { - # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk. - # When you get an error from errlist-compat.awk, you need to add a new - # version here. Don't do this blindly, since this means changing the ABI - # for all GNU/Linux configurations. - - GLIBC_2.1 { - #errlist-compat 253 - _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; - } - GLIBC_2.2 { - # New rlimit interface - getrlimit; setrlimit; getrlimit64; setrlimit64; - } - GLIBC_2.3 { - #errlist-compat 254 - _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; - } -} -librt { - GLIBC_2.3 { - # AIO functions. - aio_cancel; aio_cancel64; - } -} diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h deleted file mode 100644 index 003d71f..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Error constants. Linux/HPPA specific version. - Copyright (C) 1996,1997,1998,1999,2000,2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifdef _ERRNO_H - -# undef EDOM -# undef EILSEQ -# undef ERANGE -# include <linux/errno.h> - -/* Linux also has no ECANCELED error code. Since it is not used here - we define it to an invalid value. */ -# ifndef ECANCELED -# define ECANCELED ECANCELLED -# endif - -# ifndef __ASSEMBLER__ -/* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); - -# if !defined _LIBC || defined _LIBC_REENTRANT -/* When using threads, errno is a per-thread value. */ -# define errno (*__errno_location ()) -# endif -# endif /* !__ASSEMBLER__ */ -#endif /* _ERRNO_H */ - -#if !defined _ERRNO_H && defined __need_Emath -/* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is - defined. */ -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 47 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h deleted file mode 100644 index 9d967c6..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ /dev/null @@ -1,181 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux/HPPA. - Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004 - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FCNTL_H -# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." -#endif - -#include <sys/types.h> - - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_RDONLY 00000000 -#define O_WRONLY 00000001 -#define O_RDWR 00000002 -#define O_ACCMODE 00000003 -#define O_APPEND 00000010 -#define O_BLKSEEK 00000100 /* HPUX only */ -#define O_CREAT 00000400 /* not fcntl */ -#define O_TRUNC 00001000 /* not fcntl */ -#define O_EXCL 00002000 /* not fcntl */ -#define O_ASYNC 00020000 -#define O_SYNC 00100000 -#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ -#define O_NDELAY O_NONBLOCK -#define O_NOCTTY 00400000 /* not fcntl */ - - -#ifdef __USE_GNU -# define O_DIRECT 00040000 /* direct disk access hint - currently ignored */ -# define O_DIRECTORY 00010000 /* must be a directory */ -# define O_NOFOLLOW 00000200 /* don't follow links */ -# define O_NOATIME 04000000 /* Do not set atime. */ -#endif - -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 00004000 -#endif - -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC 01000000 /* HPUX only */ -# define O_RSYNC 02000000 /* HPUX only */ -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#ifndef __USE_FILE_OFFSET64 -# define F_GETLK 5 /* Get record locking info. */ -# define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ -#else -# define F_GETLK F_GETLK64 /* Get record locking info. */ -# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking). */ -# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ -#endif - -#define F_GETLK64 8 /* Get record locking info. */ -#define F_SETLK64 9 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 10 /* Set record locking info (blocking). */ - -#if defined __USE_BSD || defined __USE_UNIX98 -# define F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */ -# define F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */ -#endif - -#ifdef __USE_GNU -# define F_SETSIG 13 /* Set number of signal to be sent. */ -# define F_GETSIG 14 /* Get number of signal to be sent. */ -#endif - -#ifdef __USE_GNU -# define F_SETLEASE 1024 /* Set a lease. */ -# define F_GETLEASE 1025 /* Enquire what lease is active. */ -# define F_NOTIFY 1026 /* Request notfications on a directory. */ -#endif - -/* for F_[GET|SET]FL */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 3 /* Remove lock. */ - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -#ifdef __USE_BSD -/* operations for bsd flock(), also used by the kernel implementation */ -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -#ifdef __USE_GNU -/* Types of directory notifications that may be requested with F_NOTIFY. */ -# define DN_ACCESS 0x00000001 /* File accessed. */ -# define DN_MODIFY 0x00000002 /* File modified. */ -# define DN_CREATE 0x00000004 /* File created. */ -# define DN_DELETE 0x00000008 /* File removed. */ -# define DN_RENAME 0x00000010 /* File renamed. */ -# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ -#endif - -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ -#ifndef __USE_FILE_OFFSET64 - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#else - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ -#endif - __pid_t l_pid; /* Process holding the lock. */ - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; -#endif - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ - -/* Advise to `posix_fadvise'. */ -#ifdef __USE_XOPEN2K -# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ -#endif - -__BEGIN_DECLS - -/* Provide kernel hint to read ahead. */ -extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) - __THROW; - -__END_DECLS diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h deleted file mode 100644 index 6f4e05f..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1996, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_IOCTL_H -# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Use the definitions from the kernel header files. */ -#include <asm/ioctls.h> - -/* Oh well, this is necessary since the kernel data structure is - different from the user-level version. */ -#undef TCGETS -#undef TCSETS -#undef TCSETSW -#undef TCSETSF -#define TCGETS _IOR ('T', 16, char[36]) -#define TCSETS _IOW ('T', 17, char[36]) -#define TCSETSW _IOW ('T', 18, char[36]) -#define TCSETSF _IOW ('T', 19, char[36]) - -#include <linux/sockios.h> diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ipc.h b/sysdeps/unix/sysv/linux/hppa/bits/ipc.h deleted file mode 100644 index d80cf06..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/ipc.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 1995-1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> -#include <bits/wordsize.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ -#if __WORDSIZE == 32 - unsigned short int __pad1; - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad2; -#else - __mode_t mode; /* Read/write permission. */ - unsigned short int __pad2; -#endif - unsigned short int __seq; /* Sequence number. */ - unsigned int __pad3; - unsigned long long int __unused1; - unsigned long long int __unused2; - }; diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h deleted file mode 100644 index 1eb1233..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Definitions for POSIX memory map interface. Linux/HPPA version. - Copyright (C) 1997, 1998, 2000, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_MMAN_H -# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." -#endif - -/* these are basically taken from the kernel definitions */ - -#define PROT_READ 0x1 /* page can be read */ -#define PROT_WRITE 0x2 /* page can be written */ -#define PROT_EXEC 0x4 /* page can be executed */ -#define PROT_NONE 0x0 /* page can not be accessed */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -#define MAP_SHARED 0x01 /* Share changes */ -#define MAP_PRIVATE 0x02 /* Changes are private */ -#define MAP_TYPE 0x03 /* Mask for type of mapping */ -#define MAP_FIXED 0x04 /* Interpret addr exactly */ -#define MAP_ANONYMOUS 0x10 /* don't use a file */ - -#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ -#define MAP_LOCKED 0x2000 /* pages are locked */ -#define MAP_NORESERVE 0x4000 /* don't check for reservations */ -#define MAP_GROWSDOWN 0x8000 /* stack-like segment */ -#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ -#define MAP_NONBLOCK 0x20000 /* do not block on IO */ - -#define MS_SYNC 1 /* synchronous memory sync */ -#define MS_ASYNC 2 /* sync memory asynchronously */ -#define MS_INVALIDATE 4 /* invalidate the caches */ - -#define MCL_CURRENT 1 /* lock all current mappings */ -#define MCL_FUTURE 2 /* lock all future mappings */ - -#define MADV_NORMAL 0 /* no further special treatment */ -#define MADV_RANDOM 1 /* expect random page references */ -#define MADV_SEQUENTIAL 2 /* expect sequential page references */ -#define MADV_WILLNEED 3 /* will need these pages */ -#define MADV_DONTNEED 4 /* dont need these pages */ -#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ -#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ -#define MADV_VPS_INHERIT 7 /* Inherit parents page size */ - -/* The range 12-64 is reserved for page size specification. */ -#define MADV_4K_PAGES 12 /* Use 4K pages */ -#define MADV_16K_PAGES 14 /* Use 16K pages */ -#define MADV_64K_PAGES 16 /* Use 64K pages */ -#define MADV_256K_PAGES 18 /* Use 256K pages */ -#define MADV_1M_PAGES 20 /* Use 1 Megabyte pages */ -#define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */ -#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */ -#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ - -/* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS -#define MAP_FILE 0 -#define MAP_VARIABLE 0 - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -#endif diff --git a/sysdeps/unix/sysv/linux/hppa/bits/msq.h b/sysdeps/unix/sysv/linux/hppa/bits/msq.h deleted file mode 100644 index 1268dc8..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/msq.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/types.h> -#include <bits/wordsize.h> - -/* Define options for message queue functions. */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#ifdef __USE_GNU -# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ -#endif - -/* Types used in the structure definition. */ -typedef unsigned long int msgqnum_t; -typedef unsigned long int msglen_t; - - -/* Structure of record for one message inside the kernel. - The type `struct msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ -#if __WORDSIZE == 32 - unsigned int __pad1; -#endif - __time_t msg_stime; /* time of last msgsnd command */ -#if __WORDSIZE == 32 - unsigned int __pad2; -#endif - __time_t msg_rtime; /* time of last msgrcv command */ -#if __WORDSIZE == 32 - unsigned int __pad3; -#endif - __time_t msg_ctime; /* time of last change */ - unsigned long int __msg_cbytes; /* current number of bytes on queue */ - msgqnum_t msg_qnum; /* number of messages currently on queue */ - msglen_t msg_qbytes; /* max number of bytes allowed on queue */ - __pid_t msg_lspid; /* pid of last msgsnd() */ - __pid_t msg_lrpid; /* pid of last msgrcv() */ - unsigned long int __unused1; - unsigned long int __unused2; -}; - -#ifdef __USE_MISC - -# define msg_cbytes __msg_cbytes - -/* ipcs ctl commands */ -# define MSG_STAT 11 -# define MSG_INFO 12 - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo - { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short int msgseg; - }; - -#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sem.h b/sysdeps/unix/sysv/linux/hppa/bits/sem.h deleted file mode 100644 index 2880765..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/sem.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_SEM_H -# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead." -#endif - -#include <sys/types.h> -#include <bits/wordsize.h> - -/* Flags for `semop'. */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* Commands for `semctl'. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#define SETALL 17 /* set all semval's */ - - -/* Data structure describing a set of semaphores. */ -struct semid_ds -{ - struct ipc_perm sem_perm; /* operation permission struct */ -#if __WORDSIZE == 32 - unsigned int __pad1; -#endif - __time_t sem_otime; /* last semop() time */ -#if __WORDSIZE == 32 - unsigned int __pad2; -#endif - __time_t sem_ctime; /* last time changed by semctl() */ - unsigned long int sem_nsems; /* number of semaphores in set */ - unsigned long int __unused1; - unsigned long int __unused2; -}; - -/* The user should define a union like the following to use it for arguments - for `semctl'. - - union semun - { - int val; <= value for SETVAL - struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET - unsigned short int *array; <= array for GETALL & SETALL - struct seminfo *__buf; <= buffer for IPC_INFO - }; - - Previous versions of this file used to define this union but this is - incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether - one must define the union or not. */ -#define _SEM_SEMUN_UNDEFINED 1 - -#ifdef __USE_MISC - -/* ipcs ctl cmds */ -# define SEM_STAT 18 -# define SEM_INFO 19 - -struct seminfo -{ - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h deleted file mode 100644 index a91f1f5..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 2000, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_SHM_H -# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead." -#endif - -#include <bits/types.h> -#include <bits/wordsize.h> - -/* Permission flag for shmget. */ -#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */ -#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */ - -/* Flags for `shmat'. */ -#define SHM_RDONLY 010000 /* attach read-only else read-write */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ -#define SHM_REMAP 040000 /* take-over region on attach */ - -/* Commands for `shmctl'. */ -#define SHM_LOCK 11 /* lock segment (root only) */ -#define SHM_UNLOCK 12 /* unlock segment (root only) */ - -/* Segment low boundary address multiple. */ -#define SHMLBA 0x00400000 /* address needs to be 4 Mb aligned */ - -/* Type to count number of attaches. */ -typedef unsigned long int shmatt_t; - -/* Data structure describing a set of semaphores. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ -#if __WORDSIZE == 32 - unsigned int __pad1; -#endif - __time_t shm_atime; /* time of last shmat() */ -#if __WORDSIZE == 32 - unsigned int __pad2; -#endif - __time_t shm_dtime; /* time of last shmdt() */ -#if __WORDSIZE == 32 - unsigned int __pad3; -#endif - __time_t shm_ctime; /* time of last change by shmctl() */ -#if __WORDSIZE == 32 - unsigned int __pad4; -#endif - size_t shm_segsz; /* size of segment in bytes */ - __pid_t shm_cpid; /* pid of creator */ - __pid_t shm_lpid; /* pid of last shmop */ - shmatt_t shm_nattch; /* number of current attaches */ - unsigned long int __unused1; - unsigned long int __unused2; - }; - -#ifdef __USE_MISC - -/* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 - -/* shm_mode upper byte flags */ -# define SHM_DEST 01000 /* segment will be destroyed on last detach */ -# define SHM_LOCKED 02000 /* segment will not be swapped */ -# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ -# define SHM_NORESERVE 010000 /* don't check for reservations */ - -struct shminfo - { - unsigned long shmmax; - unsigned long shmmin; - unsigned long shmmni; - unsigned long shmseg; - unsigned long shmall; - unsigned long __unused1; - unsigned long __unused2; - unsigned long __unused3; - unsigned long __unused4; - }; - -struct shm_info - { - int used_ids; - unsigned long int shm_tot; /* total allocated shm */ - unsigned long int shm_rss; /* total resident shm */ - unsigned long int shm_swp; /* total swapped shm */ - unsigned long int swap_attempts; - unsigned long int swap_successes; - }; - -#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h deleted file mode 100644 index 33f2b23..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Definitions for Linux/HPPA sigaction. - Copyright (C) 1996, 1997, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SIGNAL_H -# error "Never include <bits/sigaction.h> directly; use <signal.h> instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Special flags. */ - unsigned long int sa_flags; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - }; - -/* Bits in `sa_flags'. */ - -#define SA_NOCLDSTOP 0x00000008 /* Don't send SIGCHLD when children stop. */ -#define SA_NOCLDWAIT 0x00000080 /* Don't create zombie on child death. */ -#define SA_SIGINFO 0x00000010 /* Invoke signal-catching function with - three arguments instead of one. */ -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESETHAND 0x00000004 /* Reset to SIG_DFL on entry to handler. */ -# define SA_NODEFER 0x00000020 /* Don't automatically block the signal - when its handler is being executed. */ -# define SA_RESTART 0x00000040 /* Restart syscall on signal return. */ -#endif -#ifdef __USE_MISC -# define SA_INTERRUPT 0x20000000 /* Historic no-op. */ - -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* for blocking signals */ -#define SIG_UNBLOCK 1 /* for unblocking signals */ -#define SIG_SETMASK 2 /* for setting the signal mask */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h deleted file mode 100644 index bf46006..0000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/signum.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Signal number definitions. Linux/HPPA version. - Copyright (C) 1995,1996,1997,1998,1999,2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGABRT 6 /* Abort (ANSI). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGEMT 7 -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* BUS error (4.2 BSD). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad system call. */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGCHLD 18 /* Child status has changed (POSIX). */ -#define SIGPWR 19 /* Power failure restart (System V). */ -#define SIGVTALRM 20 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 21 /* Profiling alarm clock (4.2 BSD). */ -#define SIGPOLL SIGIO /* Pollable event occurred (System V). */ -#define SIGIO 22 /* I/O now possible (4.2 BSD). */ -#define SIGWINCH 23 /* Window size change (4.3 BSD, Sun). */ -#define SIGSTOP 24 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 25 /* Keyboard stop (POSIX). */ -#define SIGCONT 26 /* Continue (POSIX). */ -#define SIGTTIN 27 /* Background read from tty (POSIX). */ -#define SIGTTOU 28 /* Background write to tty (POSIX). */ -#define SIGURG 29 /* Urgent condition on socket (4.2 BSD). */ -#define SIGLOST 30 /* Operating System Has Lost (HP/UX). */ -#define SIGUNUSED 31 -#define SIGXCPU 33 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 34 /* File size limit exceeded (4.2 BSD). */ -#define SIGSTKFLT 36 /* Stack fault. */ - -#define _NSIG 65 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 37 -#define __SIGRTMAX (_NSIG - 1) - -#endif /* <signal.h> included. */ diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c deleted file mode 100644 index a4b4df2..0000000 --- a/sysdeps/unix/sysv/linux/hppa/brk.c +++ /dev/null @@ -1,42 +0,0 @@ -/* brk system call for Linux/HPPA. - Copyright (C) 1995, 1996, 2000, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <unistd.h> -#include <sysdep.h> - -/* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; - -int -__brk (void *addr) -{ - void *newbrk; - - __curbrk = newbrk = (void *) INLINE_SYSCALL (brk, 1, addr); - - if (newbrk < addr) - { - __set_errno (ENOMEM); - return -1; - } - - return 0; -} -weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S deleted file mode 100644 index f497bca..0000000 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000. - Based on the Alpha version by Richard Henderson <rth@tamu.edu>, 1996. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* clone() is even more special than fork() as it mucks with stacks - and invokes a function in the right context after its all over. */ - -#include <asm/unistd.h> -#include <sysdep.h> -#define _ERRNO_H 1 -#include <bits/errno.h> - -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ - - .text -ENTRY(__clone) - /* FIXME: I have no idea how profiling works on hppa. */ - - /* Sanity check arguments. */ - comib,= 0,%arg0,.Lerror /* no NULL function pointers */ - ldi -EINVAL,%ret0 - comib,= 0,%arg1,.Lerror /* no NULL stack pointers */ - nop - - /* Save the fn ptr and arg on the new stack. */ - stwm %arg0,64(%arg1) - stw %arg3,-60(%arg1) - - /* Save the PIC register. */ -#ifdef PIC - stw %r19,-32(%sr0, %sp) /* parent */ -#endif - - /* Do the system call */ - copy %arg2,%arg0 - ble 0x100(%sr2,%r0) - ldi __NR_clone,%r20 - - ldi -4096,%r1 - comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */ - b,n .Lerror - - comib,=,n 0,%ret0,thread_start - - /* Successful return from the parent - No need to restore the PIC register, - since we return immediately. */ - - bv %r0(%rp) - nop - - /* Something bad happened -- no child created */ -.Lerror: - - /* Restore the PIC register on error */ -#ifdef PIC - ldw -32(%sr0, %sp), %r19 /* parent */ -#endif - - b __syscall_error - sub %r0,%ret0,%arg0 - -thread_start: - - /* Load up the arguments. */ - ldw -60(%sr0, %sp),%arg0 - ldw -64(%sr0, %sp),%r22 - - /* $$dyncall fixes childs PIC register */ - - /* Call the user's function */ - bl $$dyncall,%r31 - copy %r31,%rp - - bl _exit,%rp - copy %ret0,%arg0 - - /* Die horribly. */ - iitlbp %r0,(%r0) - -PSEUDO_END(__clone) - -weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/hppa/fcntl.c b/sysdeps/unix/sysv/linux/hppa/fcntl.c deleted file mode 100644 index ea951bc..0000000 --- a/sysdeps/unix/sysv/linux/hppa/fcntl.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/fcntl.c> diff --git a/sysdeps/unix/sysv/linux/hppa/getdents64.c b/sysdeps/unix/sysv/linux/hppa/getdents64.c deleted file mode 100644 index 0c75fb5..0000000 --- a/sysdeps/unix/sysv/linux/hppa/getdents64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getdents64.c> diff --git a/sysdeps/unix/sysv/linux/hppa/getrlimit64.c b/sysdeps/unix/sysv/linux/hppa/getrlimit64.c deleted file mode 100644 index fef018f..0000000 --- a/sysdeps/unix/sysv/linux/hppa/getrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c> diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h b/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h deleted file mode 100644 index af048cb..0000000 --- a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h +++ /dev/null @@ -1,18 +0,0 @@ -/* We have a separate header file here because we do not support - SA_RESTORER on hppa. */ - -/* This is the sigaction struction from the Linux 2.1.20 kernel. */ -/* Blah. This is bogus. We don't ever use it. */ -struct old_kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned long sa_mask; - unsigned long sa_flags; -}; - -/* This is the sigaction structure from the Linux 2.1.68 kernel. */ - -struct kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned long sa_flags; - sigset_t sa_mask; -}; diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h deleted file mode 100644 index a85c5be..0000000 --- a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h +++ /dev/null @@ -1,31 +0,0 @@ -/* definition of "struct stat" from the kernel */ -struct kernel_stat { - unsigned long st_dev; /* dev_t is 32 bits on parisc */ - unsigned long st_ino; /* 32 bits */ - unsigned short st_mode; /* 16 bits */ - unsigned short st_nlink; /* 16 bits */ - unsigned short st_reserved1; /* old st_uid */ - unsigned short st_reserved2; /* old st_gid */ - unsigned long st_rdev; - unsigned long st_size; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - long st_blksize; - long st_blocks; - unsigned long __unused1; /* ACL stuff */ - unsigned long __unused2; /* network */ - unsigned long __unused3; /* network */ - unsigned long __unused4; /* cnodes */ - unsigned short __unused5; /* netsite */ - short st_fstype; - unsigned long st_realdev; - unsigned short st_basemode; - unsigned short st_spareshort; - unsigned long st_uid; - unsigned long st_gid; - unsigned long st_spare4[3]; -}; - -#define _HAVE_STAT_NSEC -#define _HAVE_STAT64_NSEC diff --git a/sysdeps/unix/sysv/linux/hppa/mmap.c b/sysdeps/unix/sysv/linux/hppa/mmap.c deleted file mode 100644 index 6f4bfdc..0000000 --- a/sysdeps/unix/sysv/linux/hppa/mmap.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 1994, 1995, 1996, 1997 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sys/types.h> -#include <sys/mman.h> -#include <errno.h> - -/* Map addresses starting near ADDR and extending for LEN bytes. From - OFFSET into the file FD describes according to PROT and FLAGS. If ADDR - is nonzero, it is the desired mapping address. If the MAP_FIXED bit is - set in FLAGS, the mapping will be at ADDR exactly (which must be - page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or MAP_FAILED - for errors (in which case `errno' is set). A successful `mmap' call - deallocates any previous mapping for the affected region. */ - -#include <sysdep.h> - -__ptr_t -__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) -{ - - __ptr_t ret; - - ret = INLINE_SYSCALL(mmap, 6, addr, len, prot, flags, fd, offset); - - /* check if it's really a negative number */ - if(((unsigned long)ret & 0xfffff000) == 0xfffff000) - return MAP_FAILED; - - return ret; - -} - -strong_alias (__mmap, mmap) diff --git a/sysdeps/unix/sysv/linux/hppa/profil-counter.h b/sysdeps/unix/sysv/linux/hppa/profil-counter.h deleted file mode 100644 index b108be8..0000000 --- a/sysdeps/unix/sysv/linux/hppa/profil-counter.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Machine-dependent SIGPROF signal handler. PA-RISC version - Copyright (C) 1996, 1997, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -static void -profil_counter (int signr, siginfo_t *si, struct ucontext *uctx) -{ - unsigned long ip = uctx->uc_mcontext.sc_iaoq[0] & ~0x3; - profil_count ((void *) ip); -} diff --git a/sysdeps/unix/sysv/linux/hppa/socket.S b/sysdeps/unix/sysv/linux/hppa/socket.S deleted file mode 100644 index dfbb721..0000000 --- a/sysdeps/unix/sysv/linux/hppa/socket.S +++ /dev/null @@ -1,10 +0,0 @@ -#include <sysdep.h> - - .globl __socket -PSEUDO(__socket, socket, 3) - -PSEUDO_END(__socket) - -#ifndef NO_WEAK_ALIAS -weak_alias (__socket, socket) -#endif diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h deleted file mode 100644 index 2e6d109..0000000 --- a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_PROCFS_H -#define _SYS_PROCFS_H 1 - -/* This is somewhat modelled after the file of the same name on SVR4 - systems. It provides a definition of the core file format for ELF - used on Linux. It doesn't have anything to do with the /proc file - system, even though Linux has one. - - Anyway, the whole purpose of this file is for GDB and GDB only. - Don't read too much into it. Don't use it for anything other than - GDB unless you know what you are doing. */ - -#include <features.h> -#include <signal.h> -#include <sys/time.h> -#include <sys/types.h> -#include <sys/ucontext.h> -#include <sys/user.h> -#include <asm/elf.h> - -__BEGIN_DECLS - -struct elf_siginfo - { - int si_signo; /* Signal number. */ - int si_code; /* Extra code. */ - int si_errno; /* Errno. */ - }; - -/* Definitions to generate Intel SVR4-like core files. These mostly - have the same names as the SVR4 types with "elf_" tacked on the - front to prevent clashes with Linux definitions, and the typedef - forms have been avoided. This is mostly like the SVR4 structure, - but more Linuxy, with things that Linux does not support and which - GDB doesn't really use excluded. */ - -struct elf_prstatus - { - struct elf_siginfo pr_info; /* Info associated with signal. */ - short int pr_cursig; /* Current signal. */ - unsigned long int pr_sigpend; /* Set of pending signals. */ - unsigned long int pr_sighold; /* Set of held signals. */ - __pid_t pr_pid; - __pid_t pr_ppid; - __pid_t pr_pgrp; - __pid_t pr_sid; - struct timeval pr_utime; /* User time. */ - struct timeval pr_stime; /* System time. */ - struct timeval pr_cutime; /* Cumulative user time. */ - struct timeval pr_cstime; /* Cumulative system time. */ - elf_gregset_t pr_reg; /* GP registers. */ - int pr_fpvalid; /* True if math copro being used. */ - }; - - -#define ELF_PRARGSZ (80) /* Number of chars for args. */ - -struct elf_prpsinfo - { - char pr_state; /* Numeric process state. */ - char pr_sname; /* Char for pr_state. */ - char pr_zomb; /* Zombie. */ - char pr_nice; /* Nice val. */ - unsigned long int pr_flag; /* Flags. */ - unsigned int pr_uid; - unsigned int pr_gid; - int pr_pid, pr_ppid, pr_pgrp, pr_sid; - /* Lots missing */ - char pr_fname[16]; /* Filename of executable. */ - char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ - }; - - -/* The rest of this file provides the types for emulation of the - Solaris <proc_service.h> interfaces that should be implemented by - users of libthread_db. */ - -/* Addresses. */ -typedef void *psaddr_t; - -/* Register sets. Linux has different names. */ -typedef elf_gregset_t prgregset_t; -typedef elf_fpregset_t prfpregset_t; - -/* We don't have any differences between processes and threads, - therefore have only one PID type. */ -typedef __pid_t lwpid_t; - -/* Process status and info. In the end we do provide typedefs for them. */ -typedef struct elf_prstatus prstatus_t; -typedef struct elf_prpsinfo prpsinfo_t; - -__END_DECLS - -#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h deleted file mode 100644 index 1431143..0000000 --- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Don't rely on this, the interface is currently messed up and may need to - be broken to be fixed. */ -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include <features.h> -#include <signal.h> - -/* We need the signal context definitions even if they are not used - included in <signal.h>. */ -#include <bits/sigcontext.h> - - -/* Type for general register. */ -typedef unsigned long int greg_t; - -/* Number of general registers. */ -#define NGREG 80 -#define NFPREG 32 - -/* Container for all general registers. */ -typedef struct gregset - { - greg_t g_regs[32]; - greg_t sr_regs[8]; - greg_t cr_regs[24]; - greg_t g_pad[16]; - } gregset_t; - -/* Container for all FPU registers. */ -typedef struct fpregset - { - double fp_dregs[32]; - } fpregset_t; - -/* Context to describe whole processor state. */ -typedef struct sigcontext mcontext_t; - -/* Userlevel context. */ -typedef struct ucontext - { - unsigned long int uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - __sigset_t uc_sigmask; - } ucontext_t; - -#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/sysdeps/unix/sysv/linux/hppa/syscall.S deleted file mode 100644 index b333487..0000000 --- a/sysdeps/unix/sysv/linux/hppa/syscall.S +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1995, 1996, 1998, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* HPPA implements syscall() in 'C'; see sysdep.c. */ diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list deleted file mode 100644 index 0f7537c..0000000 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ /dev/null @@ -1,37 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -# semaphore and shm system calls -msgctl - msgctl i:iip __msgctl msgctl -msgget - msgget i:ii __msgget msgget -msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv -msgsnd - msgsnd Ci:ibni __msgsnd msgsnd -shmat - shmat i:ipi __shmat shmat -shmctl - shmctl i:iip __shmctl shmctl -shmdt - shmdt i:s __shmdt shmdt -shmget - shmget i:iii __shmget shmget -semop - semop i:ipi __semop semop -semtimedop - semtimedop i:ipip semtimedop -semget - semget i:iii __semget semget -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 -getpeername - getpeername i:ipp __getpeername getpeername -getsockname - getsockname i:ipp __getsockname getsockname -getsockopt - getsockopt i:iiiBN __getsockopt getsockopt -listen - listen i:ii __listen listen -recv - recv Ci:ibni __libc_recv __recv recv -recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg -send - send Ci:ibni __libc_send __send send -sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg -sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto -setsockopt - setsockopt i:iiibn __setsockopt setsockopt -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 diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c deleted file mode 100644 index 192efba..0000000 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1997, 1998, 2001, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#include <errno.h> - -extern int __syscall_error(int err_no); -extern int syscall (int sysnum, int arg0, int arg1, int arg2, - int arg3, int arg4, int arg5); - -/* This routine is jumped to by all the syscall handlers, to stash - an error number into errno. */ -int -__syscall_error (int err_no) -{ - __set_errno (err_no); - return -1; -} - - -/* HPPA implements syscall() in 'C'; the assembler version would - typically be in syscall.S. Also note that we have INLINE_SYSCALL, - INTERNAL_SYSCALL, and all the generated pure assembly syscall wrappers. - How often the function is used is unknown. */ -int -syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, - int arg5) -{ - /* FIXME: Keep this matching INLINE_SYSCALL for hppa */ - long int __sys_res; - { - register unsigned long int __res asm("r28"); - LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5) - asm volatile (STW_ASM_PIC - " ble 0x100(%%sr2, %%r0) \n" - " copy %1, %%r20 \n" - LDW_ASM_PIC - : "=r" (__res) - : "r" (sysnum) ASM_ARGS_6 - : CALL_CLOB_REGS CLOB_ARGS_6); - __sys_res = __res; - } - if ((unsigned long int) __sys_res >= (unsigned long int) -4095) - { - __set_errno (-__sys_res); - __sys_res = -1; - } - return __sys_res; -} diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h deleted file mode 100644 index 4cfe63c..0000000 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ /dev/null @@ -1,419 +0,0 @@ -/* Assembler macros for PA-RISC. - Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999. - Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <asm/unistd.h> -#include <sysdeps/generic/sysdep.h> -#include <sys/syscall.h> -#include "config.h" - -#ifndef ASM_LINE_SEP -# define ASM_LINE_SEP ; -#endif - -#undef SYS_ify -#define SYS_ify(syscall_name) (__NR_##syscall_name) - -#ifdef PIC -/* WARNING: CANNOT BE USED IN A NOP! */ -# define STW_PIC stw %r19, -32(%sr0, %sp) ASM_LINE_SEP -# define LDW_PIC ldw -32(%sr0, %sp), %r19 ASM_LINE_SEP -# define STW_ASM_PIC " copy %%r19, %%r4\n" -# define LDW_ASM_PIC " copy %%r4, %%r19\n" -# define USING_GR4 "%r4", -#else -# define STW_PIC ASM_LINE_SEP -# define LDW_PIC ASM_LINE_SEP -# define STW_ASM_PIC " \n" -# define LDW_ASM_PIC " \n" -# define USING_GR4 -#endif - -#ifdef __ASSEMBLER__ - -/* Syntactic details of assembler. */ - -#define ALIGNARG(log2) log2 - -/* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h - of the kernel. But these symbols do not follow the SYS_* syntax - so we have to redefine the `SYS_ify' macro here. */ -#undef SYS_ify -#define SYS_ify(syscall_name) __NR_##syscall_name - -/* ELF-like local names start with `.L'. */ -#undef L -#define L(name) .L##name - -/* Linux uses a negative return value to indicate syscall errors, - unlike most Unices, which use the condition codes' carry flag. - - Since version 2.1 the return value of a system call might be - negative even if the call succeeded. E.g., the `lseek' system call - might return a large offset. Therefore we must not anymore test - for < 0, but test for a real error by making sure the value in %eax - is a real error number. Linus said he will make sure the no syscall - returns a value in -1 .. -4095 as a valid result so we can safely - test with -4095. */ - -/* We don't want the label for the error handle to be global when we define - it here. */ -#ifdef PIC -# define SYSCALL_ERROR_LABEL 0f -#else -# define SYSCALL_ERROR_LABEL syscall_error -#endif - -/* Define an entry point visible from C. - - There is currently a bug in gdb which prevents us from specifying - incomplete stabs information. Fake some entries here which specify - the current source file. */ -#define ENTRY(name) \ - .text ASM_LINE_SEP \ - .export C_SYMBOL_NAME(name) ASM_LINE_SEP \ - .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \ - C_LABEL(name) ASM_LINE_SEP \ - CALL_MCOUNT ASM_LINE_SEP - -#undef END -#define END(name) \ -1: ASM_LINE_SEP \ -.size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) ASM_LINE_SEP - -/* If compiled for profiling, call `mcount' at the start of each function. */ -/* No, don't bother. gcc will put the call in for us. */ -#define CALL_MCOUNT /* Do nothing. */ - -/* syscall wrappers consist of - #include <sysdep.h> - PSEUDO(...) - ret - PSEUDO_END(...) - - which means - ENTRY(name) - DO_CALL(...) - nop - bv 0(2) - nop -*/ - -#define PSEUDO(name, syscall_name, args) \ - ENTRY (name) \ - DO_CALL(syscall_name, args) ASM_LINE_SEP \ - nop ASM_LINE_SEP - -#define ret \ - /* Return value set by ERRNO code */ ASM_LINE_SEP \ - bv 0(2) ASM_LINE_SEP \ - nop ASM_LINE_SEP - -#undef PSEUDO_END -#define PSEUDO_END(name) \ - END (name) - -/* We don't set the errno on the return from the syscall */ -#define PSEUDO_NOERRNO(name, syscall_name, args) \ - ENTRY (name) \ - DO_CALL_NOERRNO(syscall_name, args) ASM_LINE_SEP \ - nop ASM_LINE_SEP - -#define ret_NOERRNO ret - -#undef PSEUDO_END_NOERRNO -#define PSEUDO_END_NOERRNO(name) \ - END (name) - -/* This has to return the error value */ -#undef PSEUDO_ERRVAL -#define PSEUDO_ERRVAL(name, syscall_name, args) \ - ENTRY(name) \ - DO_CALL_ERRVAL(syscall_name, args) ASM_LINE_SEP \ - nop ASM_LINE_SEP - -#define ret_ERRVAL ret - -#undef PSEUDO_END_ERRVAL -#define PSEUDO_END_ERRVAL(name) \ - END(name) - -#undef JUMPTARGET -#define JUMPTARGET(name) name -#define SYSCALL_PIC_SETUP /* Nothing. */ - - -/* All the syscall assembly macros rely on finding the approriate - SYSCALL_ERROR_LABEL or rather HANDLER. */ - -/* int * __errno_location(void) so you have to store your value - into the return address! */ -#define DEFAULT_SYSCALL_ERROR_HANDLER \ - .import __errno_location,code ASM_LINE_SEP \ - /* branch to errno handler */ ASM_LINE_SEP \ - bl __errno_location,%rp ASM_LINE_SEP - -/* Here are the myriad of configuration options that the above can - work for... what we've done is provide the framework for future - changes if required to each section */ - -#ifdef PIC -# if RTLD_PRIVATE_ERRNO -# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER -# else /* !RTLD_PRIVATE_ERRNO */ -# if defined _LIBC_REENTRANT -# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER -# else /* !_LIBC_REENTRANT */ -# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER -# endif /* _LIBC_REENTRANT */ -# endif /* RTLD_PRIVATE_ERRNO */ -#else -# ifndef _LIBC_REENTRANT -# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER -# else -# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER -# endif -#endif - - -/* Linux takes system call arguments in registers: - syscall number gr20 - arg 1 gr26 - arg 2 gr25 - arg 3 gr24 - arg 4 gr23 - arg 5 gr22 - arg 6 gr21 - - The compiler calls us by the C convention: - syscall number in the DO_CALL macro - arg 1 gr26 - arg 2 gr25 - arg 3 gr24 - arg 4 gr23 - arg 5 -52(gr30) - arg 6 -56(gr30) - - gr22 and gr21 are caller-saves, so we can just load the arguments - there and generally be happy. */ - -/* the cmpb...no_error code below inside DO_CALL - * is intended to mimic the if (__sys_res...) - * code inside INLINE_SYSCALL - */ - -#undef DO_CALL -#define DO_CALL(syscall_name, args) \ - DOARGS_##args ASM_LINE_SEP \ - STW_PIC ASM_LINE_SEP \ - /* Do syscall, delay loads # */ ASM_LINE_SEP \ - ble 0x100(%sr2,%r0) ASM_LINE_SEP \ - ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ - ldi -0x1000,%r1 ASM_LINE_SEP \ - cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \ - /* save rp or we get lost */ ASM_LINE_SEP \ - stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \ - /* Restore r19 from frame */ ASM_LINE_SEP \ - LDW_PIC ASM_LINE_SEP \ - stw %ret0, -24(%sr0,%sp) ASM_LINE_SEP \ - SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ - /* create frame */ ASM_LINE_SEP \ - ldo 64(%sp), %sp ASM_LINE_SEP \ - ldo -64(%sp), %sp ASM_LINE_SEP \ - /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \ - /* do a -1*syscall_ret0 */ ASM_LINE_SEP \ - ldw -24(%sr0,%sp), %r26 ASM_LINE_SEP \ - sub %r0, %r26, %r26 ASM_LINE_SEP \ - /* Store into errno location */ ASM_LINE_SEP \ - stw %r26, 0(%sr0,%ret0) ASM_LINE_SEP \ - /* return -1 as error */ ASM_LINE_SEP \ - ldo -1(%r0), %ret0 ASM_LINE_SEP \ - ldw -20(%sr0,%sp), %rp ASM_LINE_SEP \ -0: ASM_LINE_SEP \ - UNDOARGS_##args ASM_LINE_SEP - -/* We do nothing with the return, except hand it back to someone else */ -#undef DO_CALL_NOERRNO -#define DO_CALL_NOERRNO(syscall_name, args) \ - DOARGS_##args \ - /* No need to store r19 */ ASM_LINE_SEP \ - ble 0x100(%sr2,%r0) ASM_LINE_SEP \ - ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ - /* Caller will restore r19 */ ASM_LINE_SEP \ - UNDOARGS_##args - -/* Here, we return the ERRVAL in assembly, note we don't call the - error handler function, but we do 'negate' the return _IF_ - it's an error. Not sure if this is the right semantic. */ - -#undef DO_CALL_ERRVAL -#define DO_CALL_ERRVAL(syscall_name, args) \ - DOARGS_##args ASM_LINE_SEP \ - /* No need to store r19 */ ASM_LINE_SEP \ - ble 0x100(%sr2,%r0) ASM_LINE_SEP \ - ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ - /* Caller will restore r19 */ ASM_LINE_SEP \ - ldi -0x1000,%r1 ASM_LINE_SEP \ - cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \ - sub %r0, %ret0, %ret0 ASM_LINE_SEP \ -0: ASM_LINE_SEP \ - UNDOARGS_##args ASM_LINE_SEP - -#define DOARGS_0 /* nothing */ -#define DOARGS_1 /* nothing */ -#define DOARGS_2 /* nothing */ -#define DOARGS_3 /* nothing */ -#define DOARGS_4 /* nothing */ -#define DOARGS_5 ldw -52(%r30), %r22 ASM_LINE_SEP -#define DOARGS_6 ldw -52(%r30), %r22 ASM_LINE_SEP \ - ldw -56(%r30), %r21 ASM_LINE_SEP - - -#define UNDOARGS_0 /* nothing */ -#define UNDOARGS_1 /* nothing */ -#define UNDOARGS_2 /* nothing */ -#define UNDOARGS_3 /* nothing */ -#define UNDOARGS_4 /* nothing */ -#define UNDOARGS_5 /* nothing */ -#define UNDOARGS_6 /* nothing */ - -#else - -/* GCC has to be warned that a syscall may clobber all the ABI - registers listed as "caller-saves", see page 8, Table 2 - in section 2.2.6 of the PA-RISC RUN-TIME architecture - document. However! r28 is the result and will conflict with - the clobber list so it is left out. Also the input arguments - registers r20 -> r26 will conflict with the list so they - are treated specially. Although r19 is clobbered by the syscall - we cannot say this because it would violate ABI, thus we say - r4 is clobbered and use that register to save/restore r19 - across the syscall. */ - -#define CALL_CLOB_REGS "%r1", "%r2", USING_GR4 \ - "%r20", "%r29", "%r31" - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) ({ \ - long __sys_res; \ - { \ - register unsigned long __res asm("r28"); \ - LOAD_ARGS_##nr(args) \ - /* FIXME: HACK stw/ldw r19 around syscall */ \ - asm volatile( \ - STW_ASM_PIC \ - " ble 0x100(%%sr2, %%r0)\n" \ - " ldi %1, %%r20\n" \ - LDW_ASM_PIC \ - : "=r" (__res) \ - : "i" (SYS_ify(name)) ASM_ARGS_##nr \ - : CALL_CLOB_REGS CLOB_ARGS_##nr \ - ); \ - __sys_res = (long)__res; \ - } \ - if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){ \ - __set_errno(-__sys_res); \ - __sys_res = -1; \ - } \ - __sys_res; \ -}) - -/* INTERNAL_SYSCALL_DECL - Allows us to setup some function static - value to use within the context of the syscall - INTERNAL_SYSCALL_ERROR_P - Returns 0 if it wasn't an error, 1 otherwise - You are allowed to use the syscall result (val) and the DECL error variable - to determine what went wrong. - INTERLAL_SYSCALL_ERRNO - Munges the val/err pair into the error number. - In our case we just flip the sign. */ - -#undef INTERNAL_SYSCALL_DECL -#define INTERNAL_SYSCALL_DECL(err) do { } while (0) - -/* Equivalent to (val < 0)&&(val > -4095) which is what we want */ -#undef INTERNAL_SYSCALL_ERROR_P -#define INTERNAL_SYSCALL_ERROR_P(val, err) \ - ((unsigned long)val >= (unsigned long)-4095) - -#undef INTERNAL_SYSCALL_ERRNO -#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) - -/* Similar to INLINE_SYSCALL but we don't set errno */ -#undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) \ -({ \ - long __sys_res; \ - { \ - register unsigned long __res asm("r28"); \ - LOAD_ARGS_##nr(args) \ - /* FIXME: HACK stw/ldw r19 around syscall */ \ - asm volatile( \ - STW_ASM_PIC \ - " ble 0x100(%%sr2, %%r0)\n" \ - " ldi %1, %%r20\n" \ - LDW_ASM_PIC \ - : "=r" (__res) \ - : "i" (SYS_ify(name)) ASM_ARGS_##nr \ - : CALL_CLOB_REGS CLOB_ARGS_##nr \ - ); \ - __sys_res = (long)__res; \ - } \ - __sys_res; \ - }) - -#define LOAD_ARGS_0() -#define LOAD_ARGS_1(r26) \ - register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \ - LOAD_ARGS_0() -#define LOAD_ARGS_2(r26,r25) \ - register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \ - LOAD_ARGS_1(r26) -#define LOAD_ARGS_3(r26,r25,r24) \ - register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \ - LOAD_ARGS_2(r26,r25) -#define LOAD_ARGS_4(r26,r25,r24,r23) \ - register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \ - LOAD_ARGS_3(r26,r25,r24) -#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \ - register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \ - LOAD_ARGS_4(r26,r25,r24,r23) -#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ - register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \ - LOAD_ARGS_5(r26,r25,r24,r23,r22) - -/* Even with zero args we use r20 for the syscall number */ -#define ASM_ARGS_0 -#define ASM_ARGS_1 ASM_ARGS_0, "r" (__r26) -#define ASM_ARGS_2 ASM_ARGS_1, "r" (__r25) -#define ASM_ARGS_3 ASM_ARGS_2, "r" (__r24) -#define ASM_ARGS_4 ASM_ARGS_3, "r" (__r23) -#define ASM_ARGS_5 ASM_ARGS_4, "r" (__r22) -#define ASM_ARGS_6 ASM_ARGS_5, "r" (__r21) - -/* The registers not listed as inputs but clobbered */ -#define CLOB_ARGS_6 -#define CLOB_ARGS_5 CLOB_ARGS_6, "%r21" -#define CLOB_ARGS_4 CLOB_ARGS_5, "%r22" -#define CLOB_ARGS_3 CLOB_ARGS_4, "%r23" -#define CLOB_ARGS_2 CLOB_ARGS_3, "%r24" -#define CLOB_ARGS_1 CLOB_ARGS_2, "%r25" -#define CLOB_ARGS_0 CLOB_ARGS_1, "%r26" - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c deleted file mode 100644 index e7c5690..0000000 --- a/sysdeps/unix/sysv/linux/hppa/umount.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Huggins-Daines <dhd@debian.org>, 2000. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Since we don't have an oldumount system call, do what the kernel - does down here. */ - -extern long int __umount2 (const char *name, int flags); - -long int -__umount (const char *name) -{ - return __umount2 (name, 0); -} - -weak_alias (__umount, umount); diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile deleted file mode 100644 index 6bb4f6b..0000000 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# Linux/m68k uses Motorola asm syntax and the ELF format. - -m68k-syntax-flag = -DMOTOROLA_SYNTAX - -ifeq ($(subdir),misc) -sysdep_routines += mremap -sysdep_headers += sys/reg.h -endif - -ifeq ($(subdir),elf) -sysdep-others += lddlibc4 -install-bin += lddlibc4 -endif - -ifeq ($(subdir),resource) -sysdep_routines += oldgetrlimit64 -endif diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions deleted file mode 100644 index 0799bf3..0000000 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ /dev/null @@ -1,32 +0,0 @@ -libc { - GLIBC_2.0 { - # Exception handling support functions from libgcc - __register_frame; __register_frame_table; __deregister_frame; - __frame_state_for; __register_frame_info_table; - - # c* - cacheflush; - } - GLIBC_2.2 { - # functions used in other libraries - __xstat64; __fxstat64; __lxstat64; - - # a* - alphasort64; - - # g* - glob64; - - # New rlimit interface - getrlimit; setrlimit; getrlimit64; - - # r* - readdir64; readdir64_r; - - # s* - scandir64; - - # v* - versionsort64; - } -} diff --git a/sysdeps/unix/sysv/linux/m68k/alphasort64.c b/sysdeps/unix/sysv/linux/m68k/alphasort64.c deleted file mode 100644 index 0b5ae47..0000000 --- a/sysdeps/unix/sysv/linux/m68k/alphasort64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/alphasort64.c> diff --git a/sysdeps/unix/sysv/linux/m68k/bits/a.out.h b/sysdeps/unix/sysv/linux/m68k/bits/a.out.h deleted file mode 100644 index 0fb52c3..0000000 --- a/sysdeps/unix/sysv/linux/m68k/bits/a.out.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef __A_OUT_GNU_H__ -# error "Never use <bits/a.out.h> directly; include <a.out.h> instead." -#endif diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h deleted file mode 100644 index 90c0a48..0000000 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ /dev/null @@ -1,188 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 2000, 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FCNTL_H -# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." -#endif - - -#include <sys/types.h> - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 - -#ifdef __USE_GNU -# define O_DIRECTORY 040000 /* Must be a directory. */ -# define O_NOFOLLOW 0100000 /* Do not follow links. */ -# define O_DIRECT 0200000 /* Direct disk access. */ -# define O_NOATIME 01000000 /* Do not set atime. */ -#endif - -/* For now Linux has synchronisity options for data and read operations. - We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ -#endif - -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 0400000 -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#ifndef __USE_FILE_OFFSET64 -# define F_GETLK 5 /* Get record locking info. */ -# define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ -#else -# define F_GETLK F_GETLK64 /* Get record locking info. */ -# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ -# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ -#endif -#define F_GETLK64 12 /* Get record locking info. */ -#define F_SETLK64 13 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 14 /* Set record locking info (blocking). */ - -#if defined __USE_BSD || defined __USE_UNIX98 -# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ -#endif - -#ifdef __USE_GNU -# define F_SETSIG 10 /* Set number of signal to be sent. */ -# define F_GETSIG 11 /* Get number of signal to be sent. */ -#endif - -#ifdef __USE_GNU -# define F_SETLEASE 1024 /* Set a lease. */ -# define F_GETLEASE 1025 /* Enquire what lease is active. */ -# define F_NOTIFY 1026 /* Request notfications on a directory. */ -#endif - -/* For F_[GET|SET]FL. */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ -#define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ - -/* For old implementation of bsd flock(). */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -#ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation. */ -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -#ifdef __USE_GNU -# define LOCK_MAND 32 /* This is a mandatory flock: */ -# define LOCK_READ 64 /* ... which allows concurrent read operations. */ -# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ -#endif - -#ifdef __USE_GNU -/* Types of directory notifications that may be requested with F_NOTIFY. */ -# define DN_ACCESS 0x00000001 /* File accessed. */ -# define DN_MODIFY 0x00000002 /* File modified. */ -# define DN_CREATE 0x00000004 /* File created. */ -# define DN_DELETE 0x00000008 /* File removed. */ -# define DN_RENAME 0x00000010 /* File renamed. */ -# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ -#endif - -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ -#ifndef __USE_FILE_OFFSET64 - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#else - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ -#endif - __pid_t l_pid; /* Process holding the lock. */ - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; -#endif - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ - -/* Advise to `posix_fadvise'. */ -#ifdef __USE_XOPEN2K -# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ -#endif - -__BEGIN_DECLS - -/* Provide kernel hint to read ahead. */ -extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) - __THROW; - -__END_DECLS diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h deleted file mode 100644 index fbec1a0..0000000 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ /dev/null @@ -1,102 +0,0 @@ -/* Definitions for POSIX memory map interface. Linux/m68k version. - Copyright (C) 1997, 2000, 2003, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_MMAN_H -# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." -#endif - -/* The following definitions basically come from the kernel headers. - But the kernel header is not namespace clean. */ - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - -/* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x02000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ -# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ -# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h deleted file mode 100644 index f7a7393..0000000 --- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1997, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_POLL_H -# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." -#endif - -/* Event types that can be polled for. These bits may be set in `events' - to indicate the interesting event types; they will appear in `revents' - to indicate the status of the file descriptor. */ -#define POLLIN 0x001 /* There is data to read. */ -#define POLLPRI 0x002 /* There is urgent data to read. */ -#define POLLOUT 0x004 /* Writing now will not block. */ - -#ifdef __USE_XOPEN -/* These values are defined in XPG4.2. */ -# define POLLRDNORM 0x040 /* Normal data may be read. */ -# define POLLRDBAND 0x080 /* Priority data may be read. */ -# define POLLWRNORM POLLOUT /* Writing now will not block. */ -# define POLLWRBAND 0x100 /* Priority data may be written. */ -#endif - -/* Event types always implicitly polled for. These bits need not be set in - `events', but they will appear in `revents' to indicate the status of - the file descriptor. */ -#define POLLERR 0x008 /* Error condition. */ -#define POLLHUP 0x010 /* Hung up. */ -#define POLLNVAL 0x020 /* Invalid polling request. */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h deleted file mode 100644 index dc06b13..0000000 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002 - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_STAT_H -# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_LINUX_OLD 1 -#define _STAT_VER_KERNEL 1 -#define _STAT_VER_SVR4 2 -#define _STAT_VER_LINUX 3 -#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 1 -#define _MKNOD_VER_SVR4 2 -#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ - - -struct stat - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; -#ifndef __USE_FILE_OFFSET64 - __ino_t st_ino; /* File serial number. */ -#else - __ino_t __st_ino; /* 32bit file serial number. */ -#endif - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned short int __pad2; -#ifndef __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - __off64_t st_size; /* Size of file, in bytes. */ -#endif - __blksize_t st_blksize; /* Optimal block size for I/O. */ - -#ifndef __USE_FILE_OFFSET64 - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#endif -#ifdef __USE_MISC - /* Nanosecond resolution timestamps are stored in a format - equivalent to 'struct timespec'. This is the type used - whenever possible but the Unix namespace rules do not allow the - identifier 'timespec' to appear in the <sys/stat.h> header. - Therefore we have to handle the use of this header in strictly - standard-compliant sources special. */ - struct timespec st_atim; /* Time of last access. */ - struct timespec st_mtim; /* Time of last modification. */ - struct timespec st_ctim; /* Time of last status change. */ -# define st_atime st_atim.tv_sec /* Backward compatibility. */ -# define st_mtime st_mtim.tv_sec -# define st_ctime st_ctim.tv_sec -#else - __time_t st_atime; /* Time of last access. */ - unsigned long int st_atimensec; /* Nscecs of last access. */ - __time_t st_mtime; /* Time of last modification. */ - unsigned long int st_mtimensec; /* Nsecs of last modification. */ - __time_t st_ctime; /* Time of last status change. */ - unsigned long int st_ctimensec; /* Nsecs of last status change. */ -#endif -#ifndef __USE_FILE_OFFSET64 - unsigned long int __unused4; - unsigned long int __unused5; -#else - __ino64_t st_ino; /* File serial number. */ -#endif - }; - -#ifdef __USE_LARGEFILE64 -struct stat64 - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; - - __ino_t __st_ino; /* 32bit file serial number. */ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned short int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#ifdef __USE_MISC - /* Nanosecond resolution timestamps are stored in a format - equivalent to 'struct timespec'. This is the type used - whenever possible but the Unix namespace rules do not allow the - identifier 'timespec' to appear in the <sys/stat.h> header. - Therefore we have to handle the use of this header in strictly - standard-compliant sources special. */ - struct timespec st_atim; /* Time of last access. */ - struct timespec st_mtim; /* Time of last modification. */ - struct timespec st_ctim; /* Time of last status change. */ -#else - __time_t st_atime; /* Time of last access. */ - unsigned long int st_atimensec; /* Nscecs of last access. */ - __time_t st_mtime; /* Time of last modification. */ - unsigned long int st_mtimensec; /* Nsecs of last modification. */ - __time_t st_ctime; /* Time of last status change. */ - unsigned long int st_ctimensec; /* Nsecs of last status change. */ -#endif - __ino64_t st_ino; /* File serial number. */ - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV -/* Nanosecond resolution time values are supported. */ -#define _STATBUF_ST_NSEC - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. Note that these macros always evaluate to zero. But - they do it by enforcing the correct use of the macros. */ -#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c deleted file mode 100644 index 6b2c928..0000000 --- a/sysdeps/unix/sysv/linux/m68k/brk.c +++ /dev/null @@ -1,48 +0,0 @@ -/* brk system call for Linux/m68k. - Copyright (C) 1996, 1997, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <unistd.h> -#include <sysdep.h> - -void *__curbrk = 0; - -/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt - to work around different old braindamage in the old Linux/x86 ELF - dynamic linker. Sigh. */ -weak_alias (__curbrk, ___brk_addr) - -int -__brk (void *addr) -{ - void *newbrk; - - INTERNAL_SYSCALL_DECL (err); - newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr); - __curbrk = newbrk; - - if (newbrk < addr) - { - __set_errno (ENOMEM); - return -1; - } - - return 0; -} -weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c deleted file mode 100644 index e7193dc..0000000 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 1998,2000,2002,2003,2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <unistd.h> - -#include <sysdep.h> -#include <sys/syscall.h> -#include <bp-checks.h> - -#include <linux/posix_types.h> -#include <kernel-features.h> - -#ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -#endif /* __NR_chown32 */ - -int -__chown (const char *file, uid_t owner, gid_t group) -{ -#if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); -#else -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - int result; - int saved_errno = errno; - - result = INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); - if (result == 0 || errno != ENOSYS) - return result; - - __set_errno (saved_errno); - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - - if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group); -#endif -} -libc_hidden_def (__chown) -weak_alias (__chown, chown) diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S deleted file mode 100644 index 6baf723..0000000 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 1996,97,98,2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* clone is even more special than fork as it mucks with stacks - and invokes a function in the right context after its all over. */ - -#include <sysdep.h> -#define _ERRNO_H 1 -#include <bits/errno.h> - -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ - - .text -ENTRY (__clone) - - /* Sanity check arguments. */ - movel #-EINVAL, %d0 - movel 4(%sp), %a0 /* no NULL function pointers */ - tstl %a0 - jeq SYSCALL_ERROR_LABEL - movel 8(%sp), %a1 /* no NULL stack pointers */ - tstl %a1 - jeq SYSCALL_ERROR_LABEL - - /* Allocate space and copy the argument onto the new stack. */ - movel 16(%sp), -(%a1) - - /* Do the system call */ - exg %d2, %a1 /* save %d2 and get stack pointer */ - movel 12(%sp), %d1 /* get flags */ - movel #SYS_ify (clone), %d0 - trap #0 - exg %d2, %a1 /* restore %d2 */ - - tstl %d0 - jmi SYSCALL_ERROR_LABEL - jeq thread_start - - rts - -thread_start: - subl %fp, %fp /* terminate the stack frame */ - jsr (%a0) - movel %d0, %d1 - movel #SYS_ify (exit), %d0 - trap #0 - -PSEUDO_END (__clone) - -weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/m68k/dl-librecon.h b/sysdeps/unix/sysv/linux/m68k/dl-librecon.h deleted file mode 100644 index dbb4e75..0000000 --- a/sysdeps/unix/sysv/linux/m68k/dl-librecon.h +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/dl-librecon.h> diff --git a/sysdeps/unix/sysv/linux/m68k/fchown.c b/sysdeps/unix/sysv/linux/m68k/fchown.c deleted file mode 100644 index 3a69ecc..0000000 --- a/sysdeps/unix/sysv/linux/m68k/fchown.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/fchown.c> diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c deleted file mode 100644 index 6cc0932..0000000 --- a/sysdeps/unix/sysv/linux/m68k/fchownat.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (C) 2005, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <fcntl.h> -#include <stdio.h> -#include <unistd.h> -#include <string.h> - -#include <sysdep.h> -#include <sys/syscall.h> -#include <bp-checks.h> - -#include <linux/posix_types.h> -#include <kernel-features.h> - -#ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -#endif /* __NR_chown32 */ - -int -fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) -{ - if (flag & ~AT_SYMLINK_NOFOLLOW) - { - __set_errno (EINVAL); - return -1; - } - - char *buf = NULL; - - if (fd != AT_FDCWD && file[0] != '/') - { - size_t filelen = strlen (file); - static const char procfd[] = "/proc/self/fd/%d/%s"; - /* Buffer for the path name we are going to use. It consists of - - the string /proc/self/fd/ - - the file descriptor number - - the file name provided. - The final NUL is included in the sizeof. A bit of overhead - due to the format elements compensates for possible negative - numbers. */ - size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; - buf = alloca (buflen); - - __snprintf (buf, buflen, procfd, fd, file); - file = buf; - } - - int result; - INTERNAL_SYSCALL_DECL (err); - -#if __ASSUME_32BITUIDS > 0 - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); -#else -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), - owner, group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - - if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, - group); -#endif - - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - { - fail: - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - result = -1; - } - - return result; -} diff --git a/sysdeps/unix/sysv/linux/m68k/fcntl.c b/sysdeps/unix/sysv/linux/m68k/fcntl.c deleted file mode 100644 index ea951bc..0000000 --- a/sysdeps/unix/sysv/linux/m68k/fcntl.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/fcntl.c> diff --git a/sysdeps/unix/sysv/linux/m68k/fxstat.c b/sysdeps/unix/sysv/linux/m68k/fxstat.c deleted file mode 100644 index 4f219f0..0000000 --- a/sysdeps/unix/sysv/linux/m68k/fxstat.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/fxstat.c> diff --git a/sysdeps/unix/sysv/linux/m68k/fxstatat.c b/sysdeps/unix/sysv/linux/m68k/fxstatat.c deleted file mode 100644 index 0f8b313..0000000 --- a/sysdeps/unix/sysv/linux/m68k/fxstatat.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/fxstatat.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getdents64.c b/sysdeps/unix/sysv/linux/m68k/getdents64.c deleted file mode 100644 index 0c75fb5..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getdents64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getdents64.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getegid.c b/sysdeps/unix/sysv/linux/m68k/getegid.c deleted file mode 100644 index 37b4b4a..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getegid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getegid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/geteuid.c b/sysdeps/unix/sysv/linux/m68k/geteuid.c deleted file mode 100644 index ebcb555..0000000 --- a/sysdeps/unix/sysv/linux/m68k/geteuid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/geteuid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getgid.c b/sysdeps/unix/sysv/linux/m68k/getgid.c deleted file mode 100644 index 0a4d606..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getgid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getgid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getgroups.c b/sysdeps/unix/sysv/linux/m68k/getgroups.c deleted file mode 100644 index 102ea24..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getgroups.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We also have to rewrite the kernel gid_t to the user land type. */ -#include <sysdeps/unix/sysv/linux/i386/getgroups.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getmsg.c b/sysdeps/unix/sysv/linux/m68k/getmsg.c deleted file mode 100644 index 3a1fa08..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getmsg.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getmsg.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c deleted file mode 100644 index f7ffdc5..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@suse.de>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <unistd.h> -#include <sys/param.h> -#include <errno.h> - -#include <ldsodefs.h> -#include <sysdep.h> -#include <sys/syscall.h> - -/* Return the system page size. */ -int -__getpagesize () -{ -#ifdef __NR_getpagesize - int result; -#endif - - if (GLRO(dl_pagesize) != 0) - return GLRO(dl_pagesize); - -#ifdef __NR_getpagesize - INTERNAL_SYSCALL_DECL (err); - result = INTERNAL_SYSCALL (getpagesize, err, 0); - /* The only possible error is ENOSYS. */ - if (!INTERNAL_SYSCALL_ERROR_P (result, err)) - return result; -#endif - - return 4096; -} -libc_hidden_def (__getpagesize) -weak_alias (__getpagesize, getpagesize) diff --git a/sysdeps/unix/sysv/linux/m68k/getresgid.c b/sysdeps/unix/sysv/linux/m68k/getresgid.c deleted file mode 100644 index b703a41..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getresgid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getresgid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getresuid.c b/sysdeps/unix/sysv/linux/m68k/getresuid.c deleted file mode 100644 index 0b14cef..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getresuid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getresuid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit.c b/sysdeps/unix/sysv/linux/m68k/getrlimit.c deleted file mode 100644 index fc06dbd..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getrlimit.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getrlimit.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit64.c b/sysdeps/unix/sysv/linux/m68k/getrlimit64.c deleted file mode 100644 index fef018f..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getsysstats.c b/sysdeps/unix/sysv/linux/m68k/getsysstats.c deleted file mode 100644 index 23207e9..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getsysstats.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Determine various system internal values, Linux/m68k version. - Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@suse.de> - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - - -/* We need to define a special parser for /proc/cpuinfo. */ -#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ - do \ - { \ - (RESULT) = 0; \ - /* Read all lines and count the lines starting with the string \ - "CPU:". We don't have to fear extremely long lines since \ - the kernel will not generate them. 8192 bytes are really \ - enough. */ \ - while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ - if (strncmp (BUFFER, "CPU:", 4) == 0) \ - ++(RESULT); \ - } \ - while (0) - -#include <sysdeps/unix/sysv/linux/getsysstats.c> diff --git a/sysdeps/unix/sysv/linux/m68k/getuid.c b/sysdeps/unix/sysv/linux/m68k/getuid.c deleted file mode 100644 index d682c79..0000000 --- a/sysdeps/unix/sysv/linux/m68k/getuid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/getuid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/glob64.c b/sysdeps/unix/sysv/linux/m68k/glob64.c deleted file mode 100644 index 82a9a29..0000000 --- a/sysdeps/unix/sysv/linux/m68k/glob64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/glob64.c> diff --git a/sysdeps/unix/sysv/linux/m68k/lchown.c b/sysdeps/unix/sysv/linux/m68k/lchown.c deleted file mode 100644 index c89de99..0000000 --- a/sysdeps/unix/sysv/linux/m68k/lchown.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/lchown.c> diff --git a/sysdeps/unix/sysv/linux/m68k/ldconfig.h b/sysdeps/unix/sysv/linux/m68k/ldconfig.h deleted file mode 100644 index 953f192..0000000 --- a/sysdeps/unix/sysv/linux/m68k/ldconfig.h +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/ldconfig.h> diff --git a/sysdeps/unix/sysv/linux/m68k/lockf64.c b/sysdeps/unix/sysv/linux/m68k/lockf64.c deleted file mode 100644 index a88f5a7..0000000 --- a/sysdeps/unix/sysv/linux/m68k/lockf64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/lockf64.c> diff --git a/sysdeps/unix/sysv/linux/m68k/lxstat.c b/sysdeps/unix/sysv/linux/m68k/lxstat.c deleted file mode 100644 index 2371cd9..0000000 --- a/sysdeps/unix/sysv/linux/m68k/lxstat.c +++ /dev/null @@ -1,2 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/lxstat.c> - diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S deleted file mode 100644 index 086212a..0000000 --- a/sysdeps/unix/sysv/linux/m68k/mmap.S +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - - .text -ENTRY (__mmap) - - move.l #SYS_ify (mmap), %d0 /* System call number in %d0. */ - - lea 4(%sp), %a0 /* Address of args is 1st arg. */ - move.l %a0, %d1 - - /* Do the system call trap. */ - trap #0 - - /* Kludge: negative numbers are among the legal return values. - If %d0 is between -4096 and 0 then there was an error. */ - cmp.l #-4096, %d0 - jhi SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. Copy it to %a0 because - mmap is declared to return a pointer. */ - move.l %d0, %a0 - rts -PSEUDO_END (__mmap) - -weak_alias (__mmap, mmap) diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S deleted file mode 100644 index 68d961b..0000000 --- a/sysdeps/unix/sysv/linux/m68k/mremap.S +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1996 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - -/* The mremap system call is special because it needs to return - its value in register %a0. */ - - .text -PSEUDO (__mremap, mremap, 4) - move.l %d0, %a0 - rts -PSEUDO_END (__mremap) -weak_alias (__mremap, mremap) diff --git a/sysdeps/unix/sysv/linux/m68k/msgctl.c b/sysdeps/unix/sysv/linux/m68k/msgctl.c deleted file mode 100644 index 9f9b843..0000000 --- a/sysdeps/unix/sysv/linux/m68k/msgctl.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/msgctl.c> diff --git a/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c deleted file mode 100644 index 4c27e95..0000000 --- a/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c> diff --git a/sysdeps/unix/sysv/linux/m68k/putmsg.c b/sysdeps/unix/sysv/linux/m68k/putmsg.c deleted file mode 100644 index ebc1680..0000000 --- a/sysdeps/unix/sysv/linux/m68k/putmsg.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/putmsg.c> diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64.c b/sysdeps/unix/sysv/linux/m68k/readdir64.c deleted file mode 100644 index 2ea26dd..0000000 --- a/sysdeps/unix/sysv/linux/m68k/readdir64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/readdir64.c> diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64_r.c b/sysdeps/unix/sysv/linux/m68k/readdir64_r.c deleted file mode 100644 index 9f54f89..0000000 --- a/sysdeps/unix/sysv/linux/m68k/readdir64_r.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/readdir64_r.c> diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h deleted file mode 100644 index a7ac3ca..0000000 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ /dev/null @@ -1,214 +0,0 @@ -/* Dump registers. - Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@gnu.org>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <stddef.h> -#include <sys/uio.h> -#include <stdio-common/_itoa.h> - -/* We will print the register dump in this format: - - D0: XXXXXXXX D1: XXXXXXXX D2: XXXXXXXX D3: XXXXXXXX - D4: XXXXXXXX D5: XXXXXXXX D6: XXXXXXXX D7: XXXXXXXX - A0: XXXXXXXX A1: XXXXXXXX A2: XXXXXXXX A3: XXXXXXXX - A4: XXXXXXXX A5: XXXXXXXX A6: XXXXXXXX A7: XXXXXXXX - PC: XXXXXXXX SR: XXXX - - OldMask: XXXXXXXX Vector: XXXX - - FP0: XXXXXXXXXXXXXXXXXXXXXXXX FP1: XXXXXXXXXXXXXXXXXXXXXXXX - FP2: XXXXXXXXXXXXXXXXXXXXXXXX FP3: XXXXXXXXXXXXXXXXXXXXXXXX - FP4: XXXXXXXXXXXXXXXXXXXXXXXX FP5: XXXXXXXXXXXXXXXXXXXXXXXX - FP6: XXXXXXXXXXXXXXXXXXXXXXXX FP7: XXXXXXXXXXXXXXXXXXXXXXXX - FPCR: XXXXXXXX FPSR: XXXXXXXX FPIAR: XXXXXXXX - -*/ - -/* Linux saves only the call-clobbered registers in the sigcontext. We - need to use a trampoline that saves the rest so that the C code can - access them. We use the sc_fpstate field, since the handler is not - supposed to return anyway, thus it doesn't matter that it's clobbered. */ - -/* static */ void catch_segfault (int, int, struct sigcontext *); - -/* Dummy function so that we can use asm with arguments. */ -static void __attribute_used__ -__dummy__ (void) -{ - asm ("\n\ -catch_segfault:\n\ - move.l 12(%%sp),%%a0\n\ - lea %c0(%%a0),%%a0\n\ - /* Clear the first 4 bytes to make it a null fp state, just\n\ - in case the handler does return. */\n\ - clr.l (%%a0)+\n\ - movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n\ - fmovem.x %%fp2-%%fp7,11*4(%%a0)\n\ - jra real_catch_segfault" - : : "n" (offsetof (struct sigcontext, sc_fpstate))); -} -#define catch_segfault(a,b) \ - __attribute_used__ real_catch_segfault(a,b) - -static void -hexvalue (unsigned long int value, char *buf, size_t len) -{ - char *cp = _itoa_word (value, buf + len, 16, 0); - while (cp > buf) - *--cp = '0'; -} - -static void -register_dump (int fd, struct sigcontext *ctx) -{ - char regs[20][8]; - char fpregs[11][24]; - struct iovec iov[63], *next_iov = iov; - unsigned long *p = (unsigned long *) ctx->sc_fpstate + 1; - -#define ADD_STRING(str) \ - next_iov->iov_base = (char *) (str); \ - next_iov->iov_len = strlen (str); \ - ++next_iov -#define ADD_MEM(str, len) \ - next_iov->iov_base = (str); \ - next_iov->iov_len = (len); \ - ++next_iov - - /* Generate strings of register contents. */ - hexvalue (ctx->sc_d0, regs[0], 8); - hexvalue (ctx->sc_d1, regs[1], 8); - hexvalue (*p++, regs[2], 8); - hexvalue (*p++, regs[3], 8); - hexvalue (*p++, regs[4], 8); - hexvalue (*p++, regs[5], 8); - hexvalue (*p++, regs[6], 8); - hexvalue (*p++, regs[7], 8); - hexvalue (ctx->sc_a0, regs[8], 8); - hexvalue (ctx->sc_a1, regs[9], 8); - hexvalue (*p++, regs[10], 8); - hexvalue (*p++, regs[11], 8); - hexvalue (*p++, regs[12], 8); - hexvalue (*p++, regs[13], 8); - hexvalue (*p++, regs[14], 8); - hexvalue (ctx->sc_usp, regs[15], 8); - hexvalue (ctx->sc_pc, regs[16], 8); - hexvalue (ctx->sc_sr, regs[17], 4); - hexvalue (ctx->sc_mask, regs[18], 8); - hexvalue (ctx->sc_formatvec & 0xfff, regs[19], 4); - hexvalue (ctx->sc_fpregs[0], fpregs[0], 8); - hexvalue (ctx->sc_fpregs[1], fpregs[0] + 8, 8); - hexvalue (ctx->sc_fpregs[2], fpregs[0] + 16, 8); - hexvalue (ctx->sc_fpregs[3], fpregs[1], 8); - hexvalue (ctx->sc_fpregs[4], fpregs[1] + 8, 8); - hexvalue (ctx->sc_fpregs[5], fpregs[1] + 16, 8); - hexvalue (*p++, fpregs[2], 8); - hexvalue (*p++, fpregs[2] + 8, 8); - hexvalue (*p++, fpregs[2] + 16, 8); - hexvalue (*p++, fpregs[3], 8); - hexvalue (*p++, fpregs[3] + 8, 8); - hexvalue (*p++, fpregs[3] + 16, 8); - hexvalue (*p++, fpregs[4], 8); - hexvalue (*p++, fpregs[4] + 8, 8); - hexvalue (*p++, fpregs[4] + 16, 8); - hexvalue (*p++, fpregs[5], 8); - hexvalue (*p++, fpregs[5] + 8, 8); - hexvalue (*p++, fpregs[5] + 16, 8); - hexvalue (*p++, fpregs[6], 8); - hexvalue (*p++, fpregs[6] + 8, 8); - hexvalue (*p++, fpregs[6] + 16, 8); - hexvalue (*p++, fpregs[7], 8); - hexvalue (*p++, fpregs[7] + 8, 8); - hexvalue (*p++, fpregs[7] + 16, 8); - hexvalue (ctx->sc_fpcntl[0], fpregs[8], 8); - hexvalue (ctx->sc_fpcntl[1], fpregs[9], 8); - hexvalue (ctx->sc_fpcntl[2], fpregs[10], 8); - - /* Generate the output. */ - ADD_STRING ("Register dump:\n\n D0: "); - ADD_MEM (regs[0], 8); - ADD_STRING (" D1: "); - ADD_MEM (regs[1], 8); - ADD_STRING (" D2: "); - ADD_MEM (regs[2], 8); - ADD_STRING (" D3: "); - ADD_MEM (regs[3], 8); - ADD_STRING ("\n D4: "); - ADD_MEM (regs[4], 8); - ADD_STRING (" D5: "); - ADD_MEM (regs[5], 8); - ADD_STRING (" D6: "); - ADD_MEM (regs[6], 8); - ADD_STRING (" D7: "); - ADD_MEM (regs[7], 8); - ADD_STRING ("\n A0: "); - ADD_MEM (regs[8], 8); - ADD_STRING (" A1: "); - ADD_MEM (regs[9], 8); - ADD_STRING (" A2: "); - ADD_MEM (regs[10], 8); - ADD_STRING (" A3: "); - ADD_MEM (regs[11], 8); - ADD_STRING ("\n A4: "); - ADD_MEM (regs[12], 8); - ADD_STRING (" A5: "); - ADD_MEM (regs[13], 8); - ADD_STRING (" A6: "); - ADD_MEM (regs[14], 8); - ADD_STRING (" A7: "); - ADD_MEM (regs[15], 8); - ADD_STRING ("\n PC: "); - ADD_MEM (regs[16], 8); - ADD_STRING (" SR: "); - ADD_MEM (regs[17], 4); - - ADD_STRING ("\n\n OldMask: "); - ADD_MEM (regs[18], 8); - ADD_STRING (" Vector: "); - ADD_MEM (regs[19], 4); - - ADD_STRING ("\n\n FP0: "); - ADD_MEM (fpregs[0], 24); - ADD_STRING (" FP1: "); - ADD_MEM (fpregs[1], 24); - ADD_STRING ("\n FP2: "); - ADD_MEM (fpregs[2], 24); - ADD_STRING (" FP3: "); - ADD_MEM (fpregs[3], 24); - ADD_STRING ("\n FP4: "); - ADD_MEM (fpregs[4], 24); - ADD_STRING (" FP5: "); - ADD_MEM (fpregs[5], 24); - ADD_STRING ("\n FP6: "); - ADD_MEM (fpregs[6], 24); - ADD_STRING (" FP7: "); - ADD_MEM (fpregs[7], 24); - ADD_STRING ("\n FPCR: "); - ADD_MEM (fpregs[8], 8); - ADD_STRING (" FPSR: "); - ADD_MEM (fpregs[9], 8); - ADD_STRING (" FPIAR: "); - ADD_MEM (fpregs[10], 8); - ADD_STRING ("\n"); - - /* Write the stuff out. */ - writev (fd, iov, next_iov - iov); -} - -#define REGISTER_DUMP register_dump (fd, ctx) diff --git a/sysdeps/unix/sysv/linux/m68k/scandir64.c b/sysdeps/unix/sysv/linux/m68k/scandir64.c deleted file mode 100644 index 506fd88..0000000 --- a/sysdeps/unix/sysv/linux/m68k/scandir64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/scandir64.c> diff --git a/sysdeps/unix/sysv/linux/m68k/semctl.c b/sysdeps/unix/sysv/linux/m68k/semctl.c deleted file mode 100644 index e9b1a48..0000000 --- a/sysdeps/unix/sysv/linux/m68k/semctl.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/semctl.c> diff --git a/sysdeps/unix/sysv/linux/m68k/semtimedop.S b/sysdeps/unix/sysv/linux/m68k/semtimedop.S deleted file mode 100644 index 2775c12..0000000 --- a/sysdeps/unix/sysv/linux/m68k/semtimedop.S +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@suse.de>, 2003. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - -#define SYSOP_semtimedop 4 - -#define SVRSP 8 /* saved register space */ -#define PARMS 4+SVRSP /* space for 3 saved regs */ -#define SEMID PARMS -#define SOPS SEMID+4 -#define NSOPS SOPS+4 -#define TIMEOUT NSOPS+4 - - .text -ENTRY (semtimedop) - - /* Save registers. */ - move.l %d2, %a1 - move.l %d3, -(%sp) - move.l %d5, -(%sp) - - move.l #SYSOP_semtimedop, %d1 - move.l SEMID(%sp), %d2 - move.l NSOPS(%sp), %d3 - move.l SOPS(%sp), %d5 - move.l TIMEOUT(%sp), %a0 - move.l #SYS_ify (ipc), %d0 - - trap #0 - - /* Restore registers. */ - move.l (%sp)+, %d5 - move.l (%sp)+, %d3 - move.l %a1, %d2 - - /* Check for error. */ - tst.l %d0 - jmi SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. */ - ret - -PSEUDO_END (semtimedop) diff --git a/sysdeps/unix/sysv/linux/m68k/setegid.c b/sysdeps/unix/sysv/linux/m68k/setegid.c deleted file mode 100644 index 2e3a54c..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setegid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setegid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/seteuid.c b/sysdeps/unix/sysv/linux/m68k/seteuid.c deleted file mode 100644 index 18e41d0..0000000 --- a/sysdeps/unix/sysv/linux/m68k/seteuid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/seteuid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setfsgid.c b/sysdeps/unix/sysv/linux/m68k/setfsgid.c deleted file mode 100644 index 0886712..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setfsgid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setfsgid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setfsuid.c b/sysdeps/unix/sysv/linux/m68k/setfsuid.c deleted file mode 100644 index a9f22eb..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setfsuid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setfsuid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setgid.c b/sysdeps/unix/sysv/linux/m68k/setgid.c deleted file mode 100644 index 377021d..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setgid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setgid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setgroups.c b/sysdeps/unix/sysv/linux/m68k/setgroups.c deleted file mode 100644 index 0e70862..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setgroups.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We also have to rewrite the kernel gid_t to the user land type. */ -#include <sysdeps/unix/sysv/linux/i386/setgroups.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setregid.c b/sysdeps/unix/sysv/linux/m68k/setregid.c deleted file mode 100644 index 99c57ad..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setregid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setregid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setresgid.c b/sysdeps/unix/sysv/linux/m68k/setresgid.c deleted file mode 100644 index daca1a4..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setresgid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setresgid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setresuid.c b/sysdeps/unix/sysv/linux/m68k/setresuid.c deleted file mode 100644 index 3aeabe9..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setresuid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setresuid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setreuid.c b/sysdeps/unix/sysv/linux/m68k/setreuid.c deleted file mode 100644 index 8ad6122..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setreuid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setreuid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setrlimit.c b/sysdeps/unix/sysv/linux/m68k/setrlimit.c deleted file mode 100644 index bfaef74..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setrlimit.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setrlimit.c> diff --git a/sysdeps/unix/sysv/linux/m68k/setuid.c b/sysdeps/unix/sysv/linux/m68k/setuid.c deleted file mode 100644 index de39437..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setuid.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setuid.c> diff --git a/sysdeps/unix/sysv/linux/m68k/shmctl.c b/sysdeps/unix/sysv/linux/m68k/shmctl.c deleted file mode 100644 index 7eac638..0000000 --- a/sysdeps/unix/sysv/linux/m68k/shmctl.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/shmctl.c> diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h deleted file mode 100644 index b7e08cf..0000000 --- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>, 1998. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define SIGCONTEXT int _code, struct sigcontext * -#define SIGCONTEXT_EXTRA_ARGS _code, -#define GET_PC(ctx) ((void *) (ctx)->sc_pc) -#define GET_FRAME(ctx) ((void *) __builtin_frame_address (1)) -#define GET_STACK(ctx) ((void *) (ctx)->sc_usp) -#define CALL_SIGHANDLER(handler, signo, ctx) \ - (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S deleted file mode 100644 index 1d10f33..0000000 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep-cancel.h> -#include <socketcall.h> - -#define P(a, b) P2(a, b) -#define P2(a, b) a##b - - .text -/* The socket-oriented system calls are handled unusally in Linux. - They are all gated through the single `socketcall' system call number. - `socketcall' takes two arguments: the first is the subcode, specifying - which socket function is being called; and the second is a pointer to - the arguments to the specific function. - - The .S files for the other calls just #define socket and #include this. */ - -#ifndef __socket -#ifndef NO_WEAK_ALIAS -#define __socket P(__,socket) -#else -#define __socket socket -#endif -#endif - -.globl __socket -ENTRY (__socket) -#if defined NEED_CANCELLATION && defined CENABLE - SINGLE_THREAD_P - jne 1f -#endif - - /* Save registers. */ - move.l %d2, %a0 - - move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */ - - /* Use ## so `socket' is a separate token that might be #define'd. */ - move.l #P (SOCKOP_,socket), %d1 /* Subcode is first arg to syscall. */ - lea 4(%sp), %a1 /* Address of args is 2nd arg. */ - move.l %a1, %d2 - - /* Do the system call trap. */ - trap #0 - - /* Restore registers. */ - move.l %a0, %d2 - - /* %d0 is < 0 if there was an error. */ - tst.l %d0 - jmi SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. */ - rts - -#if defined NEED_CANCELLATION && defined CENABLE -1: /* Enable asynchronous cancellation. */ - CENABLE - - /* Save registers. */ - move.l %d2, -(%sp) - move.l %d0, -(%sp) - - move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */ - - /* Use ## so `socket' is a separate token that might be #define'd. */ - move.l #P (SOCKOP_,socket), %d1 /* Subcode is first arg to syscall. */ - lea 4+8(%sp), %a1 /* Address of args is 2nd arg. */ - move.l %a1, %d2 - - /* Do the system call trap. */ - trap #0 - - /* Restore cancellation. */ - move.l %d0, %d2 - CDISABLE - addq.l #4, %sp - move.l %d2, %d0 - - /* Restore registers. */ - move.l (%sp)+, %d2 - - /* %d0 is < 0 if there was an error. */ - tst.l %d0 - jmi SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. */ - rts -#endif - -PSEUDO_END (__socket) - -#ifndef NO_WEAK_ALIAS -weak_alias (__socket, socket) -#endif diff --git a/sysdeps/unix/sysv/linux/m68k/sys/procfs.h b/sysdeps/unix/sysv/linux/m68k/sys/procfs.h deleted file mode 100644 index 27abf8e..0000000 --- a/sysdeps/unix/sysv/linux/m68k/sys/procfs.h +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999, 2000, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_PROCFS_H -#define _SYS_PROCFS_H 1 - -/* This is somewhat modelled after the file of the same name on SVR4 - systems. It provides a definition of the core file format for ELF - used on Linux. It doesn't have anything to do with the /proc file - system, even though Linux has one. - - Anyway, the whole purpose of this file is for GDB and GDB only. - Don't read too much into it. Don't use it for anything other than - GDB unless you know what you are doing. */ - -#include <features.h> -#include <sys/time.h> -#include <sys/types.h> -#include <sys/user.h> - -__BEGIN_DECLS - -/* Type for a general-purpose register. */ -typedef unsigned long elf_greg_t; - -/* And the whole bunch of them. We could have used `struct - user_regs_struct' directly in the typedef, but tradition says that - the register set is an array, which does have some peculiar - semantics, so leave it that way. */ -#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) -typedef elf_greg_t elf_gregset_t[ELF_NGREG]; - -/* Register set for the floating-point registers. */ -typedef struct user_m68kfp_struct elf_fpregset_t; - - -/* Signal info. */ -struct elf_siginfo - { - int si_signo; /* Signal number. */ - int si_code; /* Extra code. */ - int si_errno; /* Errno. */ - }; - - -/* Definitions to generate Intel SVR4-like core files. These mostly - have the same names as the SVR4 types with "elf_" tacked on the - front to prevent clashes with Linux definitions, and the typedef - forms have been avoided. This is mostly like the SVR4 structure, - but more Linuxy, with things that Linux does not support and which - GDB doesn't really use excluded. */ - -struct elf_prstatus - { - struct elf_siginfo pr_info; /* Info associated with signal. */ - short int pr_cursig; /* Current signal. */ - unsigned long int pr_sigpend; /* Set of pending signals. */ - unsigned long int pr_sighold; /* Set of held signals. */ - __pid_t pr_pid; - __pid_t pr_ppid; - __pid_t pr_pgrp; - __pid_t pr_sid; - struct timeval pr_utime; /* User time. */ - struct timeval pr_stime; /* System time. */ - struct timeval pr_cutime; /* Cumulative user time. */ - struct timeval pr_cstime; /* Cumulative system time. */ - elf_gregset_t pr_reg; /* GP registers. */ - int pr_fpvalid; /* True if math copro being used. */ - }; - - -#define ELF_PRARGSZ (80) /* Number of chars for args. */ - -struct elf_prpsinfo - { - char pr_state; /* Numeric process state. */ - char pr_sname; /* Char for pr_state. */ - char pr_zomb; /* Zombie. */ - char pr_nice; /* Nice val. */ - unsigned long int pr_flag; /* Flags. */ - unsigned short int pr_uid; - unsigned short int pr_gid; - int pr_pid, pr_ppid, pr_pgrp, pr_sid; - /* Lots missing */ - char pr_fname[16]; /* Filename of executable. */ - char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ - }; - - -/* The rest of this file provides the types for emulation of the - Solaris <proc_service.h> interfaces that should be implemented by - users of libthread_db. */ - -/* Addresses. */ -typedef void *psaddr_t; - -/* Register sets. Linux has different names. */ -typedef elf_gregset_t prgregset_t; -typedef elf_fpregset_t prfpregset_t; - -/* We don't have any differences between processes and threads, - therefore have only one PID type. */ -typedef __pid_t lwpid_t; - -/* Process status and info. In the end we do provide typedefs for them. */ -typedef struct elf_prstatus prstatus_t; -typedef struct elf_prpsinfo prpsinfo_t; - -__END_DECLS - -#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/sysdeps/unix/sysv/linux/m68k/sys/reg.h deleted file mode 100644 index 418f832..0000000 --- a/sysdeps/unix/sysv/linux/m68k/sys/reg.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 1998 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_REG_H -#define _SYS_REG_H 1 - -/* Index into an array of 4 byte integers returned from ptrace for - location of the users' stored general purpose registers. */ - -enum -{ - PT_D1 = 0, -#define PT_D1 PT_D1 - PT_D2 = 1, -#define PT_D2 PT_D2 - PT_D3 = 2, -#define PT_D3 PT_D3 - PT_D4 = 3, -#define PT_D4 PT_D4 - PT_D5 = 4, -#define PT_D5 PT_D5 - PT_D6 = 5, -#define PT_D6 PT_D6 - PT_D7 = 6, -#define PT_D7 PT_D7 - PT_A0 = 7, -#define PT_A0 PT_A0 - PT_A1 = 8, -#define PT_A1 PT_A1 - PT_A2 = 9, -#define PT_A2 PT_A2 - PT_A3 = 10, -#define PT_A3 PT_A3 - PT_A4 = 11, -#define PT_A4 PT_A4 - PT_A5 = 12, -#define PT_A5 PT_A5 - PT_A6 = 13, -#define PT_A6 PT_A6 - PT_D0 = 14, -#define PT_D0 PT_D0 - PT_USP = 15, -#define PT_USP PT_USP - PT_ORIG_D0 = 16, -#define PT_ORIG_D0 PT_ORIG_D0 - PT_SR = 17, -#define PT_SR PT_SR - PT_PC = 18, -#define PT_PC PT_PC - PT_FP0 = 21, -#define PT_FP0 PT_FP0 - PT_FP1 = 24, -#define PT_FP1 PT_FP1 - PT_FP2 = 27, -#define PT_FP2 PT_FP2 - PT_FP3 = 30, -#define PT_FP3 PT_FP3 - PT_FP4 = 33, -#define PT_FP4 PT_FP4 - PT_FP5 = 36, -#define PT_FP5 PT_FP5 - PT_FP6 = 39, -#define PT_FP6 PT_FP6 - PT_FP7 = 42, -#define PT_FP7 PT_FP7 - PT_FPCR = 45, -#define PT_FPCR PT_FPCR - PT_FPSR = 46, -#define PT_FPSR PT_FPSR - PT_FPIAR = 47 -#define PT_FPIAR PT_FPIAR -}; - -#endif /* _SYS_REG_H */ diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h deleted file mode 100644 index 3c441dc..0000000 --- a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (C) 1997, 1999, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* System V/m68k ABI compliant context switching support. */ - -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include <features.h> -#include <signal.h> - -/* Type for general register. */ -typedef int greg_t; - -/* Number of general registers. */ -#define NGREG 18 - -/* Container for all general registers. */ -typedef greg_t gregset_t[NGREG]; - -/* Number of each register is the `gregset_t' array. */ -enum -{ - R_D0 = 0, -#define R_D0 R_D0 - R_D1 = 1, -#define R_D1 R_D1 - R_D2 = 2, -#define R_D2 R_D2 - R_D3 = 3, -#define R_D3 R_D3 - R_D4 = 4, -#define R_D4 R_D4 - R_D5 = 5, -#define R_D5 R_D5 - R_D6 = 6, -#define R_D6 R_D6 - R_D7 = 7, -#define R_D7 R_D7 - R_A0 = 8, -#define R_A0 R_A0 - R_A1 = 9, -#define R_A1 R_A1 - R_A2 = 10, -#define R_A2 R_A2 - R_A3 = 11, -#define R_A3 R_A3 - R_A4 = 12, -#define R_A4 R_A4 - R_A5 = 13, -#define R_A5 R_A5 - R_A6 = 14, -#define R_A6 R_A6 - R_A7 = 15, -#define R_A7 R_A7 - R_SP = 15, -#define R_SP R_SP - R_PC = 16, -#define R_PC R_PC - R_PS = 17 -#define R_PS R_PS -}; - -/* Structure to describe FPU registers. */ -typedef struct fpregset -{ - int f_fpregs[8][3]; - int f_pcr; - int f_psr; - int f_fpiaddr; -} fpregset_t; - -/* Context to describe whole processor state. */ -typedef struct -{ - int version; - gregset_t gregs; - fpregset_t fpregs; -} mcontext_t; - -#define MCONTEXT_VERSION 2 - -/* Userlevel context. */ -typedef struct ucontext -{ - unsigned long int uc_flags; - struct ucontext *uc_link; - __sigset_t uc_sigmask; - stack_t uc_stack; - mcontext_t uc_mcontext; - long int uc_filler[174]; -} ucontext_t; - -#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S deleted file mode 100644 index 4f2c747..0000000 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1996, 1998 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - -/* Please consult the file sysdeps/unix/sysv/linux/m68k/sysdep.h for - more information about the value -4095 used below.*/ - - .text -ENTRY (syscall) - move.l 4(%sp), %d0 /* Load syscall number. */ - _DOARGS_5 (24) /* Frob arguments. */ - trap &0 /* Do the system call. */ - UNDOARGS_5 /* Unfrob arguments. */ - cmp.l &-4095, %d0 /* Check %d0 for error. */ - jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */ - rts /* Return to caller. */ -PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list deleted file mode 100644 index 98d3066..0000000 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ /dev/null @@ -1,5 +0,0 @@ -# File name Caller Syscall name Args Strong name Weak names - -cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush -oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 -oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S deleted file mode 100644 index e4ec92d..0000000 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 1996, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - - -/* The following code is only used in the shared library when we - compile the reentrant version. Otherwise each system call defines - each own version. */ - -#ifndef PIC - -/* The syscall stubs jump here when they detect an error. */ - -#undef CALL_MCOUNT -#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %d0. */ - - .text -ENTRY (__syscall_error) - neg.l %d0 -#ifndef _LIBC_REENTRANT - move.l %d0, errno -#else - move.l %d0, -(%sp) - jbsr __errno_location - move.l (%sp)+, (%a0) -#endif - move.l #-1, %d0 - /* Copy return value to %a0 for syscalls that are declared to - return a pointer. */ - move.l %d0, %a0 - rts -END (__syscall_error) -#endif /* PIC */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h deleted file mode 100644 index 091dfc9..0000000 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ /dev/null @@ -1,295 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>, - December 1995. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdeps/unix/sysdep.h> -#include <sysdeps/m68k/sysdep.h> - -/* Defines RTLD_PRIVATE_ERRNO. */ -#include <dl-sysdep.h> - -/* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h - of the kernel. But these symbols do not follow the SYS_* syntax - so we have to redefine the `SYS_ify' macro here. */ -#undef SYS_ify -#ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_##syscall_name -#else -# define SYS_ify(syscall_name) __NR_/**/syscall_name -#endif - -#ifdef __ASSEMBLER__ - -/* Linux uses a negative return value to indicate syscall errors, unlike - most Unices, which use the condition codes' carry flag. - - Since version 2.1 the return value of a system call might be negative - even if the call succeeded. E.g., the `lseek' system call might return - a large offset. Therefore we must not anymore test for < 0, but test - for a real error by making sure the value in %d0 is a real error - number. Linus said he will make sure the no syscall returns a value - in -1 .. -4095 as a valid result so we can savely test with -4095. */ - -/* We don't want the label for the error handler to be visible in the symbol - table when we define it here. */ -#ifdef PIC -#define SYSCALL_ERROR_LABEL .Lsyscall_error -#else -#define SYSCALL_ERROR_LABEL __syscall_error -#endif - -#undef PSEUDO -#define PSEUDO(name, syscall_name, args) \ - .text; \ - ENTRY (name) \ - DO_CALL (syscall_name, args); \ - cmp.l &-4095, %d0; \ - jcc SYSCALL_ERROR_LABEL - -#undef PSEUDO_END -#define PSEUDO_END(name) \ - SYSCALL_ERROR_HANDLER; \ - END (name) - -#undef PSEUDO_NOERRNO -#define PSEUDO_NOERRNO(name, syscall_name, args) \ - .text; \ - ENTRY (name) \ - DO_CALL (syscall_name, args) - -#undef PSEUDO_END_NOERRNO -#define PSEUDO_END_NOERRNO(name) \ - END (name) - -#define ret_NOERRNO rts - -/* The function has to return the error code. */ -#undef PSEUDO_ERRVAL -#define PSEUDO_ERRVAL(name, syscall_name, args) \ - .text; \ - ENTRY (name) \ - DO_CALL (syscall_name, args); \ - negl %d0 - -#undef PSEUDO_END_ERRVAL -#define PSEUDO_END_ERRVAL(name) \ - END (name) - -#define ret_ERRVAL rts - -#ifdef PIC -# if RTLD_PRIVATE_ERRNO -# define SYSCALL_ERROR_HANDLER \ -SYSCALL_ERROR_LABEL: \ - lea (rtld_errno, %pc), %a0; \ - neg.l %d0; \ - move.l %d0, (%a0); \ - move.l &-1, %d0; \ - /* Copy return value to %a0 for syscalls that are declared to return \ - a pointer (e.g., mmap). */ \ - move.l %d0, %a0; \ - rts; -# else /* !RTLD_PRIVATE_ERRNO */ -/* Store (- %d0) into errno through the GOT. */ -# if defined _LIBC_REENTRANT -# define SYSCALL_ERROR_HANDLER \ -SYSCALL_ERROR_LABEL: \ - neg.l %d0; \ - move.l %d0, -(%sp); \ - jbsr __errno_location@PLTPC; \ - move.l (%sp)+, (%a0); \ - move.l &-1, %d0; \ - /* Copy return value to %a0 for syscalls that are declared to return \ - a pointer (e.g., mmap). */ \ - move.l %d0, %a0; \ - rts; -# else /* !_LIBC_REENTRANT */ -# define SYSCALL_ERROR_HANDLER \ -SYSCALL_ERROR_LABEL: \ - move.l (errno@GOTPC, %pc), %a0; \ - neg.l %d0; \ - move.l %d0, (%a0); \ - move.l &-1, %d0; \ - /* Copy return value to %a0 for syscalls that are declared to return \ - a pointer (e.g., mmap). */ \ - move.l %d0, %a0; \ - rts; -# endif /* _LIBC_REENTRANT */ -# endif /* RTLD_PRIVATE_ERRNO */ -#else -# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ -#endif /* PIC */ - -/* Linux takes system call arguments in registers: - - syscall number %d0 call-clobbered - arg 1 %d1 call-clobbered - arg 2 %d2 call-saved - arg 3 %d3 call-saved - arg 4 %d4 call-saved - arg 5 %d5 call-saved - - The stack layout upon entering the function is: - - 20(%sp) Arg# 5 - 16(%sp) Arg# 4 - 12(%sp) Arg# 3 - 8(%sp) Arg# 2 - 4(%sp) Arg# 1 - (%sp) Return address - - (Of course a function with say 3 arguments does not have entries for - arguments 4 and 5.) - - Separate move's are faster than movem, but need more space. Since - speed is more important, we don't use movem. Since %a0 and %a1 are - scratch registers, we can use them for saving as well. */ - -#define DO_CALL(syscall_name, args) \ - move.l &SYS_ify(syscall_name), %d0; \ - DOARGS_##args \ - trap &0; \ - UNDOARGS_##args - -#define DOARGS_0 /* No arguments to frob. */ -#define UNDOARGS_0 /* No arguments to unfrob. */ -#define _DOARGS_0(n) /* No arguments to frob. */ - -#define DOARGS_1 _DOARGS_1 (4) -#define _DOARGS_1(n) move.l n(%sp), %d1; _DOARGS_0 (n) -#define UNDOARGS_1 UNDOARGS_0 - -#define DOARGS_2 _DOARGS_2 (8) -#define _DOARGS_2(n) move.l %d2, %a0; move.l n(%sp), %d2; _DOARGS_1 (n-4) -#define UNDOARGS_2 UNDOARGS_1; move.l %a0, %d2 - -#define DOARGS_3 _DOARGS_3 (12) -#define _DOARGS_3(n) move.l %d3, %a1; move.l n(%sp), %d3; _DOARGS_2 (n-4) -#define UNDOARGS_3 UNDOARGS_2; move.l %a1, %d3 - -#define DOARGS_4 _DOARGS_4 (16) -#define _DOARGS_4(n) move.l %d4, -(%sp); move.l n+4(%sp), %d4; _DOARGS_3 (n) -#define UNDOARGS_4 UNDOARGS_3; move.l (%sp)+, %d4 - -#define DOARGS_5 _DOARGS_5 (20) -#define _DOARGS_5(n) move.l %d5, -(%sp); move.l n+4(%sp), %d5; _DOARGS_4 (n) -#define UNDOARGS_5 UNDOARGS_4; move.l (%sp)+, %d5 - - -#define ret rts -#if 0 /* Not used by Linux */ -#define r0 %d0 -#define r1 %d1 -#define MOVE(x,y) movel x , y -#endif - -#else /* not __ASSEMBLER__ */ - -/* Define a macro which expands into the inline wrapper code for a system - call. */ -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \ - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\ - { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \ - _sys_result = (unsigned int) -1; \ - } \ - (int) _sys_result; }) - -#undef INTERNAL_SYSCALL_DECL -#define INTERNAL_SYSCALL_DECL(err) do { } while (0) - -/* Define a macro which expands inline into the wrapper code for a system - call. This use is for internal calls that do not need to handle errors - normally. It will never touch errno. This returns just what the kernel - gave back. */ -#undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) \ - ({ unsigned int _sys_result; \ - { \ - /* Load argument values in temporary variables - to perform side effects like function calls - before the call used registers are set. */ \ - LOAD_ARGS_##nr (args) \ - LOAD_REGS_##nr \ - register int _d0 asm ("%d0") = __NR_##name; \ - asm volatile ("trap #0" \ - : "=d" (_d0) \ - : "0" (_d0) ASM_ARGS_##nr \ - : "memory"); \ - _sys_result = _d0; \ - } \ - (int) _sys_result; }) - -#undef INTERNAL_SYSCALL_ERROR_P -#define INTERNAL_SYSCALL_ERROR_P(val, err) \ - ((unsigned int) (val) >= -4095U) - -#undef INTERNAL_SYSCALL_ERRNO -#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) - -#define LOAD_ARGS_0() -#define LOAD_REGS_0 -#define ASM_ARGS_0 -#define LOAD_ARGS_1(a1) \ - LOAD_ARGS_0 () \ - int __arg1 = (int) (a1); -#define LOAD_REGS_1 \ - register int _d1 asm ("d1") = __arg1; \ - LOAD_REGS_0 -#define ASM_ARGS_1 ASM_ARGS_0, "d" (_d1) -#define LOAD_ARGS_2(a1, a2) \ - LOAD_ARGS_1 (a1) \ - int __arg2 = (int) (a2); -#define LOAD_REGS_2 \ - register int _d2 asm ("d2") = __arg2; \ - LOAD_REGS_1 -#define ASM_ARGS_2 ASM_ARGS_1, "d" (_d2) -#define LOAD_ARGS_3(a1, a2, a3) \ - LOAD_ARGS_2 (a1, a2) \ - int __arg3 = (int) (a3); -#define LOAD_REGS_3 \ - register int _d3 asm ("d3") = __arg3; \ - LOAD_REGS_2 -#define ASM_ARGS_3 ASM_ARGS_2, "d" (_d3) -#define LOAD_ARGS_4(a1, a2, a3, a4) \ - LOAD_ARGS_3 (a1, a2, a3) \ - int __arg4 = (int) (a4); -#define LOAD_REGS_4 \ - register int _d4 asm ("d4") = __arg4; \ - LOAD_REGS_3 -#define ASM_ARGS_4 ASM_ARGS_3, "d" (_d4) -#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ - LOAD_ARGS_4 (a1, a2, a3, a4) \ - int __arg5 = (int) (a5); -#define LOAD_REGS_5 \ - register int _d5 asm ("d5") = __arg5; \ - LOAD_REGS_4 -#define ASM_ARGS_5 ASM_ARGS_4, "d" (_d5) -#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ - LOAD_ARGS_5 (a1, a2, a3, a4, a5) \ - int __arg6 = (int) (a6); -#define LOAD_REGS_6 \ - register int _a0 asm ("a0") = __arg6; \ - LOAD_REGS_5 -#define ASM_ARGS_6 ASM_ARGS_5, "a" (_a0) - -#endif /* not __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/m68k/versionsort64.c b/sysdeps/unix/sysv/linux/m68k/versionsort64.c deleted file mode 100644 index 144b691..0000000 --- a/sysdeps/unix/sysv/linux/m68k/versionsort64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/versionsort64.c> diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S deleted file mode 100644 index 8027b2f..0000000 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab <schwab@gnu.org>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#define _ERRNO_H 1 -#include <bits/errno.h> -#include <kernel-features.h> - -/* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new process, - and the process ID of the new process to the old process. */ - -ENTRY (__vfork) - -#ifdef __NR_vfork - - /* Pop the return PC value into A0. */ - movel %sp@+, %a0 - - /* Stuff the syscall number in D0 and trap into the kernel. */ - movel #SYS_ify (vfork), %d0 - trap #0 - tstl %d0 - jmi .Lerror /* Branch forward if it failed. */ - - /* Jump to the return PC. */ - jmp %a0@ - -.Lerror: - /* Push back the return PC. */ - movel %a0,%sp@- - -# ifdef __ASSUME_VFORK_SYSCALL -# ifndef PIC - jbra SYSCALL_ERROR_LABEL -# endif -# else - /* Check if vfork syscall is known at all. */ - movel #-ENOSYS,%d1 - cmpl %d0,%d1 - jne SYSCALL_ERROR_LABEL - -# endif -#endif - -#ifndef __ASSUME_VFORK_SYSCALL - /* If we don't have vfork, fork is close enough. */ - - movel #SYS_ify (fork), %d0 - trap #0 - tstl %d0 - jmi SYSCALL_ERROR_LABEL - rts -#endif - -PSEUDO_END (__vfork) -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/m68k/xstat.c b/sysdeps/unix/sysv/linux/m68k/xstat.c deleted file mode 100644 index e9869f5..0000000 --- a/sysdeps/unix/sysv/linux/m68k/xstat.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/xstat.c> |