aboutsummaryrefslogtreecommitdiff
path: root/db2/os
AgeCommit message (Collapse)AuthorFilesLines
1998-06-09Update.Ulrich Drepper16-148/+664
1998-06-09 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/netinet/ip.h (struct ip_options): Define __data member only for gcc. Reported by ak@muc.de. * misc/mntent.h: Undo last patch. * sysdeps/unix/sysv/linux/fstatvfs.c (fstatvfs): Undo last patch. * misc/tst/mntent.c: Adjust code for this change. * io/fts.c: Updated from a slightly more recent BSD version. * io/fts.h: Likewise. * libc.map: Add __libc_stack_end. * db2/Makefile (routines): Add lock_region. * db2/config.h: Update from db-2.4.14. * db2/db.h: Likewise. * db2/db_185.h: Likewise. * db2/db_int.h: Likewise. * db2/bt_close.c: Likewise. * db2/bt_compare.c: Likewise. * db2/bt_conv.c: Likewise. * db2/bt_cursor.c: Likewise. * db2/bt_delete.c: Likewise. * db2/bt_open.c: Likewise. * db2/bt_page.c: Likewise. * db2/bt_put.c: Likewise. * db2/bt_rec.c: Likewise. * db2/bt_recno.c: Likewise. * db2/bt_rsearch.c: Likewise. * db2/bt_search.c: Likewise. * db2/bt_split.c: Likewise. * db2/bt_stat.c: Likewise. * db2/btree.src: Likewise. * db2/btree_auto.c: Likewise. * db2/getlong.c: Likewise. * db2/db_appinit.c: Likewise. * db2/db_apprec.c: Likewise. * db2/db_byteorder.c: Likewise. * db2/db_err.c: Likewise. * db2/db_log2.c: Likewise. * db2/db_region.c: Likewise. * db2/db_salloc.c: Likewise. * db2/db_shash.c: Likewise. * db2/db.c: Likewise. * db2/db.src: Likewise. * db2/db_auto.c: Likewise. * db2/db_conv.c: Likewise. * db2/db_dispatch.c: Likewise. * db2/db_dup.c: Likewise. * db2/db_overflow.c: Likewise. * db2/db_pr.c: Likewise. * db2/db_rec.c: Likewise. * db2/db_ret.c: Likewise. * db2/db_thread.c: Likewise. * db2/db185.c: Likewise. * db2/db185_int.h: Likewise. * db2/dbm.c: Likewise. * db2/hash.c: Likewise. * db2/hash.src: Likewise. * db2/hash_auto.c: Likewise. * db2/hash_conv.c: Likewise. * db2/hash_debug.c: Likewise. * db2/hash_dup.c: Likewise. * db2/hash_func.c: Likewise. * db2/hash_page.c: Likewise. * db2/hash_rec.c: Likewise. * db2/hash_stat.c: Likewise. * db2/btree.h: Likewise. * db2/btree_ext.h: Likewise. * db2/clib_ext.h: Likewise. * db2/common_ext.h: Likewise. * db2/cxx_int.h: Likewise. * db2/db.h.src: Likewise. * db2/db_185.h.src: Likewise. * db2/db_am.h: Likewise. * db2/db_auto.h: Likewise. * db2/db_cxx.h: Likewise. * db2/db_dispatch.h: Likewise. * db2/db_ext.h: Likewise. * db2/db_int.h.src: Likewise. * db2/db_page.h: Likewise. * db2/db_shash.h: Likewise. * db2/db_swap.h: Likewise. * db2/hash.h: Likewise. * db2/hash_ext.h: Likewise. * db2/lock.h: Likewise. * db2/lock_ext.h: Likewise. * db2/log.h: Likewise. * db2/log_ext.h: Likewise. * db2/mp.h: Likewise. * db2/mp_ext.h: Likewise. * db2/mutex_ext.h: Likewise. * db2/os_ext.h: Likewise. * db2/os_func.h: Likewise. * db2/queue.h: Likewise. * db2/shqueue.h: Likewise. * db2/txn.h: Likewise. * db2/lock.c: Likewise. * db2/lock_conflict.c: Likewise. * db2/lock_deadlock.c: Likewise. * db2/lock_region.c: Likewise. * db2/lock_util.c: Likewise. * db2/log.c: Likewise. * db2/log.src: Likewise. * db2/log_archive.c: Likewise. * db2/log_auto.c: Likewise. * db2/log_compare.c: Likewise. * db2/log_findckp.c: Likewise. * db2/log_get.c: Likewise. * db2/log_put.c: Likewise. * db2/log_rec.c: Likewise. * db2/log_register.c: Likewise. * db2/mp_bh.c: Likewise. * db2/mp_fget.c: Likewise. * db2/mp_fopen.c: Likewise. * db2/mp_fput.c: Likewise. * db2/mp_fset.c: Likewise. * db2/mp_open.c: Likewise. * db2/mp_pr.c: Likewise. * db2/mp_region.c: Likewise. * db2/mp_sync.c: Likewise. * db2/68020.gcc: Likewise. * db2/mutex.c: Likewise. * db2/parisc.gcc: Likewise. * db2/parisc.hp: Likewise. * db2/sco.cc: Likewise. * db2/os_abs.c: Likewise. * db2/os_alloc.c: Likewise. * db2/os_config.c: Likewise. * db2/os_dir.c: Likewise. * db2/os_fid.c: Likewise. * db2/os_fsync.c: Likewise. * db2/os_map.c: Likewise. * db2/os_oflags.c: Likewise. * db2/os_open.c: Likewise. * db2/os_rpath.c: Likewise. * db2/os_rw.c: Likewise. * db2/os_seek.c: Likewise. * db2/os_sleep.c: Likewise. * db2/os_spin.c: Likewise. * db2/os_stat.c: Likewise. * db2/os_unlink.c: Likewise. * db2/db_archive.c: Likewise. * db2/db_checkpoint.c: Likewise. * db2/db_deadlock.c: Likewise. * db2/db_dump.c: Likewise. * db2/db_dump185.c: Likewise. * db2/db_load.c: Likewise. * db2/db_printlog.c: Likewise. * db2/db_recover.c: Likewise. * db2/db_stat.c: Likewise. * db2/txn.c: Likewise. * db2/txn.src: Likewise. * db2/txn_auto.c: Likewise. * db2/txn_rec.c: Likewise. * elf/rtld.c: Move definition of __libc_stack_end to ... * sysdeps/generic/dl-sysdep.h: ...here. * sysdeps/unix/sysv/linux/fstatvfs.c: Handle nodiratime option. * sysdeps/unix/sysv/linux/bits/statvfs.h: Define ST_NODIRATIME. * sysdeps/unix/sysv/linux/sys/mount.h: Define MS_NODIRATIME. 1998-06-08 21:44 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/fstatvfs.c: Handle constant option string from mntent correctly. 1998-06-06 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sunrpc/Makefile (generated): Correct typo. 1998-06-04 Philip Blundell <philb@gnu.org> * elf/elf.h (EM_ARM, et al.): New definitions. * sysdeps/arm/dl-machine.h: Update for new draft ARM ELF ABI.
1998-01-25Update.Ulrich Drepper3-71/+110
1998-01-26 00:57 Ulrich Drepper <drepper@cygnus.com> * db2/Makefile (routines): Add os_alloc. * db2/db.h: Update from db-2.3.16. * db2/db_185.h: Likewise. * db2/db_int.h: Likewise. * db2/btree/bt_close.c: Likewise. * db2/btree/bt_cursor.c: Likewise. * db2/btree/bt_delete.c: Likewise. * db2/btree/bt_open.c: Likewise. * db2/btree/bt_page.c: Likewise. * db2/btree/bt_put.c: Likewise. * db2/btree/bt_rec.c: Likewise. * db2/btree/bt_recno.c: Likewise. * db2/btree/btree_auto.c: Likewise. * db2/common/db_appinit.c: Likewise. * db2/common/db_apprec.c: Likewise. * db2/common/db_err.c: Likewise. * db2/common/db_region.c: Likewise. * db2/common/db_shash.c: Likewise. * db2/db/db.c: Likewise. * db2/db/db_auto.c: Likewise. * db2/db/db_conv.c: Likewise. * db2/db/db_dispatch.c: Likewise. * db2/db/db_dup.c: Likewise. * db2/db/db_pr.c: Likewise. * db2/db/db_rec.c: Likewise. * db2/db185/db185.c: Likewise. * db2/dbm/dbm.c: Likewise. * db2/hash/hash.c: Likewise. * db2/hash/hash_auto.c: Likewise. * db2/hash/hash_dup.c: Likewise. * db2/hash/hash_page.c: Likewise. * db2/hash/hash_rec.c: Likewise. * db2/include/btree_ext.h: Likewise. * db2/include/clib_ext.h: Likewise. * db2/include/common_ext.h: Likewise. * db2/include/db.h.src: Likewise. * db2/include/db_185.h.src: Likewise. * db2/include/db_am.h: Likewise. * db2/include/db_ext.h: Likewise. * db2/include/db_int.h.src: Likewise. * db2/include/hash_ext.h: Likewise. * db2/include/lock_ext.h: Likewise. * db2/include/log.h: Likewise. * db2/include/log_auto.h: Likewise. * db2/include/log_ext.h: Likewise. * db2/include/mp.h: Likewise. * db2/include/mp_ext.h: Likewise. * db2/include/mutex_ext.h: Likewise. * db2/include/os_ext.h: Likewise. * db2/include/os_func.h: Likewise. * db2/include/txn_ext.h: Likewise. * db2/lock/lock.c: Likewise. * db2/lock/lock_util.c: Likewise. * db2/log/log.c: Likewise. * db2/log/log.src: Likewise. * db2/log/log_archive.c: Likewise. * db2/log/log_auto.c: Likewise. * db2/log/log_get.c: Likewise. * db2/log/log_put.c: Likewise. * db2/log/log_rec.c: Likewise. * db2/log/log_register.c: Likewise. * db2/mp/mp_bh.c: Likewise. * db2/mp/mp_fget.c: Likewise. * db2/mp/mp_fopen.c: Likewise. * db2/mp/mp_fput.c: Likewise. * db2/mp/mp_pr.c: Likewise. * db2/mp/mp_sync.c: Likewise. * db2/mutex/mutex.c: Likewise. * db2/os/os_alloc.c: Likewise. * db2/os/os_config.c: Likewise. * db2/os/os_stat.c: Likewise. * db2/progs/db_checkpoint/db_checkpoint.c: Likewise. * db2/progs/db_deadlock/db_deadlock.c: Likewise. * db2/progs/db_load/db_load.c: Likewise. * db2/progs/db_printlog/db_printlog.c: Likewise. * db2/progs/db_recover/db_recover.c: Likewise. * db2/progs/db_stat/db_stat.c: Likewise. * db2/txn/txn.c: Likewise. * elf/dl-close.c (_dl_close): Rename inner variable named map to imap. Unmap memory blocks in reverse order of allocation. Call munmap with load address added to offset. Bug reported by Miguel de Icaza. * locale/programs/ld-collate.c (collate_end_weight): Correctly fill up weight array. * localedata/locales/cs_CZ: Update by Michael Mraka <michael@informatics.muni.cz>. * misc/sys/syslog.h: Reformat a bit. Don't declare vsyslog unless __USE_BSD. * nis/nss_compat/compat-grp.c: Correctly handle buffer overflow while reading line with fgets. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * nss/nss_files/files-XXX.c: Likewise. * nss/nss_files/files-alias.c: Likewise. * shadow/fgetspent_r.c: Likewise. * string/strerror_r.c: Correct comment. Patch by Andreas Jaeger. * sysdeps/unix/sysv/linux/bits/stat.h: Define _STATBUF_ST_RDEV. * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/i386/sys/ucontext.h: Allocate room for FP register content in ucontext_t. 1998-01-22 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/libm-ieee754/s_modfl.c (modf): Correct calculation. Patch by Markus Schoder <Markus.Schoder@dresdner-bank.de>. * math/libm-test.c (modf_test): Add more tests for modf. * sysdeps/unix/sysv/linux/sys/mman.h: Add const to mlock and munlock according to Unix98. 1998-01-25 Andreas Jaeger <aj@arthur.rhein-neckar.de> * nss/nss_files/files-network.c (LINE_PARSER): Set n_addrtype to AF_INET. 1998-01-21 07:22 H.J. Lu <hjl@gnu.org> * sysdeps/posix/ttyname.c: Handle symbolic links. * sysdeps/posix/ttyname_r.c: Ditto. 1998-01-25 19:39 Ulrich Drepper <drepper@cygnus.com> * db2/makedb.c (process_input): Write terminating \0 for value. (print_database): Simply print value string, don't use length. 1998-01-24 Andreas Jaeger <aj@arthur.rhein-neckar.de> * nss/nsswitch.c (__nss_configure_lookup): Correct test for early exit of loop. 1998-01-25 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/ypclnt.c: Don't set dom_client to NULL, or we will not close all sockets. 1998-01-25 14:54 Ulrich Drepper <drepper@cygnus.com> * signal/Makefile (routines): Add sighold, sigrelse, sigignore, and sigset. * signal/sighold.c: New file. * signal/sigrelse.c: New file. * sysdeps/generic/sigignore.c: New file. * sysdeps/generic/sigset.c: New file. * sysdeps/posix/sigignore.c: New file. * sysdeps/posix/sigset.c: New file. * signal/signal.h: Add prototypes for new functions. * sysdeps/unix/sysv/linux/alpha/bits/signum.h: Define SIG_HOLD. * sysdeps/unix/sysv/linux/bits/signum.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/signum.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/signum.h: Likewise. 1998-01-23 00:16 Tim Waugh <tim@cyberelk.demon.co.uk> * posix/wordexp.c: Added IFS field-splitting in parameter and command substitution. Fixed an IFS-related bug that caused an infinite loop. 1998-01-25 12:38 Ulrich Drepper <drepper@cygnus.com> * stdlib/Makefile (routines): Add getcontext, setcontext, makecontext, and swapcontext. * stdlib/ucontext.h: Correct prototypes. * sysdeps/generic/getcontext.c: New file. * sysdeps/generic/setcontext.c: New file. * sysdeps/generic/makecontext.c: New file. * sysdeps/generic/swapcontext.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Removed. 1998-01-25 04:07 Ulrich Drepper <drepper@cygnus.com> * resource/sys/resource.h: Remove #include of ulimit.h which is not allowed by SUSv2 and not available on other systems. * sysdeps/unix/sysv/linux/ulimit.c: Include ulimit.h. * streams/Makefile: New file. * streams/stropts.h: New file. * sysdeps/generic/bits/stropts.h: New file. * sysdeps/generic/isastream.c: New file. * sysdeps/generic/getmsg.c: New file. * sysdeps/generic/getpmsg.c: New file. * sysdeps/generic/putmsg.c: New file. * sysdeps/generic/putpmsg.c: New file. * sysdeps/generic/fattach.c: New file. * sysdeps/generic/fdetach.c: New file. * sysdeps/unix/inet/Subdirs: Add streams. * sysdeps/generic/bits/types.h: Add definition of __t_scalar_t and __t_uscalar_t. * sysdeps/unix/sysv/linux/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h: Likewise. * sysdeps/mach/_strerror.c: Follow changes of generic version to handle small buffers correctly. 1998-01-24 17:31 H.J. Lu <hjl@gnu.org> * sysdeps/alpha/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE): Remove the 3rd arg and add declaration for _dl_runtime_resolve and _dl_runtime_profile. 1998-01-25 02:42 Ulrich Drepper <drepper@cygnus.com> * include/cpio.h: New file. Mainly copied from GNU cpio. * posix/Makefile (headers): Add cpio.h.
1997-12-01Update.cvs/libc-ud-971201Ulrich Drepper3-27/+167
1997-12-01 17:27 Ulrich Drepper <drepper@cygnus.com> * Makefile (subdirs): Add iconvdata and localedata. * iconv/gconv.h: Define UNKNOWN_10646_CHAR as error value. * iconv/gconv_conf.c (read_conf_file): Little optimization. * iconvdata/8bit-gap.c: New file. * iconvdata/8bit-generic.c: Renamed from ... * iconvdata/iso8859-generic.c: ...this. * iconvdata/configure: Removed. * iconvdata/Makefile: Add new modules and better rules. * iconvdata/iso6937.c: Minor bug fixes. * iconvdata/iso8859-1.c: Likewise. * iconvdata/t61.c: Likewise. * iconvdata/iso8859-2.c: Change to use 8bit-generic.c. Minor bug fixes. * iconvdata/iso8859-3.c: Likewise. * iconvdata/iso8859-4.c: Likewise. * iconvdata/iso8859-5.c: Likewise. * iconvdata/iso8859-6.c: Likewise. * iconvdata/iso8859-7.c: Likewise. * iconvdata/iso8859-8.c: Likewise. * iconvdata/iso8859-9.c: Likewise. * iconvdata/iso8859-10.c: Likewise. * iconvdata/ebcdic-at-de-a.c: New file. * iconvdata/ebcdic-at-de.c: New file. * iconvdata/ebcdic-ca-fr.c: New file. * iconvdata/hp-roman8.c: New file. * iconvdata/koi-8.c: New file. * iconvdata/koi8-r.c: New file. * iconvdata/koi8-h.c: New file. * iconvdata/latin-greek-1.c: New file. * iconvdata/latin-greek-1.h: New file. * iconvdata/latin-greek.c: New file. * iconvdata/latin-greek.h: New file. * iconvdata/jis0201.c: New file. * iconvdata/jis0201.h: New file. * iconvdata/jis0208.c: New file. * iconvdata/jis0208.h: New file. * iconvdata/jis0212.c: New file. * iconvdata/jis0212.h: New file. * iconvdata/sjis.c: New file. * iconvdata/gap.pl: New file. Script to generate table header. * iconvdata/gaptab.pl: New file. * iconvdata/gconv-modules: Add info about new modules. * locale/programs/charmap.c: Also examine alias names given in charmap files. * localedata/*: Add to here from add-on. We need the information to generate tables for iconv. Update from db-2.3.14. * db2/Makefile: Updated. * db2/config.h: Likewise. * db2/db.h: Likewise. * db2/db_int.h: Likewise. * db2/btree/bt_cursor.c: Likewise. * db2/btree/bt_delete.c: Likewise. * db2/btree/bt_put.c: Likewise. * db2/btree/bt_search.c: Likewise. * db2/btree/bt_split.c: Likewise. * db2/btree/btree_auto.c: Likewise. * db2/common/db_appinit.c: Likewise. * db2/common/db_apprec.c: Likewise. * db2/common/db_err.c: Likewise. * db2/common/db_region.c: Likewise. * db2/db/db_auto.c: Likewise. * db2/db/db_dispatch.c: Likewise. * db2/db/db_ret.c: Likewise. * db2/dbm/dbm.c: Likewise. * db2/hash/hash_auto.c: Likewise. * db2/include/btree_ext.h: Likewise. * db2/include/common_ext.h: Likewise. * db2/include/db.h.src: Likewise. * db2/include/db_cxx.h: Likewise. * db2/include/db_ext.h: Likewise. * db2/include/db_int.h.src: Likewise. * db2/include/lock.h: Likewise. * db2/include/log.h: Likewise. * db2/include/mp.h: Likewise. * db2/include/mp_ext.h: Likewise. * db2/include/os_ext.h: Likewise. * db2/include/os_func.h: Likewise. * db2/lock/lock.c: Likewise. * db2/lock/lock_deadlock.c: Likewise. * db2/log/log.c: Likewise. * db2/log/log_archive.c: Likewise. * db2/log/log_auto.c: Likewise. * db2/log/log_get.c: Likewise. * db2/log/log_put.c: Likewise. * db2/mp/mp_bh.c: Likewise. * db2/mp/mp_fget.c: Likewise. * db2/mp/mp_fopen.c: Likewise. * db2/mp/mp_fput.c: Likewise. * db2/mp/mp_fset.c: Likewise. * db2/mp/mp_open.c: Likewise. * db2/mp/mp_pr.c: Likewise. * db2/mp/mp_region.c: Likewise. * db2/mp/mp_sync.c: Likewise. * db2/mutex/README: Likewise. * db2/mutex/mutex.c: Likewise. * db2/os/os_open.c: Likewise. * db2/os/os_func.c: Removed. * db2/os/os_config.c: New file. * db2/os/os_spin.c: New file. * db2/txn/txn.c: Likewise. * db2/txn/txn_auto.c: Likewise. 1997-11-30 06:01 Ulrich Drepper <drepper@cygnus.com> * posix/sys/wait.h (__WAIT_INT): Don't use complex version with __typeof for C++ since this fails for class members. Reported by Neal Becker <neal@ctd.comsat.com>. 1997-11-28 11:21 Zack Weinberg <zack@rabi.phys.columbia.edu> * configure.in: Check for a working makeinfo (3.11 or better). * config.make.in: Add MAKEINFO to be substituted. * manual/Makefile: Don't update info if makeinfo is too old. 1997-11-30 05:21 Ulrich Drepper <drepper@cygnus.com> * sysdeps/alpha/setjmp.S: Define _ASM and _SETJMP_H to get definitions. * sysdeps/alpha/__longjmp.S: Likewise. * sysdeps/unix/sysv/linux/alpha/kernel_termios.h: Include <termios.h> not <bits/termios.h>. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Define syscall as __llseek and make llseek and lseek64 weak aliases. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. Patches by a sun <asun@zoology.washington.edu>. 1997-11-29 19:19 Zack Weinberg <zack@rabi.phys.columbia.edu> * misc/sys/syslog.h: Delete KERNEL preprocessor conditional. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise. * misc/sys/syslog.h: Clean up BSD header. 1997-11-29 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/sysv/linux/bits/in.h: Add changes from Linux 2.1.67. * sysdeps/libm-ieee754/s_ctan.c (__ctan): Raise invalid exception for ctan(+-inf,x). * sysdeps/libm-ieee754/s_ctanl.c (__ctanl): Likewise. * sysdeps/libm-ieee754/s_ctanf.c (__ctanf): Likewise. * math/libm-test.c (csqrt_test): Add tests for cabs, carg, ctan, csqrt (-1), ctanh(i*pi/4). 1997-11-26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/generic/bits/confname.h: Fix comma in enumerator. 1997-11-28 13:28 Philip Blundell <Philip.Blundell@pobox.com> * sysdeps/unix/sysv/linux/net/if_arp.h: Add more ARPHRD_ constants. 1997-11-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * wcsmbs/wcrtomb.c (__wcrtomb): Remove unused variable fake. 1997-11-26 21:28 Ulrich Drepper <drepper@cygnus.com> * sysdeps/posix/getcwd.c (GETCWD_STORYGE_CLASS): Remove definition and use. Define GETCWD_RETURN_TYPE instead and use it. * sysdeps/unix/sysv/linux/getcwd.c: Define GETCWD_RETURN_TYPE instead of GETCWD_STORYGE_CLASS and put the return type and the `internal_function' in the right order for gcc 2.7.2. 1997-11-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/sysv/linux/sys/module.h: Remove file. It's incompatible with Linux 2.1.x. Packages using modules (e.g. modutils) should/do provide their own version. Suggested by Richard Henderson. * sysdeps/unix/sysv/linux/Dist: Remove sys/module.h. * sysdeps/unix/sysv/linux/Makefile (sysdep_headers) [$(subdir)=socket]: Remove sys/module.h. * libio/stdio.h: Correct comment of sys_nerr/sys_errlist.
1997-11-12Update.cvs/libc-ud-971111Ulrich Drepper18-519/+549
1997-11-11 21:30 Ulrich Drepper <drepper@cygnus.com> * include/sys/stat.h: Define stat, fstat, lstat and *64 variants as macros so the the library compiles correctly even without optimization. * io/fstat.c: Undef fstat. * io/fstat64.c: Undef fstat64 * io/lstat.c: Undef lstat. * io/lstat64.c: Undef lstat64 * io/stat.c: Undef stat. * io/stat64.c: Undef stat64 * io/fts.c: Include <include/sys/stat.h> to get macro definitions. * io/ftw.c: Likewise. * io/getdirname.c: Likewise. * Makefile (install): Run test-installation.pl if possible. * db2/Makefile: Update from db-2.3.12. * db2/db.h: Likewise. * db2/db_int.h: Likewise. * db2/btree/bt_cursor.c: Likewise. * db2/btree/bt_delete.c: Likewise. * db2/btree/bt_open.c: Likewise. * db2/btree/bt_put.c: Likewise. * db2/btree/bt_rec.c: Likewise. * db2/btree/bt_recno.c: Likewise. * db2/btree/bt_search.c: Likewise. * db2/btree/bt_split.c: Likewise. * db2/btree/bt_stat.c: Likewise. * db2/btree/btree.src: Likewise. * db2/btree/btree_auto.c: Likewise. * db2/btree/bt_cursor.c: Likewise. * db2/btree/bt_delete.c: Likewise. * db2/btree/bt_open.c: Likewise. * db2/btree/bt_put.c: Likewise. * db2/btree/bt_rec.c: Likewise. * db2/btree/bt_recno.c: Likewise. * db2/btree/bt_search.c: Likewise. * db2/btree/bt_split.c: Likewise. * db2/btree/bt_stat.c: Likewise. * db2/btree/btree.src: Likewise. * db2/btree/btree_auto.c: Likewise. * db2/common/db_appinit.c: Likewise. * db2/common/db_apprec.c: Likewise. * db2/common/db_byteorder.c: Likewise. * db2/common/db_region.c: Likewise. * db2/db/db.c: Likewise * db2/db/db.src: Likewise * db2/db/db_auto.c: Likewise * db2/db/db_dispatch.c: Likewise * db2/db/db_dup.c: Likewise * db2/db/db_overflow.c: Likewise * db2/db/db_pr.c: Likewise * db2/db/db_rec.c: Likewise * db2/db/db_ret.c: Likewise * db2/db/db_thread.c: Likewise * db2/db185/db185.c: Likewise. * db2/hash/hash.c: Likewise. * db2/hash/hash.src: Likewise. * db2/hash/hash_auto.c: Likewise. * db2/hash/hash_dup.c: Likewise. * db2/hash/hash_page.c: Likewise. * db2/hash/hash_rec.c: Likewise. * db2/include/btree_auto.h: Likewise. * db2/include/btree_ext.h: Likewise. * db2/include/clib_ext.h: Likewise. * db2/include/common_ext.h: Likewise. * db2/include/db.h.src: Likewise. * db2/include/db_am.h: Likewise. * db2/include/db_auto.h: Likewise. * db2/include/db_cxx.h: Likewise. * db2/include/db_ext.h: Likewise. * db2/include/db_int.h.src: Likewise. * db2/include/hash.h: Likewise. * db2/include/hash_auto.h: Likewise. * db2/include/hash_ext.h: Likewise. * db2/include/lock.h: Likewise. * db2/include/lock_ext.h: Likewise. * db2/include/log.h: Likewise. * db2/include/log_ext.h: Likewise. * db2/include/mp.h: Likewise. * db2/include/mp_ext.h: Likewise. * db2/include/mutex_ext.h: Likewise. * db2/include/os_ext.h: Likewise. * db2/include/os_func.h: Likewise. * db2/include/txn.h: Likewise. * db2/include/txn_ext.h: Likewise. * db2/lock/lock.c: Likewise. * db2/lock/lock_deadlock.c: Likewise. * db2/log/log.c: Likewise. * db2/log/log_archive.c: Likewise. * db2/log/log_auto.c: Likewise. * db2/log/log_findckp.c: Likewise. * db2/log/log_get.c: Likewise. * db2/log/log_put.c: Likewise. * db2/log/log_rec.c: Likewise. * db2/log/log_register.c: Likewise. * db2/mp/mp_bh.c: Likewise. * db2/mp/mp_fget.c: Likewise. * db2/mp/mp_fopen.c: Likewise. * db2/mp/mp_fput.c: Likewise. * db2/mp/mp_fset.c: Likewise. * db2/mp/mp_open.c: Likewise. * db2/mp/mp_pr.c: Likewise. * db2/mp/mp_region.c: Likewise. * db2/mp/mp_sync.c: Likewise. * db2/mutex/mutex.c: Likewise. * db2/os/os_abs.c: Likewise. * db2/os/os_dir.c: Likewise. * db2/os/os_fid.c: Likewise. * db2/os/os_fsync.c: Likewise. * db2/os/os_func.c: Likewise. * db2/os/os_map.c: Likewise. * db2/os/os_oflags.c: Likewise. * db2/os/os_open.c: Likewise. * db2/os/os_rpath.c: Likewise. * db2/os/os_rw.c: Likewise. * db2/os/os_seek.c: Likewise. * db2/os/os_sleep.c: Likewise. * db2/os/os_stat.c: Likewise. * db2/os/os_unlink.c: Likewise. * db2/progs/db_deadlock/db_deadlock.c: Likewise. * db2/progs/db_dump/db_dump.c: Likewise. * db2/progs/db_load/db_load.c: Likewise. * db2/progs/db_recover/db_recover.c: Likewise. * db2/progs/db_stat/db_stat.c: Likewise. * db2/txn/txn.c: Likewise. * db2/txn/txn_auto.c: Likewise. * db2/txn/txn_rec.c: Likewise. * db2/os/db_os_abs.c: Removed. * db2/os/db_os_dir.c: Removed. * db2/os/db_os_fid.c: Removed. * db2/os/db_os_lseek.c: Removed. * db2/os/db_os_mmap.c: Removed. * db2/os/db_os_open.c: Removed. * db2/os/db_os_rw.c: Removed. * db2/os/db_os_sleep.c: Removed. * db2/os/db_os_stat.c: Removed. * db2/os/db_os_unlink.c: Removed. * libio/stdio.h (fopen): Add __restrict to parameters. * manual/process.texi (system): Describe behaviour for NULL argument. * stdio-common/printf-parse.h: Parse hh modifier. * stdio-common/vfprintf.c: Handle hh modifier. * stdio-common/vfscanf.c: Likewise. * manual/stdio.texi: Describe hh modifier for scanf/printf. * math/complex.h: Don't define _Imaginary_I, but instead _Complex_I. gcc does no yet know the `imaginary' keyword. * math/test-math.c: Add little test for know gcc bug. * math/tgmath.h: Make complex versions of log10() only available if __USE_GNU. * stdlib/test-canon.c: Fix typo. * sysdeps/generic/setenv.c: Avoid compilation warnings. Reported by Jim Meyering. * sysdeps/generic/bits/errno.h: EILSEQ is an ISO C error number. * sysdeps/mach/hurd/bits/errno.h: Likewise. * sysdeps/standalone/bits/errno.h: Likewise. * sysdeps/unix/sysv/linux/bits/errno.h: Likewise. * sysdeps/i386/i586/memcpy.S: New file. * sysdeps/i386/i586/mempcpy.S: New file. * sysdeps/i386/i586/memset.S: Fix typo. * sysdeps/posix/getcwd.c: Define HAVE_MEMPCPY for _LIBC. Add casts. * sysdeps/posix/system.c: Add comment to explain code. * sysdeps/wordsize-32/inttypes.h: Include <stddef.h> for wchar_t. Define PTRDIFF_{MIN,MAX}, SIG_ATOMIC_{MIN,MAX}, SIZE_MAX, WCHAR_{MIN,MAX}, WINT_{MIN,MAX}. Define wcstoimax, wcstoumax. * sysdeps/wordsize-64/inttypes.h: Likewise. * wcsmbs/wchar.h: Define WCHAR_{MIN,MAX} if not already defined. Declare __wcsto{l,ul,ll,ull}_internal only if not already done. * time/Makefile (routines): Add strfxtime. * time/strftime.c: Implement %F and %f format. * time/strfxtime.c: New file. * time/time.h: Define new types and symbols from ISO C 9X. * time/mktime.c: Little comment correction. 1997-11-10 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/libm-ieee754/s_sincosl.c: Fix typo. * sysdeps/libm-ieee754/s_tanl.c: Fix typo. * sysdeps/libm-ieee754/s_floorl.c: Correct typos. * sysdeps/libm-ieee754/e_remainderl.c: Replace EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS. * sysdeps/libm-ieee754/e_atan2l.c: Replace EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS. * sysdeps/libm-ieee754/s_scalbnl.c: Replace ";" by "," for correct variable declaration. * sysdeps/libm-ieee754/s_scalblnl.c: Likewise. * sysdeps/libm-ieee754/s_lrint.c (__lrint): Correct function. * math/libm-test.c (sqrt_test): Add test for sqrt (0.25). (asin_test): Add more test. 1997-11-10 23:34 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-ieee754/e_asin.c: Add braces to make code clearer and to not confuse the poor compiler. * sysdeps/libm-ieee754/e_asinf.c: Likewise. Reported by vertex@cagent.com. 1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/dl-lookup.c (do_lookup): Don't accept the base version if we require a specific one. * libio/oldfreopen.c: Bind old symbols to version GLIBC_2.0. * libio/oldiofopen.c: Likewise. * libio/oldstdfiles.c: Likewise. * libc.map: Export them. 1997-11-10 07:40 H.J. Lu <hjl@gnu.ai.mit.edu> * stdlib/exit.c (exit): Handle recursive calls to exit (). 1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/s_llrint.c: Fixed to take double argument instead of long double. * sysdeps/m68k/fpu/s_llrintf.c: New file. * sysdeps/m68k/fpu/s_llrintl.c: New file. * sysdeps/libm-ieee754/s_llrint.c: Make compilable and fix overflow condition. * sysdeps/libm-ieee754/s_llrintf.c: Fix overflow condition. * sysdeps/libm-ieee754/s_llrintl.c: Likewise. * sysdeps/libm-ieee754/s_llround.c: Likewise. * sysdeps/libm-ieee754/s_llroundf.c: Likewise. * sysdeps/libm-ieee754/s_llroundl.c: Likewise. * sysdeps/libm-ieee754/s_lrint.c: Likewise. * sysdeps/libm-ieee754/s_lrintf.c: Likewise. * sysdeps/libm-ieee754/s_lrintl.c: Likewise. * sysdeps/libm-ieee754/s_lround.c: Likewise. * sysdeps/libm-ieee754/s_lroundf.c: Likewise. * sysdeps/libm-ieee754/s_lroundl.c: Likewise. * math/libm-test.c: Test all three variants of lrint and llrint. Fix typos in lround and llround tests. Add tests for boundary cases for lrint and llround. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/arith.texi: Misc doc fixes. * manual/ctype.texi: Likewise. * manual/pattern.texi: Likewise. * manual/terminal.texi: Likewise. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/xstatconv.c: Use struct assignment instead of memcpy to let the compiler use whatever it regards as optimal. * sysdeps/unix/sysv/linux/alpha/xstatconv.c: Likewise. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/Makefile (sysdep_headers) [$(subdir)=misc]: Add sys/prctl.h. * sysdeps/unix/sysv/linux/Dist: Distribute it. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * io/ftwtest-sh: Don't use the unknown which command, instead try pwd as /bin/pwd and /usr/bin/pwd. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/maint.texi (Tools for Installation): Don't recommend broken version 3.76.1 of make. (Porting): Fix wording. 1997-11-06 06:13 H.J. Lu <hjl@gnu.ai.mit.edu> * config.make.in (build-pic-default): New, defined with pic_default. * configure.in (pic_default): New, set to yes if PIC is default. * Makeconfig (CPPFLAGS-.o, CPPFLAGS-.op, CPPFLAGS-.og, CPPFLAGS-.ob): Add -DPIC if $(build-pic-default) is yes. 1997-11-09 18:15 Ulrich Drepper <drepper@cygnus.com> * Makerules (libc.so): Fix typo. * csu/Makefile (CFLAGS-initfini.s): Correctly fix moving function definition. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>. * stdlib/strtod.c: Handle numbers like 0.0e10000 correctly which produce ±0.0. Reported by Joe Keane <jgk@jgk.org>. * sysdeps/libm-ieee754/s_ceill.c: Fix typos. * sysdeps/libm-ieee754/s_llrint.c: Correct code, it never worked. 1997-11-06 07:00 H.J. Lu <hjl@gnu.ai.mit.edu> * sysdeps/unix/sysv/i386/i686/time.S: Removed. 1997-11-08 14:07 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/libnsl.map: Add __do_niscall2 for nis_cachemgr. * nis/nis_call.c: Set UDP resend timeout correct. * nis/nss_compat/compat-grp.c: Rewritten to make it faster. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * nis/ypclnt.c: Fix UDP resend timeout, fix yp_bind/do_ypcall interaction. * inet/protocols/routed.h: Include sys/socket.h. * inet/protocols/talkd.h: Likewise. * inet/protocols/timed.h: Include rpc/types.h. * sunrpc/rpc/pmap_clnt.h: Include rpc/clnt.h. 1997-11-06 01:39 Ulrich Drepper <drepper@cygnus.com> * Makerules (libc.so): Add missing closing brace. 1997-11-05 Brendan Kehoe <brendan@lisa.cygnus.com> * libio.h (__P): Name its arg `p' instead of `params'. This was added solely to work around problems with the definition of __P in the Solaris math.h header.
1997-09-30Update.cvs/libc-ud-970930Ulrich Drepper1-3/+5
1997-09-30 18:03 Ulrich Drepper <drepper@cygnus.com> * Makerules: Undo last change. * csu/Makefile: Define before-compile at the right place. * aclocal.m4: Remove a.out file created by assembler test. * set-init.c: Find set-hooks.h using <...>. Update to db 2.3.10. * db2/Makefile: Update. * db2/db.h: Likewise. * db2/db_185.h: Likewise. * db2/db_int.h: Likewise. * db2/btree/bt_close.c: Likewise. * db2/btree/bt_conv.c: Likewise. * db2/btree/bt_cursor.c: Likewise. * db2/btree/bt_put.c: Likewise. * db2/btree/bt_rec.c: Likewise. * db2/btree/bt_recno.c: Likewise. * db2/btree/btree.src: Likewise. * db2/btree/btree_auto.c: Likewise. * db2/clib/getlong.c: Likewise. * db2/db/db.c: Likewise. * db2/db/db_auto.c: Likewise. * db2/db/db_conv.c: Likewise. * db2/db/db_pr.c: Likewise. * db2/db/db_ret.c: Likewise. * db2/db/db_thread.c: Likewise. * db2/hash/hash.c: Likewise. * db2/hash/hash_auto.c: Likewise. * db2/hash/hash_conv.c: Likewise. * db2/hash/hash_dup.c: Likewise. * db2/hash/hash_func.c: Likewise. * db2/hash/hash_page.c: Likewise. * db2/hash/hash_rec.c: Likewise. * db2/include/btree.h: Likewise. * db2/include/btree_ext.h: Likewise. * db2/include/db.h.src: Likewise. * db2/include/db_185.h.src: Likewise. * db2/include/db_cxx.h: Likewise. * db2/include/db_ext.h: Likewise. * db2/include/db_int.h.src: Likewise. * db2/include/db_page.h: Likewise. * db2/include/db_shash.h: Likewise. * db2/include/lock.h: Likewise. * db2/include/log.h: Likewise. * db2/include/log_ext.h: Likewise. * db2/include/mp.h: Likewise. * db2/include/shqueue.h: Likewise. * db2/include/txn.h: Likewise. * db2/lock/lock.c: Likewise. * db2/lock/lock_deadlock.c: Likewise. * db2/log/log.c: Likewise. * db2/log/log_archive.c: Likewise. * db2/log/log_auto.c: Likewise. * db2/log/log_get.c: Likewise. * db2/log/log_put.c: Likewise. * db2/log/log_register.c: Likewise. * db2/mp/mp_bh.c: Likewise. * db2/mp/mp_fget.c: Likewise. * db2/mp/mp_fopen.c: Likewise. * db2/mp/mp_fput.c: Likewise. * db2/mp/mp_fset.c: Likewise. * db2/mp/mp_open.c: Likewise. * db2/mutex/mutex.c: Likewise. * db2/os/db_os_dir.c: Likewise. * db2/progs/db_checkpoint/db_checkpoint.c: Likewise. * db2/progs/db_deadlock/db_deadlock.c: Likewise. * db2/progs/db_dump185/db_dump185.c: Likewise. * db2/progs/db_load/db_load.c: Likewise. * db2/progs/db_recover/db_recover.c: Likewise. * db2/txn/txn.c: Likewise. * db2/txn/txn_auto.c: Likewise. * elf/link.h: Define struct libname_list outside struct link_map to not confuse C++ compilers. * include/features.h: Recognize _XOPEN_SOURCE == 500 and set __USE_UNIX98. * manual/creature.texi: Explain this. * libc.map: Add new functions. * libio/Makefile (routines): Add fseeko and ftello. * libio/ftello.c: New file. * libio/fseeko.c: New file. * libio/stdio.h: Add prototypes for new functions. * manual/stdio.texi: Document fseeko and ftello. * posix/Makefile (routines): Add pread and pwrite. * sysdeps/posix/pread.c: New file. * sysdeps/posix/pwrite.c: New file. * sysdeps/stub/pread.c: New file. * sysdeps/stub/pwrite.c: New file. * posix/unistd.h: Add prototypes for pread and pwrite. Pretty print header. Define gid_t, uid_t, off_t, pid_t if __USE_UNIX98. Declare ctermid and cuserid if __USE_UNIX98. (swab): Change to take void * arguments. * string/swab.c: Change parameter to void *. * posix/sys/types: Define gid_t, uid_t, off_t, pid_t only if not already happened. * manual/llio.texi: Document pread and pwrite. * string/strings.h: Don't simply include string.h. Define BSD functions according to Unix98. * stdlib/tst-strtol.c: Include <string.h> not <strings.h>. * sunrpc/clnt_simp.c: Likewise. * malloc/Makefile (aux): Add set-freeres. * malloc/mtrace.c: Define function release_libc_mem which calls the __libc_subfreeres handler. (mtrace): Register release_libc_mem. * malloc/set-freeres.c: New file. * intl/dcgettext.c: Define free_mem function and add to __libc_subfreeres list. * intl/finddomain.c: Likewise. * intl/gettextP.h (struct loaded_domain): Add new fields use_mmap and mmap_size. Add prototype for _nl_unloaded_domain. * intl/loadmsgcat.c: Define new function _nl_unload_domain. (_nl_load_domain): Store informaiton about mmap use and file size. * intl/localealias.c (read_alias_file): Optimize locale alias file reading by avoid frequen mallocs. Define free_mem function and add to __libc_subfreeres list. * locale/localeinfo.h: Make a difference between MAX_USAGE_COUNT and undeletable. Add prototype for _nl_unload_locale. * locale/C-collate: Mark data as undeletable by using UNDELETABLE. * locale/C-ctype: Likewise. * locale/C-messages: Likewise. * locale/C-monetary: Likewise. * locale/C-numeric: Likewise. * locale/C-time: Likewise. * locale/findlocale.c (_nl_find_locale, _nl_remove_locale): Handle MAX_USAGE_COUNT and UNDELETABLE. (free_mem): New function. Add it to __libc_subfreeres list. * locale/loadlocale.c: Define _nl_unload_locale function. * misc/hsearch.c: Register hdestroy in __libc_subfreeres list. * stdlib/fmtmsg.c (addseverity): Handle illegal severity arguments correctly Define free_mem function and add to __libc_subfreeres list. * locale/programs/localedef.c (options): short form os verbose is v. Reported by Andreas Jaeger. * misc/sys/select.h: Define pselect only is __USE_POSIX since this header is used in some others as well for historical reasons. * resolv/resolv.h: Include <netinet/in.h> to make self-contained. * string/bits/string2.h: Add missing braces and optimize strcmp a bit more. * sysdeps/i386/i486/bits/string.h: Likewise. * sunrpc/rpc/auth_des.h: Include rpc/auth.h to be self-contained. Pretty print. * sysdeps/mach/hurd/cthreads.c: Add copyright text. * sysdeps/unix/sysv/linux/syscalls.list: Correct prctl entry. * sysdeps/unix/sysv/linux/sys/mman.h: Get definition of size_t. * time/time.h: Pretty print. 1997-09-29 Paul Eggert <eggert@twinsun.com> * time/strftime.c: Synchronize with GNU Emacs strftime.c. (HAVE_MEMCPY): Define if emacs is defined and HAVE_BCOPY isn't. (gmtime_r, localtime_r): Undef before defining. (iso_week_days): Use __inline__, not inline. 1997-09-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/bits/mathinline.h: Rename exp2{,l,f} to __ieee754_exp2{,l,f}. * sysdeps/m68k/fpu/s_exp2.c: Likewise. * sysdeps/m68k/fpu/s_exp2l.c: Likewise. * sysdeps/m68k/fpu/s_exp2f.c: Likewise. 1997-09-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/soinit.c (__EH_FRAME_BEGIN__): Don't make the .eh_frame section read-only, it contains relocations. * elf/sofini.c (__FRAME_END__): Likewise. 1997-09-29 03:08 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/i486/bits/string.h [__PIC__] (__strspn_cg, __strcspn_cg, __strpbrk_cg, __strstr_cg): Optimize even more. No spill register needed. Patch by NIIBE Yutaka <gniibe@mri.co.jp>. 1997-09-28 08:27 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/nis_call.c (__do_niscall2): Fix return code, add missing break in switch case. * nis/nis_mkdir.c: Fix return codes to match Solaris version. * nis/nis_rmdir.c: Likewise. * nis/rpcsvc/yp_prot.h: Rename struct keydat to struct keydat_t for C++. 1997-09-28 04:32 Ulrich Drepper <drepper@cygnus.com> * configure.in: Fix typo. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>. 1997-09-25 20:14 Philip Blundell <Philip.Blundell@pobox.com> * sysdeps/unix/sysv/linux/scsi/sg.h: New file. * sysdeps/unix/sysv/linux/Makefile: Install <scsi/sg.h>.
1997-09-05Update.cvs/libc-ud-970904Ulrich Drepper2-5/+5
1997-09-05 03:15 Ulrich Drepper <drepper@cygnus.com> * Makefile (subdirs): Reorganize order so that nss follows add-ons. * config.make.in (LDAP): Add. * configure.in: Prepare for ldap add-on. * shlib-versions: Add version numbers for ldap NSS module. * nss/Makefile: Add rules to build ldap NSS module. * db/btree/bt_page.c (__bt_free): Update meta data information. Update db from db-2.3.6. * db2/db.h: Updated. * db2/btree/bt_close.c: Updated. * db2/btree/bt_compare.c: Updated. * db2/btree/bt_conv.c: Updated. * db2/btree/bt_cursor.c: Updated. * db2/btree/bt_delete.c: Updated. * db2/btree/bt_put.c: Updated. * db2/btree/bt_rec.c: Updated. * db2/btree/bt_recno.c: Updated. * db2/btree/bt_search.c: Updated. * db2/btree/bt_split.c: Updated. * db2/btree/bt_stat.c: Updated. * db2/common/db_appinit.c: Updated. * db2/common/db_apprec.c: Updated. * db2/common/db_byteorder.c: Updated. * db2/common/db_err.c: Updated. * db2/common/db_region.c: Updated. * db2/db/db.c: Updated. * db2/db/db_conv.c: Updated. * db2/db/db_dup.c: Updated. * db2/db/db_pr.c: Updated. * db2/db/db_ret.c: Updated. * db2/db185/db185.c: Updated. * db2/dbm/dbm.c: Updated. * db2/hash/hash_dup.c: Updated. * db2/include/db_am.h: Updated. * db2/include/db_page.h: Updated. * db2/include/mp.h: Updated. * db2/include/queue.h: Updated. * db2/log/log.c: Updated. * db2/log/log_findckp.c: Updated. * db2/log/log_get.c: Updated. * db2/log/log_rec.c: Updated. * db2/mp/mp_bh.c: Updated. * db2/mp/mp_fopen.c: Updated. * db2/mp/mp_pr.c: Updated. * db2/mp/mp_sync.c: Updated. * db2/mutex/x86.gcc: Updated. * db2/os/db_os_dir.c: Updated. * db2/os/db_os_fid.c: Updated. * db2/progs/db_archive/db_archive.c: Updated. * db2/progs/db_checkpoint/db_checkpoint.c: Updated. * db2/progs/db_deadlock/db_deadlock.c: Updated. * db2/progs/db_dump/db_dump.c: Updated. * db2/progs/db_dump185/db_dump185.c: Updated. * db2/progs/db_load/db_load.c: Updated. * db2/progs/db_printlog/db_printlog.c: Updated. * db2/progs/db_recover/db_recover.c: Updated. * db2/progs/db_stat/db_stat.c: Updated. * db2/txn/txn.c: Updated. * db2/txn/txn_rec.c: Updated. * db2/Makefile: Add rule to build db_printlog. * db2/config.h: Don't include endian.h and don't define WORDS_BIGENDIAN. Only define HAVE_ENDIAN_H. * elf/dl-open.c (_dl_open): Make thread-safe. * elf/dl-close.c (_dl_close): Likewise. * elf/dlclose.c: Pretty print. * elf/dl-version.c (make_string): Use __strdup not strdup. (find_needed): Don't use l_searchlist of _dl_loaded, use the l_next list. * elf/dl-deps.c (_dl_map_object_deps): Remove variable head. * manual/math.texi: Add note about == and != for FP values. * manual/message.texi: Mention problems with relative paths and binstextdomain. * manual/string.texi: Mark strdupa and strndupa correctly as macros. * sunrpc/Makefile (CFLAGS-xkey_prot.c): Define to prevent warnings. * sunrpc/rpc_cout.c: Avoid needless races around return value. * sysdeps/generic/stpcpy.c: Include <config.h> if wanted. Update from tzdata-1997h. * time/africa: Updated. * time/europe: Updated. * time/iso3166.tab: Updated. * time/northamerica: Updated. * time/southamerica: Updated. * time/zone.tab: Updated. 1997-09-04 13:19 Richard Henderson <rth@cygnus.com> * sysdeps/alpha/w_sqrt.S: Removed. * sysdeps/alpha/fpu/e_sqrt.c: New. Obey -mieee and -mieee-with-inexact and build a version that is as fast as possible given the constraint. 1997-08-30 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/maint.texi: Document some defaults for configuration parameters. 1997-09-04 15:57 Ulrich Drepper <drepper@cygnus.com> * termios/cfsetspeed.c (cfsetspeed): Change return value to int. * termios/termios.h: Change prototype accordingly. Reported by Andreas Jaeger <aj@arthur.rhein-neckar.de>. 1997-07-26 14:42 H.J. Lu <hjl@gnu.ai.mit.edu> * libio/stdfiles.c (_libio_using_thunks): Define if _G_USING_THUNKS is defined. * libio/_G_config.h: Moved to ... * sysdeps/generic/_G_config.h: ...here. * sysdeps/unix/sysv/linux/_G_config.h: New, Add vtable thunks support. 1997-09-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/Makefile (pic-ccflag): Override it for more efficient code (together with a change in gcc). * Makeconfig (pic-ccflag): New variable. (CFLAGS-.os): Use it instead of hardcoding -fPIC. 1997-09-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/dl-machine.h (elf_machine_load_address): Use _dl_start instead of a local label, to avoid getting an unreadable label name. 1997-09-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * nss/Makefile ($(objpfx)libnss_db.so): Use $(dbobjdir) to find libdb.so. * Makeconfig (dbobjdir): Use db2. 1997-08-31 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/maint.texi (Porting to Unix): Update description of the implementation of Unix system calls. (Contributors): Use real umlaut in tege's name. 1997-08-30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/w_gamma.c: Make compilable with _IEEE_LIBM. * sysdeps/libm-ieee754/w_gammaf.c: Likewise. * sysdeps/libm-ieee754/w_gammal.c: Likewise.
1997-08-27Update.cvs/libc-ud-970827Ulrich Drepper10-0/+913
1997-08-10 19:17 Philip Blundell <Philip.Blundell@pobox.com> * nss/nss_db/db-XXX.c: Include <db_185.h> not <db.h>. Somebody should update this to use the new db API. * nss/nss_db/db-netgrp.c: Likewise. * nss/nss_db/db-alias.c: Likewise. * db2/Makefile: Makefile for db-2.x in glibc. 1997-08-27 21:20 Ulrich Drepper <drepper@cygnus.com> * csu/Makefile (before-compile): New goal. Make sure abi-tag.h is generated. [$(elf)=yes] (asm-CPPFLAGS): Make sure abi-tag.h file can be found. * Makeconfig [$(build-omitfp)=yes] (CFLAGS-.o): Add -D__USE_STRING_INLINES. * string/string.f: Move strnlen optimization after inclusion of <bits/string.h>. Include <bits/string.h> only if __USE_STRING_INLINES is defined. * sysdeps/generic/memcpy.c: Undef memcpy to allow macro of this name in <bits/string.h>. * sysdeps/generic/memset.c: Likewise. * sysdeps/i386/string.h: i386 optimized string functions. * sysdeps/i386/i486string.h: i486+ optimized string functions. * Makefile (subdirs): Change db to db2. * shlib-versions: Bump libdb verion number to 3. * include/db.h: Include from db2 directory. * include/db_185.h: New file. * sysdeps/i386/Makefile [$(subdirs)=db2] (CPPFLAGS): Add macros to provide spinlock information for db2. * sysdeps/m68k/m68020/Makefile: New file. Likewise. * sysdeps/sparc/Makefile: New file. Likewise. * sysdeps/unix/sysv/linux/Makefile [$(subdirs)=db2] (CPPFLAGS): Add -DHAVE_LLSEEK. * db2/config.h: Hand-edited config file for db2 in glibc. * db2/compat.h: New file from db-2.3.4. * db2/db.h: Likewise. * db2/db_185.h: Likewise. * db2/db_int.h: Likewise. * db2/makedb.c: Likewise. * db2/btree/bt_close.c: Likewise. * db2/btree/bt_compare.c: Likewise. * db2/btree/bt_conv.c: Likewise. * db2/btree/bt_cursor.c: Likewise. * db2/btree/bt_delete.c: Likewise. * db2/btree/bt_open.c: Likewise. * db2/btree/bt_page.c: Likewise. * db2/btree/bt_put.c: Likewise. * db2/btree/bt_rec.c: Likewise. * db2/btree/bt_recno.c: Likewise. * db2/btree/btree_auto.c: Likewise. * db2/btree/bt_rsearch.c: Likewise. * db2/btree/bt_search.c: Likewise. * db2/btree/bt_split.c: Likewise. * db2/btree/bt_stat.c: Likewise. * db2/btree/btree.src: Likewise. * db2/common/db_appinit.c: Likewise. * db2/common/db_err.c: Likewise. * db2/common/db_byteorder.c: Likewise. * db2/common/db_apprec.c: Likewise. * db2/common/db_salloc.c: Likewise. * db2/common/db_log2.c: Likewise. * db2/common/db_region.c: Likewise. * db2/common/db_shash.c: Likewise. * db2/db/db.c: Likewise. * db2/db/db.src: Likewise. * db2/db/db_conv.c: Likewise. * db2/db/db_dispatch.c: Likewise. * db2/db/db_dup.c: Likewise. * db2/db/db_overflow.c: Likewise. * db2/db/db_pr.c: Likewise. * db2/db/db_rec.c: Likewise. * db2/db/db_ret.c: Likewise. * db2/db/db_thread.c: Likewise. * db2/db/db_auto.c: Likewise. * db2/db185/db185.c: Likewise. * db2/db185/db185_int.h: Likewise. * db2/dbm/dbm.c: Likewise. * db2/hash/hash.c: Likewise. * db2/hash/hash.src: Likewise. * db2/hash/hash_page.c: Likewise. * db2/hash/hash_conv.c: Likewise. * db2/hash/hash_debug.c: Likewise. * db2/hash/hash_stat.c: Likewise. * db2/hash/hash_rec.c: Likewise. * db2/hash/hash_dup.c: Likewise. * db2/hash/hash_func.c: Likewise. * db2/hash/hash_auto.c: Likewise. * db2/include/mp.h: Likewise. * db2/include/btree.h: Likewise. * db2/include/db.h.src: Likewise. * db2/include/db_int.h.src: Likewise. * db2/include/db_shash.h: Likewise. * db2/include/db_swap.h: Likewise. * db2/include/db_185.h.src: Likewise. * db2/include/txn.h: Likewise. * db2/include/db_am.h: Likewise. * db2/include/shqueue.h: Likewise. * db2/include/hash.h: Likewise. * db2/include/db_dispatch.h: Likewise. * db2/include/lock.h: Likewise. * db2/include/db_page.h: Likewise. * db2/include/log.h: Likewise. * db2/include/db_auto.h: Likewise. * db2/include/btree_auto.h: Likewise. * db2/include/hash_auto.h: Likewise. * db2/include/log_auto.h: Likewise. * db2/include/txn_auto.h: Likewise. * db2/include/db_ext.h: Likewise. * db2/include/btree_ext.h: Likewise. * db2/include/clib_ext.h: Likewise. * db2/include/common_ext.h: Likewise. * db2/include/hash_ext.h: Likewise. * db2/include/lock_ext.h: Likewise. * db2/include/log_ext.h: Likewise. * db2/include/mp_ext.h: Likewise. * db2/include/mutex_ext.h: Likewise. * db2/include/os_ext.h: Likewise. * db2/include/txn_ext.h: Likewise. * db2/include/cxx_int.h: Likewise. * db2/include/db_cxx.h: Likewise. * db2/include/queue.h: Likewise. * db2/lock/lock.c: Likewise. * db2/lock/lock_conflict.c: Likewise. * db2/lock/lock_util.c: Likewise. * db2/lock/lock_deadlock.c: Likewise. * db2/log/log.c: Likewise. * db2/log/log_get.c: Likewise. * db2/log/log.src: Likewise. * db2/log/log_compare.c: Likewise. * db2/log/log_put.c: Likewise. * db2/log/log_rec.c: Likewise. * db2/log/log_archive.c: Likewise. * db2/log/log_register.c: Likewise. * db2/log/log_auto.c: Likewise. * db2/log/log_findckp.c: Likewise. * db2/mp/mp_bh.c: Likewise. * db2/mp/mp_fget.c: Likewise. * db2/mp/mp_fopen.c: Likewise. * db2/mp/mp_fput.c: Likewise. * db2/mp/mp_fset.c: Likewise. * db2/mp/mp_open.c: Likewise. * db2/mp/mp_region.c: Likewise. * db2/mp/mp_pr.c: Likewise. * db2/mp/mp_sync.c: Likewise. * db2/mutex/68020.gcc: Likewise. * db2/mutex/mutex.c: Likewise. * db2/mutex/README: Likewise. * db2/mutex/x86.gcc: Likewise. * db2/mutex/sparc.gcc: Likewise. * db2/mutex/uts4.cc.s: Likewise. * db2/mutex/alpha.dec: Likewise. * db2/mutex/alpha.gcc: Likewise. * db2/mutex/parisc.gcc: Likewise. * db2/mutex/parisc.hp: Likewise. * db2/os/db_os_abs.c: Likewise. * db2/os/db_os_dir.c: Likewise. * db2/os/db_os_fid.c: Likewise. * db2/os/db_os_lseek.c: Likewise. * db2/os/db_os_mmap.c: Likewise. * db2/os/db_os_open.c: Likewise. * db2/os/db_os_rw.c: Likewise. * db2/os/db_os_sleep.c: Likewise. * db2/os/db_os_stat.c: Likewise. * db2/os/db_os_unlink.c: Likewise. * db2/txn/txn.c: Likewise. * db2/txn/txn.src: Likewise. * db2/txn/txn_rec.c: Likewise. * db2/txn/txn_auto.c: Likewise. * db2/clib/getlong.c: Likewise. * db2/progs/db_archive/db_archive.c: Likewise. * db2/progs/db_checkpoint/db_checkpoint.c: Likewise. * db2/progs/db_deadlock/db_deadlock.c: Likewise. * db2/progs/db_dump/db_dump.c: Likewise. * db2/progs/db_dump185/db_dump185.c: Likewise. * db2/progs/db_load/db_load.c: Likewise. * db2/progs/db_printlog/db_printlog.c: Likewise. * db2/progs/db_recover/db_recover.c: Likewise. * db2/progs/db_stat/db_stat.c: Likewise. * libio/stdio.h [__cplusplus] (__STDIO_INLINE): Define as inline. * po/de.po, po/sv.po: Update from 2.0.5 translations. * sysdeps/unix/sysv/linux/netinet/tcp.h: Pretty print. * sunrpc/rpc/xdr.h (XDR): Don't define argument of x_destroy callback as const. * sunrpc/xdr_mem.c (xdrmem_destroy): Don't define argument as const. * sunrpx/xdr_rec.c (xdrrec_destroy): Likewise. * sunrpx/xdr_stdio.c (xdrstdio_destroy): Likewise. 1997-08-27 18:47 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/if_index.c: Include <errno.h>. Reported by Benjamin Kosnik <bkoz@cygnus.com>. 1997-08-27 02:27 Roland McGrath <roland@baalperazim.frob.com> * abi-tags: New file. * csu/Makefile (distribute): Remove abi-tag.h. ($(objpfx)abi-tag.h): New target. * Makefile (distribute): Add abi-tags. * sysdeps/unix/sysv/linux/abi-tag.h: File removed. * sysdeps/mach/hurd/abi-tag.h: File removed. * sysdeps/stub/abi-tag.h: File removed. 1997-08-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/make-syscalls.sh: Change output so that it generates compilation rules only for the currently selected object suffixes. 1997-08-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/dl-machine.h (RTLD_START): Switch back to previous section to avoid confusing the compiler. * sysdeps/alpha/dl-machine.h (RTLD_START): Likewise. * sysdeps/i386/dl-machine.h (RTLD_START): Likewise. * sysdeps/mips/dl-machine.h (RTLD_START): Likewise. * sysdeps/mips/mips64/dl-machine.h (RTLD_START): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_load_address): Use a GOT relocation instead of a constant to avoid text relocation. (ELF_MACHINE_BEFORE_RTLD_RELOC): Removed. (RTLD_START): Declare global labels as functions and add size directive. 1997-08-25 17:01 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/bits/select.h: Correct assembler versions to work even for descriptors >= 32. * stdlib/alloca.h: Don't define alloca to __alloca since if gcc is used __alloca is not defined to __builtin_alloca and so might not be available. Reported by Uwe Ohse <uwe@ohse.de>. * sysdeps/unix/sysv/linux/sys/sysmacros.h: Define macros in a special way if gcc is not used and so dev_t is an array. Reported by Uwe Ohse <uwe@ohse.de>. 1997-08-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/libc.texinfo: Reorder chapters to match logical order. 1997-08-25 12:22 Ulrich Drepper <drepper@cygnus.com> * sunrpc/rpc/xdr.h: Change name of parameters in prototypes of xdr_reference, xdrmem_create, and xdrstdio_create because of clash with g++ internal symbols. Patch by Sudish Joseph <sj@eng.mindspring.net>. * elf/dl-deps.c: Implement handling of DT_FILTER.
ass="hl com">/* think about this one */ /* For backward compatibility */ #define PENDING_FILL(R,VAL) \ do { \ if ((R) >= FGR_BASE && (R) < FGR_BASE + NR_FGR) \ { \ PENDING_SCHED(FGR[(R) - FGR_BASE], VAL, 1, -1); \ PENDING_SCHED(FPR_STATE[(R) - FGR_BASE], fmt_uninterpreted, 1, -1); \ } \ else \ PENDING_SCHED(GPR[(R)], VAL, 1, -1); \ } while (0) enum float_operation { FLOP_ADD, FLOP_SUB, FLOP_MUL, FLOP_MADD, FLOP_MSUB, FLOP_MAX=10, FLOP_MIN, FLOP_ABS, FLOP_ITOF0=14, FLOP_FTOI0=18, FLOP_NEG=23 }; /* The internal representation of an MDMX accumulator. Note that 24 and 48 bit accumulator elements are represented in 32 or 64 bits. Since the accumulators are 2's complement with overflow suppressed, high-order bits can be ignored in most contexts. */ typedef signed32 signed24; typedef signed64 signed48; typedef union { signed24 ob[8]; signed48 qh[4]; } MDMX_accumulator; /* Conventional system arguments. */ #define SIM_STATE sim_cpu *cpu, address_word cia #define SIM_ARGS CPU, cia struct _sim_cpu { /* The following are internal simulator state variables: */ #define CIA_GET(CPU) ((CPU)->registers[PCIDX] + 0) #define CIA_SET(CPU,CIA) ((CPU)->registers[PCIDX] = (CIA)) address_word dspc; /* delay-slot PC */ #define DSPC ((CPU)->dspc) #define DELAY_SLOT(TARGET) NIA = delayslot32 (SD_, (TARGET)) #define NULLIFY_NEXT_INSTRUCTION() NIA = nullify_next_insn32 (SD_) /* State of the simulator */ unsigned int state; unsigned int dsstate; #define STATE ((CPU)->state) #define DSSTATE ((CPU)->dsstate) /* Flags in the "state" variable: */ #define simHALTEX (1 << 2) /* 0 = run; 1 = halt on exception */ #define simHALTIN (1 << 3) /* 0 = run; 1 = halt on interrupt */ #define simTRACE (1 << 8) /* 0 = do nothing; 1 = trace address activity */ #define simPCOC0 (1 << 17) /* COC[1] from current */ #define simPCOC1 (1 << 18) /* COC[1] from previous */ #define simDELAYSLOT (1 << 24) /* 0 = do nothing; 1 = delay slot entry exists */ #define simSKIPNEXT (1 << 25) /* 0 = do nothing; 1 = skip instruction */ #define simSIGINT (1 << 28) /* 0 = do nothing; 1 = SIGINT has occured */ #define simJALDELAYSLOT (1 << 29) /* 1 = in jal delay slot */ #ifndef ENGINE_ISSUE_PREFIX_HOOK #define ENGINE_ISSUE_PREFIX_HOOK() \ { \ /* Perform any pending writes */ \ PENDING_TICK(); \ /* Set previous flag, depending on current: */ \ if (STATE & simPCOC0) \ STATE |= simPCOC1; \ else \ STATE &= ~simPCOC1; \ /* and update the current value: */ \ if (GETFCC(0)) \ STATE |= simPCOC0; \ else \ STATE &= ~simPCOC0; \ } #endif /* ENGINE_ISSUE_PREFIX_HOOK */ /* This is nasty, since we have to rely on matching the register numbers used by GDB. Unfortunately, depending on the MIPS target GDB uses different register numbers. We cannot just include the relevant "gdb/tm.h" link, since GDB may not be configured before the sim world, and also the GDB header file requires too much other state. */ #ifndef TM_MIPS_H #define LAST_EMBED_REGNUM (96) #define NUM_REGS (LAST_EMBED_REGNUM + 1) #define FP0_REGNUM 38 /* Floating point register 0 (single float) */ #define FCRCS_REGNUM 70 /* FP control/status */ #define FCRIR_REGNUM 71 /* FP implementation/revision */ #endif /* To keep this default simulator simple, and fast, we use a direct vector of registers. The internal simulator engine then uses manifests to access the correct slot. */ unsigned_word registers[LAST_EMBED_REGNUM + 1]; int register_widths[NUM_REGS]; #define REGISTERS ((CPU)->registers) #define GPR (&REGISTERS[0]) #define GPR_SET(N,VAL) (REGISTERS[(N)] = (VAL)) #define LO (REGISTERS[33]) #define HI (REGISTERS[34]) #define PCIDX 37 #define PC (REGISTERS[PCIDX]) #define CAUSE (REGISTERS[36]) #define SRIDX (32) #define SR (REGISTERS[SRIDX]) /* CPU status register */ #define FCR0IDX (71) #define FCR0 (REGISTERS[FCR0IDX]) /* really a 32bit register */ #define FCR31IDX (70) #define FCR31 (REGISTERS[FCR31IDX]) /* really a 32bit register */ #define FCSR (FCR31) #define Debug (REGISTERS[86]) #define DEPC (REGISTERS[87]) #define EPC (REGISTERS[88]) #define ACX (REGISTERS[89]) #define AC0LOIDX (33) /* Must be the same register as LO */ #define AC0HIIDX (34) /* Must be the same register as HI */ #define AC1LOIDX (90) #define AC1HIIDX (91) #define AC2LOIDX (92) #define AC2HIIDX (93) #define AC3LOIDX (94) #define AC3HIIDX (95) #define DSPLO(N) (REGISTERS[DSPLO_REGNUM[N]]) #define DSPHI(N) (REGISTERS[DSPHI_REGNUM[N]]) #define DSPCRIDX (96) /* DSP control register */ #define DSPCR (REGISTERS[DSPCRIDX]) #define DSPCR_POS_SHIFT (0) #define DSPCR_POS_MASK (0x3f) #define DSPCR_POS_SMASK (DSPCR_POS_MASK << DSPCR_POS_SHIFT) #define DSPCR_SCOUNT_SHIFT (7) #define DSPCR_SCOUNT_MASK (0x3f) #define DSPCR_SCOUNT_SMASK (DSPCR_SCOUNT_MASK << DSPCR_SCOUNT_SHIFT) #define DSPCR_CARRY_SHIFT (13) #define DSPCR_CARRY_MASK (1) #define DSPCR_CARRY_SMASK (DSPCR_CARRY_MASK << DSPCR_CARRY_SHIFT) #define DSPCR_CARRY (1 << DSPCR_CARRY_SHIFT) #define DSPCR_EFI_SHIFT (14) #define DSPCR_EFI_MASK (1) #define DSPCR_EFI_SMASK (DSPCR_EFI_MASK << DSPCR_EFI_SHIFT) #define DSPCR_EFI (1 << DSPCR_EFI_MASK) #define DSPCR_OUFLAG_SHIFT (16) #define DSPCR_OUFLAG_MASK (0xff) #define DSPCR_OUFLAG_SMASK (DSPCR_OUFLAG_MASK << DSPCR_OUFLAG_SHIFT) #define DSPCR_OUFLAG4 (1 << (DSPCR_OUFLAG_SHIFT + 4)) #define DSPCR_OUFLAG5 (1 << (DSPCR_OUFLAG_SHIFT + 5)) #define DSPCR_OUFLAG6 (1 << (DSPCR_OUFLAG_SHIFT + 6)) #define DSPCR_OUFLAG7 (1 << (DSPCR_OUFLAG_SHIFT + 7)) #define DSPCR_CCOND_SHIFT (24) #define DSPCR_CCOND_MASK (0xf) #define DSPCR_CCOND_SMASK (DSPCR_CCOND_MASK << DSPCR_CCOND_SHIFT) /* All internal state modified by signal_exception() that may need to be rolled back for passing moment-of-exception image back to gdb. */ unsigned_word exc_trigger_registers[LAST_EMBED_REGNUM + 1]; unsigned_word exc_suspend_registers[LAST_EMBED_REGNUM + 1]; int exc_suspended; #define SIM_CPU_EXCEPTION_TRIGGER(SD,CPU,CIA) mips_cpu_exception_trigger(SD,CPU,CIA) #define SIM_CPU_EXCEPTION_SUSPEND(SD,CPU,EXC) mips_cpu_exception_suspend(SD,CPU,EXC) #define SIM_CPU_EXCEPTION_RESUME(SD,CPU,EXC) mips_cpu_exception_resume(SD,CPU,EXC) unsigned_word c0_config_reg; #define C0_CONFIG ((CPU)->c0_config_reg) /* The following are pseudonyms for standard registers */ #define ZERO (REGISTERS[0]) #define V0 (REGISTERS[2]) #define A0 (REGISTERS[4]) #define A1 (REGISTERS[5]) #define A2 (REGISTERS[6]) #define A3 (REGISTERS[7]) #define T8IDX 24 #define T8 (REGISTERS[T8IDX]) #define SPIDX 29 #define SP (REGISTERS[SPIDX]) #define RAIDX 31 #define RA (REGISTERS[RAIDX]) /* While space is allocated in the main registers arrray for some of the COP0 registers, that space isn't sufficient. Unknown COP0 registers overflow into the array below */ #define NR_COP0_GPR 32 unsigned_word cop0_gpr[NR_COP0_GPR]; #define COP0_GPR ((CPU)->cop0_gpr) #define COP0_BADVADDR (COP0_GPR[8]) /* While space is allocated for the floating point registers in the main registers array, they are stored separatly. This is because their size may not necessarily match the size of either the general-purpose or system specific registers. */ #define NR_FGR (32) #define FGR_BASE FP0_REGNUM fp_word fgr[NR_FGR]; #define FGR ((CPU)->fgr) /* Keep the current format state for each register: */ FP_formats fpr_state[32]; #define FPR_STATE ((CPU)->fpr_state) pending_write_queue pending; /* The MDMX accumulator (used only for MDMX ASE). */ MDMX_accumulator acc; #define ACC ((CPU)->acc) /* LLBIT = Load-Linked bit. A bit of "virtual" state used by atomic read-write instructions. It is set when a linked load occurs. It is tested and cleared by the conditional store. It is cleared (during other CPU operations) when a store to the location would no longer be atomic. In particular, it is cleared by exception return instructions. */ int llbit; #define LLBIT ((CPU)->llbit) /* The HIHISTORY and LOHISTORY timestamps are used to ensure that corruptions caused by using the HI or LO register too close to a following operation is spotted. See mips.igen for more details. */ hilo_history hi_history; #define HIHISTORY (&(CPU)->hi_history) hilo_history lo_history; #define LOHISTORY (&(CPU)->lo_history) sim_cpu_base base; }; /* MIPS specific simulator watch config */ void watch_options_install PARAMS ((SIM_DESC sd)); struct swatch { sim_event *pc; sim_event *clock; sim_event *cycles; }; /* FIXME: At present much of the simulator is still static */ struct sim_state { struct swatch watch; sim_cpu cpu[MAX_NR_PROCESSORS]; #if (WITH_SMP) #define STATE_CPU(sd,n) (&(sd)->cpu[n]) #else #define STATE_CPU(sd,n) (&(sd)->cpu[0]) #endif sim_state_base base; }; /* Status information: */ /* TODO : these should be the bitmasks for these bits within the status register. At the moment the following are VR4300 bit-positions: */ #define status_KSU_mask (0x18) /* mask for KSU bits */ #define status_KSU_shift (3) /* shift for field */ #define ksu_kernel (0x0) #define ksu_supervisor (0x1) #define ksu_user (0x2) #define ksu_unknown (0x3) #define SR_KSU ((SR & status_KSU_mask) >> status_KSU_shift) #define status_IE (1 << 0) /* Interrupt enable */ #define status_EIE (1 << 16) /* Enable Interrupt Enable */ #define status_EXL (1 << 1) /* Exception level */ #define status_RE (1 << 25) /* Reverse Endian in user mode */ #define status_FR (1 << 26) /* enables MIPS III additional FP registers */ #define status_SR (1 << 20) /* soft reset or NMI */ #define status_BEV (1 << 22) /* Location of general exception vectors */ #define status_TS (1 << 21) /* TLB shutdown has occurred */ #define status_ERL (1 << 2) /* Error level */ #define status_IM7 (1 << 15) /* Timer Interrupt Mask */ #define status_RP (1 << 27) /* Reduced Power mode */ /* Specializations for TX39 family */ #define status_IEc (1 << 0) /* Interrupt enable (current) */ #define status_KUc (1 << 1) /* Kernel/User mode */ #define status_IEp (1 << 2) /* Interrupt enable (previous) */ #define status_KUp (1 << 3) /* Kernel/User mode */ #define status_IEo (1 << 4) /* Interrupt enable (old) */ #define status_KUo (1 << 5) /* Kernel/User mode */ #define status_IM_mask (0xff) /* Interrupt mask */ #define status_IM_shift (8) #define status_NMI (1 << 20) /* NMI */ #define status_NMI (1 << 20) /* NMI */ /* Status bits used by MIPS32/MIPS64. */ #define status_UX (1 << 5) /* 64-bit user addrs */ #define status_SX (1 << 6) /* 64-bit supervisor addrs */ #define status_KX (1 << 7) /* 64-bit kernel addrs */ #define status_TS (1 << 21) /* TLB shutdown has occurred */ #define status_PX (1 << 23) /* Enable 64 bit operations */ #define status_MX (1 << 24) /* Enable MDMX resources */ #define status_CU0 (1 << 28) /* Coprocessor 0 usable */ #define status_CU1 (1 << 29) /* Coprocessor 1 usable */ #define status_CU2 (1 << 30) /* Coprocessor 2 usable */ #define status_CU3 (1 << 31) /* Coprocessor 3 usable */ /* Bits reserved for implementations: */ #define status_SBX (1 << 16) /* Enable SiByte SB-1 extensions. */ #define cause_BD ((unsigned)1 << 31) /* L1 Exception in branch delay slot */ #define cause_BD2 (1 << 30) /* L2 Exception in branch delay slot */ #define cause_CE_mask 0x30000000 /* Coprocessor exception */ #define cause_CE_shift 28 #define cause_EXC2_mask 0x00070000 #define cause_EXC2_shift 16 #define cause_IP7 (1 << 15) /* Interrupt pending */ #define cause_SIOP (1 << 12) /* SIO pending */ #define cause_IP3 (1 << 11) /* Int 0 pending */ #define cause_IP2 (1 << 10) /* Int 1 pending */ #define cause_EXC_mask (0x1c) /* Exception code */ #define cause_EXC_shift (2) #define cause_SW0 (1 << 8) /* Software interrupt 0 */ #define cause_SW1 (1 << 9) /* Software interrupt 1 */ #define cause_IP_mask (0x3f) /* Interrupt pending field */ #define cause_IP_shift (10) #define cause_set_EXC(x) CAUSE = (CAUSE & ~cause_EXC_mask) | ((x << cause_EXC_shift) & cause_EXC_mask) #define cause_set_EXC2(x) CAUSE = (CAUSE & ~cause_EXC2_mask) | ((x << cause_EXC2_shift) & cause_EXC2_mask) /* NOTE: We keep the following status flags as bit values (1 for true, 0 for false). This allows them to be used in binary boolean operations without worrying about what exactly the non-zero true value is. */ /* UserMode */ #ifdef SUBTARGET_R3900 #define UserMode ((SR & status_KUc) ? 1 : 0) #else #define UserMode ((((SR & status_KSU_mask) >> status_KSU_shift) == ksu_user) ? 1 : 0) #endif /* SUBTARGET_R3900 */ /* BigEndianMem */ /* Hardware configuration. Affects endianness of LoadMemory and StoreMemory and the endianness of Kernel and Supervisor mode execution. The value is 0 for little-endian; 1 for big-endian. */ #define BigEndianMem (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) /*(state & simBE) ? 1 : 0)*/ /* ReverseEndian */ /* This mode is selected if in User mode with the RE bit being set in SR (Status Register). It reverses the endianness of load and store instructions. */ #define ReverseEndian (((SR & status_RE) && UserMode) ? 1 : 0) /* BigEndianCPU */ /* The endianness for load and store instructions (0=little;1=big). In User mode this endianness may be switched by setting the state_RE bit in the SR register. Thus, BigEndianCPU may be computed as (BigEndianMem EOR ReverseEndian). */ #define BigEndianCPU (BigEndianMem ^ ReverseEndian) /* Already bits */ /* Exceptions: */ /* NOTE: These numbers depend on the processor architecture being simulated: */ enum ExceptionCause { Interrupt = 0, TLBModification = 1, TLBLoad = 2, TLBStore = 3, AddressLoad = 4, AddressStore = 5, InstructionFetch = 6, DataReference = 7, SystemCall = 8, BreakPoint = 9, ReservedInstruction = 10, CoProcessorUnusable = 11, IntegerOverflow = 12, /* Arithmetic overflow (IDT monitor raises SIGFPE) */ Trap = 13, FPE = 15, DebugBreakPoint = 16, /* Impl. dep. in MIPS32/MIPS64. */ MDMX = 22, Watch = 23, MCheck = 24, CacheErr = 30, NMIReset = 31, /* Reserved in MIPS32/MIPS64. */ /* The following exception code is actually private to the simulator world. It is *NOT* a processor feature, and is used to signal run-time errors in the simulator. */ SimulatorFault = 0xFFFFFFFF }; #define TLB_REFILL (0) #define TLB_INVALID (1) /* The following break instructions are reserved for use by the simulator. The first is used to halt the simulation. The second is used by gdb for break-points. NOTE: Care must be taken, since this value may be used in later revisions of the MIPS ISA. */ #define HALT_INSTRUCTION_MASK (0x03FFFFC0) #define HALT_INSTRUCTION (0x03ff000d) #define HALT_INSTRUCTION2 (0x0000ffcd) #define BREAKPOINT_INSTRUCTION (0x0005000d) #define BREAKPOINT_INSTRUCTION2 (0x0000014d) void interrupt_event (SIM_DESC sd, void *data); void signal_exception (SIM_DESC sd, sim_cpu *cpu, address_word cia, int exception, ...); #define SignalException(exc,instruction) signal_exception (SD, CPU, cia, (exc), (instruction)) #define SignalExceptionInterrupt(level) signal_exception (SD, CPU, cia, Interrupt, level) #define SignalExceptionInstructionFetch() signal_exception (SD, CPU, cia, InstructionFetch) #define SignalExceptionAddressStore() signal_exception (SD, CPU, cia, AddressStore) #define SignalExceptionAddressLoad() signal_exception (SD, CPU, cia, AddressLoad) #define SignalExceptionDataReference() signal_exception (SD, CPU, cia, DataReference) #define SignalExceptionSimulatorFault(buf) signal_exception (SD, CPU, cia, SimulatorFault, buf) #define SignalExceptionFPE() signal_exception (SD, CPU, cia, FPE) #define SignalExceptionIntegerOverflow() signal_exception (SD, CPU, cia, IntegerOverflow) #define SignalExceptionCoProcessorUnusable(cop) signal_exception (SD, CPU, cia, CoProcessorUnusable) #define SignalExceptionNMIReset() signal_exception (SD, CPU, cia, NMIReset) #define SignalExceptionTLBRefillStore() signal_exception (SD, CPU, cia, TLBStore, TLB_REFILL) #define SignalExceptionTLBRefillLoad() signal_exception (SD, CPU, cia, TLBLoad, TLB_REFILL) #define SignalExceptionTLBInvalidStore() signal_exception (SD, CPU, cia, TLBStore, TLB_INVALID) #define SignalExceptionTLBInvalidLoad() signal_exception (SD, CPU, cia, TLBLoad, TLB_INVALID) #define SignalExceptionTLBModification() signal_exception (SD, CPU, cia, TLBModification) #define SignalExceptionMDMX() signal_exception (SD, CPU, cia, MDMX) #define SignalExceptionWatch() signal_exception (SD, CPU, cia, Watch) #define SignalExceptionMCheck() signal_exception (SD, CPU, cia, MCheck) #define SignalExceptionCacheErr() signal_exception (SD, CPU, cia, CacheErr) /* Co-processor accesses */ /* XXX FIXME: For now, assume that FPU (cp1) is always usable. */ #define COP_Usable(coproc_num) (coproc_num == 1) void cop_lw PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, unsigned int memword)); void cop_ld PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, uword64 memword)); unsigned int cop_sw PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg)); uword64 cop_sd PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg)); #define COP_LW(coproc_num,coproc_reg,memword) \ cop_lw (SD, CPU, cia, coproc_num, coproc_reg, memword) #define COP_LD(coproc_num,coproc_reg,memword) \ cop_ld (SD, CPU, cia, coproc_num, coproc_reg, memword) #define COP_SW(coproc_num,coproc_reg) \ cop_sw (SD, CPU, cia, coproc_num, coproc_reg) #define COP_SD(coproc_num,coproc_reg) \ cop_sd (SD, CPU, cia, coproc_num, coproc_reg) void decode_coproc PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, unsigned int instruction)); #define DecodeCoproc(instruction) \ decode_coproc (SD, CPU, cia, (instruction)) int sim_monitor (SIM_DESC sd, sim_cpu *cpu, address_word cia, unsigned int arg); /* FPR access. */ unsigned64 value_fpr (SIM_STATE, int fpr, FP_formats); #define ValueFPR(FPR,FMT) value_fpr (SIM_ARGS, (FPR), (FMT)) void store_fpr (SIM_STATE, int fpr, FP_formats fmt, unsigned64 value); #define StoreFPR(FPR,FMT,VALUE) store_fpr (SIM_ARGS, (FPR), (FMT), (VALUE)) unsigned64 ps_lower (SIM_STATE, unsigned64 op); #define PSLower(op) ps_lower (SIM_ARGS, op) unsigned64 ps_upper (SIM_STATE, unsigned64 op); #define PSUpper(op) ps_upper (SIM_ARGS, op) unsigned64 pack_ps (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats from); #define PackPS(op1,op2) pack_ps (SIM_ARGS, op1, op2, fmt_single) /* FCR access. */ unsigned_word value_fcr (SIM_STATE, int fcr); #define ValueFCR(FCR) value_fcr (SIM_ARGS, (FCR)) void store_fcr (SIM_STATE, int fcr, unsigned_word value); #define StoreFCR(FCR,VALUE) store_fcr (SIM_ARGS, (FCR), (VALUE)) void test_fcsr (SIM_STATE); #define TestFCSR() test_fcsr (SIM_ARGS) /* FPU operations. */ void fp_cmp (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt, int abs, int cond, int cc); #define Compare(op1,op2,fmt,cond,cc) fp_cmp(SIM_ARGS, op1, op2, fmt, 0, cond, cc) unsigned64 fp_abs (SIM_STATE, unsigned64 op, FP_formats fmt); #define AbsoluteValue(op,fmt) fp_abs(SIM_ARGS, op, fmt) unsigned64 fp_neg (SIM_STATE, unsigned64 op, FP_formats fmt); #define Negate(op,fmt) fp_neg(SIM_ARGS, op, fmt) unsigned64 fp_add (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt); #define Add(op1,op2,fmt) fp_add(SIM_ARGS, op1, op2, fmt) unsigned64 fp_sub (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt); #define Sub(op1,op2,fmt) fp_sub(SIM_ARGS, op1, op2, fmt) unsigned64 fp_mul (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt); #define Multiply(op1,op2,fmt) fp_mul(SIM_ARGS, op1, op2, fmt) unsigned64 fp_div (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt); #define Divide(op1,op2,fmt) fp_div(SIM_ARGS, op1, op2, fmt) unsigned64 fp_recip (SIM_STATE, unsigned64 op, FP_formats fmt); #define Recip(op,fmt) fp_recip(SIM_ARGS, op, fmt) unsigned64 fp_sqrt (SIM_STATE, unsigned64 op, FP_formats fmt); #define SquareRoot(op,fmt) fp_sqrt(SIM_ARGS, op, fmt) unsigned64 fp_rsqrt (SIM_STATE, unsigned64 op, FP_formats fmt); #define RSquareRoot(op,fmt) fp_rsqrt(SIM_ARGS, op, fmt) unsigned64 fp_madd (SIM_STATE, unsigned64 op1, unsigned64 op2, unsigned64 op3, FP_formats fmt); #define MultiplyAdd(op1,op2,op3,fmt) fp_madd(SIM_ARGS, op1, op2, op3, fmt) unsigned64 fp_msub (SIM_STATE, unsigned64 op1, unsigned64 op2, unsigned64 op3, FP_formats fmt); #define MultiplySub(op1,op2,op3,fmt) fp_msub(SIM_ARGS, op1, op2, op3, fmt) unsigned64 fp_nmadd (SIM_STATE, unsigned64 op1, unsigned64 op2, unsigned64 op3, FP_formats fmt); #define NegMultiplyAdd(op1,op2,op3,fmt) fp_nmadd(SIM_ARGS, op1, op2, op3, fmt) unsigned64 fp_nmsub (SIM_STATE, unsigned64 op1, unsigned64 op2, unsigned64 op3, FP_formats fmt); #define NegMultiplySub(op1,op2,op3,fmt) fp_nmsub(SIM_ARGS, op1, op2, op3, fmt) unsigned64 convert (SIM_STATE, int rm, unsigned64 op, FP_formats from, FP_formats to); #define Convert(rm,op,from,to) convert (SIM_ARGS, rm, op, from, to) unsigned64 convert_ps (SIM_STATE, int rm, unsigned64 op, FP_formats from, FP_formats to); #define ConvertPS(rm,op,from,to) convert_ps (SIM_ARGS, rm, op, from, to) /* MIPS-3D ASE operations. */ #define CompareAbs(op1,op2,fmt,cond,cc) \ fp_cmp(SIM_ARGS, op1, op2, fmt, 1, cond, cc) unsigned64 fp_add_r (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt); #define AddR(op1,op2,fmt) fp_add_r(SIM_ARGS, op1, op2, fmt) unsigned64 fp_mul_r (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt); #define MultiplyR(op1,op2,fmt) fp_mul_r(SIM_ARGS, op1, op2, fmt) unsigned64 fp_recip1 (SIM_STATE, unsigned64 op, FP_formats fmt); #define Recip1(op,fmt) fp_recip1(SIM_ARGS, op, fmt) unsigned64 fp_recip2 (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt); #define Recip2(op1,op2,fmt) fp_recip2(SIM_ARGS, op1, op2, fmt) unsigned64 fp_rsqrt1 (SIM_STATE, unsigned64 op, FP_formats fmt); #define RSquareRoot1(op,fmt) fp_rsqrt1(SIM_ARGS, op, fmt) unsigned64 fp_rsqrt2 (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt); #define RSquareRoot2(op1,op2,fmt) fp_rsqrt2(SIM_ARGS, op1, op2, fmt) /* MDMX access. */ typedef unsigned int MX_fmtsel; /* MDMX format select field (5 bits). */ #define ob_fmtsel(sel) (((sel)<<1)|0x0) #define qh_fmtsel(sel) (((sel)<<2)|0x1) #define fmt_mdmx fmt_uninterpreted #define MX_VECT_AND (0) #define MX_VECT_NOR (1) #define MX_VECT_OR (2) #define MX_VECT_XOR (3) #define MX_VECT_SLL (4) #define MX_VECT_SRL (5) #define MX_VECT_ADD (6) #define MX_VECT_SUB (7) #define MX_VECT_MIN (8) #define MX_VECT_MAX (9) #define MX_VECT_MUL (10) #define MX_VECT_MSGN (11) #define MX_VECT_SRA (12) #define MX_VECT_ABSD (13) /* SB-1 only. */ #define MX_VECT_AVG (14) /* SB-1 only. */ unsigned64 mdmx_cpr_op (SIM_STATE, int op, unsigned64 op1, int vt, MX_fmtsel fmtsel); #define MX_Add(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_ADD, op1, vt, fmtsel) #define MX_And(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_AND, op1, vt, fmtsel) #define MX_Max(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MAX, op1, vt, fmtsel) #define MX_Min(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MIN, op1, vt, fmtsel) #define MX_Msgn(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MSGN, op1, vt, fmtsel) #define MX_Mul(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MUL, op1, vt, fmtsel) #define MX_Nor(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_NOR, op1, vt, fmtsel) #define MX_Or(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_OR, op1, vt, fmtsel) #define MX_ShiftLeftLogical(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SLL, op1, vt, fmtsel) #define MX_ShiftRightArith(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SRA, op1, vt, fmtsel) #define MX_ShiftRightLogical(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SRL, op1, vt, fmtsel) #define MX_Sub(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SUB, op1, vt, fmtsel) #define MX_Xor(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_XOR, op1, vt, fmtsel) #define MX_AbsDiff(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_ABSD, op1, vt, fmtsel) #define MX_Avg(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_AVG, op1, vt, fmtsel) #define MX_C_EQ 0x1 #define MX_C_LT 0x4 void mdmx_cc_op (SIM_STATE, int cond, unsigned64 op1, int vt, MX_fmtsel fmtsel); #define MX_Comp(op1,cond,vt,fmtsel) mdmx_cc_op(SIM_ARGS, cond, op1, vt, fmtsel) unsigned64 mdmx_pick_op (SIM_STATE, int tf, unsigned64 op1, int vt, MX_fmtsel fmtsel); #define MX_Pick(tf,op1,vt,fmtsel) mdmx_pick_op(SIM_ARGS, tf, op1, vt, fmtsel) #define MX_VECT_ADDA (0) #define MX_VECT_ADDL (1) #define MX_VECT_MULA (2) #define MX_VECT_MULL (3) #define MX_VECT_MULS (4) #define MX_VECT_MULSL (5) #define MX_VECT_SUBA (6) #define MX_VECT_SUBL (7) #define MX_VECT_ABSDA (8) /* SB-1 only. */ void mdmx_acc_op (SIM_STATE, int op, unsigned64 op1, int vt, MX_fmtsel fmtsel); #define MX_AddA(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_ADDA, op1, vt, fmtsel) #define MX_AddL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_ADDL, op1, vt, fmtsel) #define MX_MulA(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULA, op1, vt, fmtsel) #define MX_MulL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULL, op1, vt, fmtsel) #define MX_MulS(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULS, op1, vt, fmtsel) #define MX_MulSL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULSL, op1, vt, fmtsel) #define MX_SubA(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_SUBA, op1, vt, fmtsel) #define MX_SubL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_SUBL, op1, vt, fmtsel) #define MX_AbsDiffC(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_ABSDA, op1, vt, fmtsel) #define MX_FMT_OB (0) #define MX_FMT_QH (1) /* The following codes chosen to indicate the units of shift. */ #define MX_RAC_L (0) #define MX_RAC_M (1) #define MX_RAC_H (2) unsigned64 mdmx_rac_op (SIM_STATE, int, int); #define MX_RAC(op,fmt) mdmx_rac_op(SIM_ARGS, op, fmt) void mdmx_wacl (SIM_STATE, int, unsigned64, unsigned64); #define MX_WACL(fmt,vs,vt) mdmx_wacl(SIM_ARGS, fmt, vs, vt) void mdmx_wach (SIM_STATE, int, unsigned64); #define MX_WACH(fmt,vs) mdmx_wach(SIM_ARGS, fmt, vs) #define MX_RND_AS (0) #define MX_RND_AU (1) #define MX_RND_ES (2) #define MX_RND_EU (3) #define MX_RND_ZS (4) #define MX_RND_ZU (5) unsigned64 mdmx_round_op (SIM_STATE, int, int, MX_fmtsel); #define MX_RNAS(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_AS, vt, fmt) #define MX_RNAU(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_AU, vt, fmt) #define MX_RNES(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_ES, vt, fmt) #define MX_RNEU(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_EU, vt, fmt) #define MX_RZS(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_ZS, vt, fmt) #define MX_RZU(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_ZU, vt, fmt) unsigned64 mdmx_shuffle (SIM_STATE, int, unsigned64, unsigned64); #define MX_SHFL(shop,op1,op2) mdmx_shuffle(SIM_ARGS, shop, op1, op2) /* Memory accesses */ /* The following are generic to all versions of the MIPS architecture to date: */ /* Memory Access Types (for CCA): */ #define Uncached (0) #define CachedNoncoherent (1) #define CachedCoherent (2) #define Cached (3) #define isINSTRUCTION (1 == 0) /* FALSE */ #define isDATA (1 == 1) /* TRUE */ #define isLOAD (1 == 0) /* FALSE */ #define isSTORE (1 == 1) /* TRUE */ #define isREAL (1 == 0) /* FALSE */ #define isRAW (1 == 1) /* TRUE */ /* The parameter HOST (isTARGET / isHOST) is ignored */ #define isTARGET (1 == 0) /* FALSE */ /* #define isHOST (1 == 1) TRUE */ /* The "AccessLength" specifications for Loads and Stores. NOTE: This is the number of bytes minus 1. */ #define AccessLength_BYTE (0) #define AccessLength_HALFWORD (1) #define AccessLength_TRIPLEBYTE (2) #define AccessLength_WORD (3) #define AccessLength_QUINTIBYTE (4) #define AccessLength_SEXTIBYTE (5) #define AccessLength_SEPTIBYTE (6) #define AccessLength_DOUBLEWORD (7) #define AccessLength_QUADWORD (15) #define LOADDRMASK (WITH_TARGET_WORD_BITSIZE == 64 \ ? AccessLength_DOUBLEWORD /*7*/ \ : AccessLength_WORD /*3*/) #define PSIZE (WITH_TARGET_ADDRESS_BITSIZE) INLINE_SIM_MAIN (int) address_translation PARAMS ((SIM_DESC sd, sim_cpu *, address_word cia, address_word vAddr, int IorD, int LorS, address_word *pAddr, int *CCA, int raw)); #define AddressTranslation(vAddr,IorD,LorS,pAddr,CCA,host,raw) \ address_translation (SD, CPU, cia, vAddr, IorD, LorS, pAddr, CCA, raw) INLINE_SIM_MAIN (void) load_memory PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, uword64* memvalp, uword64* memval1p, int CCA, unsigned int AccessLength, address_word pAddr, address_word vAddr, int IorD)); #define LoadMemory(memvalp,memval1p,CCA,AccessLength,pAddr,vAddr,IorD,raw) \ load_memory (SD, CPU, cia, memvalp, memval1p, CCA, AccessLength, pAddr, vAddr, IorD) INLINE_SIM_MAIN (void) store_memory PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int CCA, unsigned int AccessLength, uword64 MemElem, uword64 MemElem1, address_word pAddr, address_word vAddr)); #define StoreMemory(CCA,AccessLength,MemElem,MemElem1,pAddr,vAddr,raw) \ store_memory (SD, CPU, cia, CCA, AccessLength, MemElem, MemElem1, pAddr, vAddr) INLINE_SIM_MAIN (void) cache_op PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int op, address_word pAddr, address_word vAddr, unsigned int instruction)); #define CacheOp(op,pAddr,vAddr,instruction) \ cache_op (SD, CPU, cia, op, pAddr, vAddr, instruction) INLINE_SIM_MAIN (void) sync_operation PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int stype)); #define SyncOperation(stype) \ sync_operation (SD, CPU, cia, (stype)) INLINE_SIM_MAIN (void) prefetch PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int CCA, address_word pAddr, address_word vAddr, int DATA, int hint)); #define Prefetch(CCA,pAddr,vAddr,DATA,hint) \ prefetch (SD, CPU, cia, CCA, pAddr, vAddr, DATA, hint) void unpredictable_action (sim_cpu *cpu, address_word cia); #define NotWordValue(val) not_word_value (SD_, (val)) #define Unpredictable() unpredictable (SD_) #define UnpredictableResult() /* For now, do nothing. */ INLINE_SIM_MAIN (unsigned32) ifetch32 PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr)); #define IMEM32(CIA) ifetch32 (SD, CPU, (CIA), (CIA)) INLINE_SIM_MAIN (unsigned16) ifetch16 PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr)); #define IMEM16(CIA) ifetch16 (SD, CPU, (CIA), ((CIA) & ~1)) #define IMEM16_IMMED(CIA,NR) ifetch16 (SD, CPU, (CIA), ((CIA) & ~1) + 2 * (NR)) void dotrace PARAMS ((SIM_DESC sd, sim_cpu *cpu, FILE *tracefh, int type, SIM_ADDR address, int width, char *comment, ...)); extern FILE *tracefh; extern int DSPLO_REGNUM[4]; extern int DSPHI_REGNUM[4]; INLINE_SIM_MAIN (void) pending_tick PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia)); extern SIM_CORE_SIGNAL_FN mips_core_signal; char* pr_addr PARAMS ((SIM_ADDR addr)); char* pr_uword64 PARAMS ((uword64 addr)); #define GPR_CLEAR(N) do { GPR_SET((N),0); } while (0) void mips_cpu_exception_trigger(SIM_DESC sd, sim_cpu* cpu, address_word pc); void mips_cpu_exception_suspend(SIM_DESC sd, sim_cpu* cpu, int exception); void mips_cpu_exception_resume(SIM_DESC sd, sim_cpu* cpu, int exception); #ifdef MIPS_MACH_MULTI extern int mips_mach_multi(SIM_DESC sd); #define MIPS_MACH(SD) mips_mach_multi(SD) #else #define MIPS_MACH(SD) MIPS_MACH_DEFAULT #endif /* Macros for determining whether a MIPS IV or MIPS V part is subject to the hi/lo restrictions described in mips.igen. */ #define MIPS_MACH_HAS_MT_HILO_HAZARD(SD) \ (MIPS_MACH (SD) != bfd_mach_mips5500) #define MIPS_MACH_HAS_MULT_HILO_HAZARD(SD) \ (MIPS_MACH (SD) != bfd_mach_mips5500) #define MIPS_MACH_HAS_DIV_HILO_HAZARD(SD) \ (MIPS_MACH (SD) != bfd_mach_mips5500) #if H_REVEALS_MODULE_P (SIM_MAIN_INLINE) #include "sim-main.c" #endif #endif