CVS commit: src/tests/lib/libm
Module Name:src Committed By: maya Date: Thu Aug 25 00:32:31 UTC 2016 Modified Files: src/tests/lib/libm: t_ldexp.c Log Message: Add a failing case for t_ldexp ldexp(2.0, INT_MAX) should be HUGE_VAL, not 0 To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libm/t_ldexp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libm/t_ldexp.c diff -u src/tests/lib/libm/t_ldexp.c:1.15 src/tests/lib/libm/t_ldexp.c:1.16 --- src/tests/lib/libm/t_ldexp.c:1.15 Thu Aug 25 00:26:01 2016 +++ src/tests/lib/libm/t_ldexp.c Thu Aug 25 00:32:31 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ldexp.c,v 1.15 2016/08/25 00:26:01 maya Exp $ */ +/* $NetBSD: t_ldexp.c,v 1.16 2016/08/25 00:32:31 maya Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ldexp.c,v 1.15 2016/08/25 00:26:01 maya Exp $"); +__RCSID("$NetBSD: t_ldexp.c,v 1.16 2016/08/25 00:32:31 maya Exp $"); #include @@ -96,10 +96,12 @@ struct ldexp_test ldexp_overflow[] = { { 1.0, 1023, 1, "inf" }, { 1.0, -1022, 2046, "inf" }, { 1.0, 1025, SKIP, "inf" }, + { 2.0, INT_MAX,SKIP, "inf" }, { -1.0, 1024, SKIP, " -inf" }, { -1.0, 1023, 1, " -inf" }, { -1.0, -1022, 2046, " -inf" }, { -1.0, 1025, SKIP, " -inf" }, + { -2.0, INT_MAX,SKIP, " -inf" }, { 0, 0, 0, NULL } };
CVS commit: src/tests/lib/libm
Module Name:src Committed By: maya Date: Thu Aug 25 00:32:31 UTC 2016 Modified Files: src/tests/lib/libm: t_ldexp.c Log Message: Add a failing case for t_ldexp ldexp(2.0, INT_MAX) should be HUGE_VAL, not 0 To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libm/t_ldexp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: maya Date: Thu Aug 25 00:26:01 UTC 2016 Modified Files: src/tests/lib/libm: t_ldexp.c Log Message: don't skip the entire test iteration if exp2=SKIP, only the second application of the function this doesn't introduce new failures on amd64 To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libm/t_ldexp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: maya Date: Thu Aug 25 00:26:01 UTC 2016 Modified Files: src/tests/lib/libm: t_ldexp.c Log Message: don't skip the entire test iteration if exp2=SKIP, only the second application of the function this doesn't introduce new failures on amd64 To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libm/t_ldexp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libm/t_ldexp.c diff -u src/tests/lib/libm/t_ldexp.c:1.14 src/tests/lib/libm/t_ldexp.c:1.15 --- src/tests/lib/libm/t_ldexp.c:1.14 Tue Nov 4 00:20:19 2014 +++ src/tests/lib/libm/t_ldexp.c Thu Aug 25 00:26:01 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ldexp.c,v 1.14 2014/11/04 00:20:19 justin Exp $ */ +/* $NetBSD: t_ldexp.c,v 1.15 2016/08/25 00:26:01 maya Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ldexp.c,v 1.14 2014/11/04 00:20:19 justin Exp $"); +__RCSID("$NetBSD: t_ldexp.c,v 1.15 2016/08/25 00:26:01 maya Exp $"); #include @@ -170,10 +170,8 @@ run_test(struct ldexp_test *table) v = ldexp(table->x, table->exp1); - if (table->exp2 == SKIP) - continue; - - v = ldexp(v, table->exp2); + if (table->exp2 != SKIP) + v = ldexp(v, table->exp2); (void)snprintf(outbuf, sizeof(outbuf), FORMAT, v);
Re: CVS commit: src/sys/ufs/ext2fs
On Tue, Aug 23, 2016 at 02:24:30AM -0400, Christos Zoulas wrote: > Modified Files: > src/sys/ufs/ext2fs: ext2fs_vfsops.c > > Log Message: > CID 1371644: use strlcpy, remove dup copy. You sure about the dup copy? Those are different string buffers. -- David A. Holland dholl...@netbsd.org
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: szptvlfn Date: Wed Aug 24 22:50:57 UTC 2016 Modified Files: src/distrib/sets/lists/etc: mi src/distrib/sets/lists/man: mi Log Message: fix the build ( MKUNBOUND=no ). To generate a diff of this commit: cvs rdiff -u -r1.241 -r1.242 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.1532 -r1.1533 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/etc/mi diff -u src/distrib/sets/lists/etc/mi:1.241 src/distrib/sets/lists/etc/mi:1.242 --- src/distrib/sets/lists/etc/mi:1.241 Tue Aug 23 09:11:06 2016 +++ src/distrib/sets/lists/etc/mi Wed Aug 24 22:50:57 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.241 2016/08/23 09:11:06 christos Exp $ +# $NetBSD: mi,v 1.242 2016/08/24 22:50:57 szptvlfn Exp $ # # Note: end-user configuration files that are moved to another location # should not be marked "obsolete"; they should just be removed from @@ -292,7 +292,7 @@ ./etc/rc.d/timedetc-timed-rc ./etc/rc.d/tpctletc-sys-rc ./etc/rc.d/ttys etc-sys-rc -./etc/rc.d/unboundetc-net-rc +./etc/rc.d/unboundetc-net-rc unbound ./etc/rc.d/veriexecetc-sys-rc ./etc/rc.d/virecoveretc-sys-rc ./etc/rc.d/wdogctletc-sysutil-rc @@ -338,7 +338,7 @@ ./etc/sysctl.confetc-sys-etc ./etc/syslog.confetc-sys-etc ./etc/ttys etc-sys-etc -./etc/unbound/unbound.conf etc-netutil-etc +./etc/unbound/unbound.conf etc-netutil-etc unbound ./etc/weekly etc-sys-etc ./etc/weekly.confetc-sys-etc ./etc/wscons.confetc-sys-etc Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1532 src/distrib/sets/lists/man/mi:1.1533 --- src/distrib/sets/lists/man/mi:1.1532 Sat Aug 20 11:34:50 2016 +++ src/distrib/sets/lists/man/mi Wed Aug 24 22:50:57 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1532 2016/08/20 11:34:50 christos Exp $ +# $NetBSD: mi,v 1.1533 2016/08/24 22:50:57 szptvlfn Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -9036,7 +9036,7 @@ ./usr/share/man/man8/unbound-anchor.8 man-netutil-man .man,crypto,unbound ./usr/share/man/man8/unbound-checkconf.8 man-netutil-man .man,crypto,unbound ./usr/share/man/man8/unbound-control.8 man-netutil-man .man,crypto,unbound -./usr/share/man/man8/unbound.8 +./usr/share/man/man8/unbound.8man-netutil-man .man,crypto,unbound ./usr/share/man/man8/unlink.8 man-sysutil-man .man ./usr/share/man/man8/update.8 man-obsolete obsolete ./usr/share/man/man8/usbd.8 man-obsolete obsolete
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: szptvlfn Date: Wed Aug 24 22:50:57 UTC 2016 Modified Files: src/distrib/sets/lists/etc: mi src/distrib/sets/lists/man: mi Log Message: fix the build ( MKUNBOUND=no ). To generate a diff of this commit: cvs rdiff -u -r1.241 -r1.242 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.1532 -r1.1533 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: macallan Date: Wed Aug 24 14:41:51 UTC 2016 Modified Files: src/sys/arch/macppc/dev: awacs.c Log Message: don't grab the interrupt lock around mixer operations To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/macppc/dev/awacs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: macallan Date: Wed Aug 24 14:41:51 UTC 2016 Modified Files: src/sys/arch/macppc/dev: awacs.c Log Message: don't grab the interrupt lock around mixer operations To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/macppc/dev/awacs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/dev/awacs.c diff -u src/sys/arch/macppc/dev/awacs.c:1.44 src/sys/arch/macppc/dev/awacs.c:1.45 --- src/sys/arch/macppc/dev/awacs.c:1.44 Fri Jul 15 22:10:47 2016 +++ src/sys/arch/macppc/dev/awacs.c Wed Aug 24 14:41:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: awacs.c,v 1.44 2016/07/15 22:10:47 macallan Exp $ */ +/* $NetBSD: awacs.c,v 1.45 2016/08/24 14:41:51 macallan Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.44 2016/07/15 22:10:47 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.45 2016/08/24 14:41:51 macallan Exp $"); #include #include @@ -583,13 +583,11 @@ awacs_setup_sgsmix(device_t cookie) sc->sc_codecctl1 &= ~AWACS_MUTE_HEADPHONE; awacs_write_codec(sc, sc->sc_codecctl1); - mutex_enter(>sc_intr_lock); awacs_select_output(sc, sc->sc_output_mask); awacs_set_volume(sc, sc->vol_l, sc->vol_r); awacs_set_bass(sc, 128); awacs_set_treble(sc, 128); cv_signal(>sc_event); - mutex_exit(>sc_intr_lock); #endif return 0; } @@ -855,15 +853,11 @@ awacs_set_port(void *h, mixer_ctrl_t *mc /* No change necessary? */ if (mc->un.mask == sc->sc_output_mask) return 0; - mutex_enter(>sc_intr_lock); awacs_select_output(sc, mc->un.mask); - mutex_exit(>sc_intr_lock); return 0; case AWACS_VOL_MASTER: - mutex_enter(>sc_intr_lock); awacs_set_volume(sc, l, r); - mutex_exit(>sc_intr_lock); return 0; case AWACS_INPUT_SELECT: @@ -904,15 +898,11 @@ awacs_set_port(void *h, mixer_ctrl_t *mc #if NSGSMIX > 0 case AWACS_BASS: - mutex_enter(>sc_intr_lock); awacs_set_bass(sc, l); - mutex_exit(>sc_intr_lock); return 0; case AWACS_TREBLE: - mutex_enter(>sc_intr_lock); awacs_set_treble(sc, l); - mutex_exit(>sc_intr_lock); return 0; #endif }
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Wed Aug 24 13:10:59 UTC 2016 Modified Files: src/lib/libedit: readline.c src/lib/libedit/readline: readline.h Log Message: more compatible with readline history functions. To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/lib/libedit/readline.c cvs rdiff -u -r1.39 -r1.40 src/lib/libedit/readline/readline.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Wed Aug 24 13:10:59 UTC 2016 Modified Files: src/lib/libedit: readline.c src/lib/libedit/readline: readline.h Log Message: more compatible with readline history functions. To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/lib/libedit/readline.c cvs rdiff -u -r1.39 -r1.40 src/lib/libedit/readline/readline.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libedit/readline.c diff -u src/lib/libedit/readline.c:1.136 src/lib/libedit/readline.c:1.137 --- src/lib/libedit/readline.c:1.136 Thu Jun 2 17:40:51 2016 +++ src/lib/libedit/readline.c Wed Aug 24 09:10:59 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: readline.c,v 1.136 2016/06/02 21:40:51 christos Exp $ */ +/* $NetBSD: readline.c,v 1.137 2016/08/24 13:10:59 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: readline.c,v 1.136 2016/06/02 21:40:51 christos Exp $"); +__RCSID("$NetBSD: readline.c,v 1.137 2016/08/24 13:10:59 christos Exp $"); #endif /* not lint && not SCCSID */ #include @@ -95,6 +95,7 @@ int rl_catch_sigwinch = 1; int history_base = 1; /* probably never subject to change */ int history_length = 0; +int history_offset = 0; int max_input_history = 0; char history_expansion_char = '!'; char history_subst_char = '^'; @@ -156,14 +157,6 @@ char *rl_special_prefixes = NULL; */ int rl_completion_append_character = ' '; -/* - * When the history cursor is on the newest element and next_history() - * is called, GNU readline moves the cursor beyond the newest element. - * The editline library does not provide data structures to express - * that state, so we need a local flag. - */ -static int current_history_valid = 1; - /* stuff below is used internally by libedit for readline emulation */ static History *h = NULL; @@ -176,7 +169,6 @@ static unsigned char _el_rl_complete(Ed static unsigned char _el_rl_tstp(EditLine *, int); static char *_get_prompt(EditLine *); static int _getc_function(EditLine *, wchar_t *); -static HIST_ENTRY *_move_history(int); static int _history_expand_command(const char *, size_t, size_t, char **); static char *_rl_compat_sub(const char *, const char *, @@ -184,6 +176,7 @@ static char *_rl_compat_sub(const char static int _rl_event_read_char(EditLine *, wchar_t *); static void _rl_update_pos(void); +static HIST_ENTRY rl_he; /* ARGSUSED */ static char * @@ -195,25 +188,6 @@ _get_prompt(EditLine *el __attribute__(( /* - * generic function for moving around history - */ -static HIST_ENTRY * -_move_history(int op) -{ - HistEvent ev; - static HIST_ENTRY rl_he; - - if (history(h, , op) != 0) - return NULL; - - rl_he.line = ev.str; - rl_he.data = NULL; - - return _he; -} - - -/* * read one key from user defined input function */ static int @@ -299,8 +273,6 @@ rl_initialize(void) int editmode = 1; struct termios t; - current_history_valid = 1; - if (e != NULL) el_end(e); if (h != NULL) @@ -399,7 +371,7 @@ rl_initialize(void) el_set(e, EL_BIND, "\\e[1;5C", "em-next-word", NULL); el_set(e, EL_BIND, "\\e[1;5D", "ed-prev-word", NULL); el_set(e, EL_BIND, "\\e[5C", "em-next-word", NULL); - el_set(e, EL_BIND, "\\e[5D", "ed-prev-word", NULL); + el_set(e, EL_BIND, "\\e[5D", "ed-erev-word", NULL); el_set(e, EL_BIND, "\\e\\e[C", "em-next-word", NULL); el_set(e, EL_BIND, "\\e\\e[D", "ed-prev-word", NULL); @@ -494,6 +466,7 @@ using_history(void) { if (h == NULL || e == NULL) rl_initialize(); + history_offset = history_length; } @@ -575,7 +548,7 @@ get_history_event(const char *cmd, int * } if ('0' <= cmd[idx] && cmd[idx] <= '9') { - HIST_ENTRY *rl_he; + HIST_ENTRY *he; num = 0; while (cmd[idx] && '0' <= cmd[idx] && cmd[idx] <= '9') { @@ -585,11 +558,11 @@ get_history_event(const char *cmd, int * if (sign) num = history_length - num + 1; - if (!(rl_he = history_get(num))) + if (!(he = history_get(num))) return NULL; *cindex = idx; - return rl_he->line; + return he->line; } sub = 0; if (cmd[idx] == '?') { @@ -1461,7 +1434,6 @@ add_history(const char *line) history_base++; else history_length = ev.num; - current_history_valid = 1; return 0; } @@ -1552,8 +1524,7 @@ clear_history(void) rl_initialize(); (void)history(h, , H_CLEAR); - history_length = 0; - current_history_valid = 1; + history_offset = history_length = 0; } @@ -1563,24 +1534,42 @@ clear_history(void) int where_history(void) { - HistEvent ev; - int curr_num, off; + return history_offset; +} - if (history(h, , H_CURR) != 0) - return 0; - curr_num = ev.num; +static HIST_ENTRY **_history_listp; +static HIST_ENTRY *_history_list; - /* start from the oldest */ - (void)history(h, , H_LAST); +HIST_ENTRY **
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: nonaka Date: Wed Aug 24 10:27:23 UTC 2016 Modified Files: src/sys/arch/x86/x86: efi.c Log Message: fix incorrect check in efi_getcfgtblhead(). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/efi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/efi.c diff -u src/sys/arch/x86/x86/efi.c:1.3 src/sys/arch/x86/x86/efi.c:1.4 --- src/sys/arch/x86/x86/efi.c:1.3 Fri Jun 10 07:50:15 2016 +++ src/sys/arch/x86/x86/efi.c Wed Aug 24 10:27:23 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: efi.c,v 1.3 2016/06/10 07:50:15 pgoyette Exp $ */ +/* $NetBSD: efi.c,v 1.4 2016/08/24 10:27:23 nonaka Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.3 2016/06/10 07:50:15 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.4 2016/08/24 10:27:23 nonaka Exp $"); #include #include #include @@ -147,8 +147,8 @@ efi_getcfgtblhead(void) paddr_t pa; vaddr_t va; - if (efi_cfgtblhead_va == NULL) - return NULL; + if (efi_cfgtblhead_va != NULL) + return efi_cfgtblhead_va; pa = (paddr_t) efi_systbl_va->st_cfgtbl; aprint_debug("efi: cfgtbl at pa %" PRIxPADDR "\n", pa);
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: nonaka Date: Wed Aug 24 10:27:23 UTC 2016 Modified Files: src/sys/arch/x86/x86: efi.c Log Message: fix incorrect check in efi_getcfgtblhead(). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/efi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: christos Date: Wed Aug 24 10:04:53 UTC 2016 Modified Files: src/tests/lib/libm: t_ilogb.c Log Message: fix test; clearing the exception does not return the old exception bitmask. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libm/t_ilogb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: christos Date: Wed Aug 24 10:04:53 UTC 2016 Modified Files: src/tests/lib/libm: t_ilogb.c Log Message: fix test; clearing the exception does not return the old exception bitmask. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libm/t_ilogb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libm/t_ilogb.c diff -u src/tests/lib/libm/t_ilogb.c:1.4 src/tests/lib/libm/t_ilogb.c:1.5 --- src/tests/lib/libm/t_ilogb.c:1.4 Wed Aug 24 05:13:44 2016 +++ src/tests/lib/libm/t_ilogb.c Wed Aug 24 06:04:53 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ilogb.c,v 1.4 2016/08/24 09:13:44 christos Exp $ */ +/* $NetBSD: t_ilogb.c,v 1.5 2016/08/24 10:04:53 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -40,15 +40,15 @@ #else # define ATF_CHECK_RAISED_INVALID do { \ - int r; \ - r = feclearexcept(FE_ALL_EXCEPT); \ - ATF_CHECK(r == FE_INVALID); \ + int r = fetestexcept(FE_ALL_EXCEPT); \ + ATF_CHECK_MSG(r == FE_INVALID, "r=%#x != %#x\n", r, FE_INVALID); \ + (void)feclearexcept(FE_ALL_EXCEPT); \ } while (/*CONSTCOND*/0) # define ATF_CHECK_RAISED_NOTHING do { \ - int r; \ - r = feclearexcept(FE_ALL_EXCEPT); \ - ATF_CHECK(r == 0); \ + int r = fetestexcept(FE_ALL_EXCEPT); \ + ATF_CHECK_MSG(r == 0, "r=%#x != 0\n", r); \ + (void)feclearexcept(FE_ALL_EXCEPT); \ } while (/*CONSTCOND*/0) #endif @@ -60,7 +60,6 @@ ATF_TC_HEAD(ilogb, tc) ATF_TC_BODY(ilogb, tc) { - atf_tc_expect_fail("PR lib/51427"); ATF_CHECK(ilogbf(0) == FP_ILOGB0); ATF_CHECK_RAISED_INVALID;
CVS commit: src/lib/libm
Module Name:src Committed By: christos Date: Wed Aug 24 10:03:32 UTC 2016 Modified Files: src/lib/libm: Makefile src/lib/libm/src: s_ilogb.c s_ilogbf.c s_ilogbl.c Log Message: fix ilogb* To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/lib/libm/Makefile cvs rdiff -u -r1.14 -r1.15 src/lib/libm/src/s_ilogb.c cvs rdiff -u -r1.8 -r1.9 src/lib/libm/src/s_ilogbf.c cvs rdiff -u -r1.2 -r1.3 src/lib/libm/src/s_ilogbl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/Makefile diff -u src/lib/libm/Makefile:1.179 src/lib/libm/Makefile:1.180 --- src/lib/libm/Makefile:1.179 Wed Aug 24 05:10:57 2016 +++ src/lib/libm/Makefile Wed Aug 24 06:03:32 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.179 2016/08/24 09:10:57 christos Exp $ +# $NetBSD: Makefile,v 1.180 2016/08/24 10:03:32 christos Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -113,12 +113,14 @@ ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_remainderf.S e_scalb.S e_scalbf.S e_sqrt.S e_sqrtf.S s_atan.S \ s_atanf.S s_ceil.S s_ceilf.S s_copysign.S s_copysignf.S s_cos.S \ s_cosf.S s_finite.S s_finitef.S s_floor.S s_floorf.S \ - s_ilogb.S s_ilogbf.S s_ilogbl.S s_log1p.S s_log1pf.S \ - s_logb.S s_logbf.S s_logbl.S \ + s_log1p.S s_log1pf.S s_logb.S s_logbf.S s_logbl.S \ s_rint.S s_rintf.S s_scalbn.S s_scalbnf.S s_significand.S \ s_significandf.S s_sin.S s_sinf.S s_tan.S s_tanf.S lrint.S -# do not pick up the i387 asm version, it is incorrect -s_modf.o s_modf.pico s_modf.po s_modf.d: s_modf.c +# do not pick up the i387 asm version for the following functions; +# it is incorrect +.for f in modf ilogb ilogbl ilogbf +s_${f}.o s_${f}.pico s_${f}.po s_${f}.d: s_${f}.c +.endfor .if (${MACHINE_ARCH} == "i386") SUBDIR=arch/i387 Index: src/lib/libm/src/s_ilogb.c diff -u src/lib/libm/src/s_ilogb.c:1.14 src/lib/libm/src/s_ilogb.c:1.15 --- src/lib/libm/src/s_ilogb.c:1.14 Sat Feb 9 17:56:00 2013 +++ src/lib/libm/src/s_ilogb.c Wed Aug 24 06:03:32 2016 @@ -12,7 +12,7 @@ #include #if defined(LIBM_SCCS) && !defined(lint) -__RCSID("$NetBSD: s_ilogb.c,v 1.14 2013/02/09 22:56:00 matt Exp $"); +__RCSID("$NetBSD: s_ilogb.c,v 1.15 2016/08/24 10:03:32 christos Exp $"); #endif /* ilogb(double x) @@ -21,7 +21,8 @@ __RCSID("$NetBSD: s_ilogb.c,v 1.14 2013/ * ilogb(inf/NaN) = 0x7fff (no signal is raised) */ -#include "math.h" +#include +#include #include "math_private.h" #ifndef __HAVE_LONG_DOUBLE @@ -31,22 +32,28 @@ __strong_alias(ilogbl,ilogb) int ilogb(double x) { - int32_t hx,lx,ix; + int32_t hx, lx, ix; - GET_HIGH_WORD(hx,x); + GET_HIGH_WORD(hx, x); hx &= 0x7fff; - if(hx<0x0010) { - GET_LOW_WORD(lx,x); - if((hx|lx)==0) - return FP_ILOGB0; /* ilogb(0) = 0x8001 */ - else /* subnormal x */ - if(hx==0) { - for (ix = -1043; lx>0; lx<<=1) ix -=1; + if (hx < 0x0010) { + GET_LOW_WORD(lx, x); + if ((hx | lx) == 0) { + feraiseexcept(FE_INVALID); + return FP_ILOGB0; /* ilogb(0) = 0x8001 */ + } + if (hx == 0) { + for (ix = -1043; lx > 0; lx <<= 1) ix -= 1; } else { - for (ix = -1022,hx<<=11; hx>0; hx<<=1) ix -=1; + for (ix = -1022, hx <<= 11; hx > 0; hx <<= 1) ix -= 1; } - return ix; + return ix; + } + + if (hx < 0x7ff0) { + return (hx >> 20) - 1023; } - else if (hx<0x7ff0) return (hx>>20)-1023; - else return FP_ILOGBNAN; /* inf too */ + + feraiseexcept(FE_INVALID); + return isnan(x) ? FP_ILOGBNAN : INT_MAX; } Index: src/lib/libm/src/s_ilogbf.c diff -u src/lib/libm/src/s_ilogbf.c:1.8 src/lib/libm/src/s_ilogbf.c:1.9 --- src/lib/libm/src/s_ilogbf.c:1.8 Sat Feb 9 17:56:00 2013 +++ src/lib/libm/src/s_ilogbf.c Wed Aug 24 06:03:32 2016 @@ -15,26 +15,33 @@ #include #if defined(LIBM_SCCS) && !defined(lint) -__RCSID("$NetBSD: s_ilogbf.c,v 1.8 2013/02/09 22:56:00 matt Exp $"); +__RCSID("$NetBSD: s_ilogbf.c,v 1.9 2016/08/24 10:03:32 christos Exp $"); #endif -#include "math.h" +#include +#include #include "math_private.h" int ilogbf(float x) { - int32_t hx,ix; + int32_t hx, ix; - GET_FLOAT_WORD(hx,x); + GET_FLOAT_WORD(hx, x); hx &= 0x7fff; - if(hx<0x0080) { - if(hx==0) - return FP_ILOGB0; /* ilogb(0) = 0x8001 */ - else /* subnormal x */ - for (ix = -126,hx<<=8; hx>0; hx<<=1) ix -=1; - return ix; + if (hx < 0x0080) { + if (hx == 0) { + feraiseexcept(FE_INVALID); + return FP_ILOGB0; /* ilogb(0) = 0x8001 */ + } + for (ix = -126, hx <<= 8; hx > 0; hx <<= 1) ix -= 1; + return ix; } - else if (hx<0x7f80) return (hx>>23)-127; - else return FP_ILOGBNAN; /* inf too */ + + if (hx < 0x7f80) { + return (hx >> 23) - 127; + } + + feraiseexcept(FE_INVALID); + return isnan(x) ? FP_ILOGBNAN : INT_MAX; } Index: src/lib/libm/src/s_ilogbl.c diff -u src/lib/libm/src/s_ilogbl.c:1.2 src/lib/libm/src/s_ilogbl.c:1.3 ---
CVS commit: src/lib/libm
Module Name:src Committed By: christos Date: Wed Aug 24 10:03:32 UTC 2016 Modified Files: src/lib/libm: Makefile src/lib/libm/src: s_ilogb.c s_ilogbf.c s_ilogbl.c Log Message: fix ilogb* To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/lib/libm/Makefile cvs rdiff -u -r1.14 -r1.15 src/lib/libm/src/s_ilogb.c cvs rdiff -u -r1.8 -r1.9 src/lib/libm/src/s_ilogbf.c cvs rdiff -u -r1.2 -r1.3 src/lib/libm/src/s_ilogbl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: christos Date: Wed Aug 24 09:13:44 UTC 2016 Modified Files: src/tests/lib/libm: t_ilogb.c Log Message: fix long double To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libm/t_ilogb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: christos Date: Wed Aug 24 09:13:44 UTC 2016 Modified Files: src/tests/lib/libm: t_ilogb.c Log Message: fix long double To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libm/t_ilogb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libm/t_ilogb.c diff -u src/tests/lib/libm/t_ilogb.c:1.3 src/tests/lib/libm/t_ilogb.c:1.4 --- src/tests/lib/libm/t_ilogb.c:1.3 Tue Aug 23 06:03:44 2016 +++ src/tests/lib/libm/t_ilogb.c Wed Aug 24 05:13:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ilogb.c,v 1.3 2016/08/23 10:03:44 christos Exp $ */ +/* $NetBSD: t_ilogb.c,v 1.4 2016/08/24 09:13:44 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -73,38 +73,48 @@ ATF_TC_BODY(ilogb, tc) ATF_CHECK_RAISED_INVALID; ATF_CHECK(ilogb(-0) == FP_ILOGB0); ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE ATF_CHECK(ilogbl(-0) == FP_ILOGB0); ATF_CHECK_RAISED_INVALID; +#endif ATF_CHECK(ilogbf(INFINITY) == INT_MAX); ATF_CHECK_RAISED_INVALID; ATF_CHECK(ilogb(INFINITY) == INT_MAX); ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE ATF_CHECK(ilogbl(INFINITY) == INT_MAX); ATF_CHECK_RAISED_INVALID; +#endif ATF_CHECK(ilogbf(-INFINITY) == INT_MAX); ATF_CHECK_RAISED_INVALID; ATF_CHECK(ilogb(-INFINITY) == INT_MAX); ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE ATF_CHECK(ilogbl(-INFINITY) == INT_MAX); ATF_CHECK_RAISED_INVALID; +#endif ATF_CHECK(ilogbf(1024) == 10); ATF_CHECK_RAISED_NOTHING; ATF_CHECK(ilogb(1024) == 10); ATF_CHECK_RAISED_NOTHING; +#ifdef __HAVE_LONG_DOUBLE ATF_CHECK(ilogbl(1024) == 10); ATF_CHECK_RAISED_NOTHING; +#endif #ifndef __vax__ ATF_CHECK(ilogbf(NAN) == FP_ILOGBNAN); ATF_CHECK_RAISED_INVALID; ATF_CHECK(ilogb(NAN) == FP_ILOGBNAN); ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE ATF_CHECK(ilogbl(NAN) == FP_ILOGBNAN); ATF_CHECK_RAISED_INVALID; #endif +#endif } ATF_TP_ADD_TCS(tp)
CVS commit: src/lib/libm
Module Name:src Committed By: christos Date: Wed Aug 24 09:10:57 UTC 2016 Modified Files: src/lib/libm: Makefile Log Message: add ilogb. To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/lib/libm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/Makefile diff -u src/lib/libm/Makefile:1.178 src/lib/libm/Makefile:1.179 --- src/lib/libm/Makefile:1.178 Tue Aug 23 06:00:15 2016 +++ src/lib/libm/Makefile Wed Aug 24 05:10:57 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.178 2016/08/23 10:00:15 christos Exp $ +# $NetBSD: Makefile,v 1.179 2016/08/24 09:10:57 christos Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -248,7 +248,7 @@ COPTS.compat_cabsf.c= ${${ACTIVE_CC} == # math routines for non-IEEE architectures. NOIEEE_SRCS = n_asincos.c n_acosh.c n_asinh.c n_atan.c n_atanh.c n_cosh.c \ n_erf.c n_exp.c n_exp2.c n_exp2f.c n_exp__E.c n_expm1.c n_floor.c \ - n_fmod.c n_gamma.c \ + n_fmod.c n_gamma.c n_ilogb.c \ n_lgamma.c n_j0.c n_j1.c n_jn.c n_log.c n_log10.c n_log1p.c \ n_log2.c n_log__L.c n_pow.c n_sinh.c n_tanh.c \ n_sincos.c n_tan.c \
CVS commit: src/lib/libm
Module Name:src Committed By: christos Date: Wed Aug 24 09:10:57 UTC 2016 Modified Files: src/lib/libm: Makefile Log Message: add ilogb. To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/lib/libm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libm/noieee_src
Module Name:src Committed By: christos Date: Wed Aug 24 09:08:50 UTC 2016 Added Files: src/lib/libm/noieee_src: n_ilogb.c Log Message: ilogb for the vax To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libm/noieee_src/n_ilogb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libm/noieee_src
Module Name:src Committed By: christos Date: Wed Aug 24 09:08:50 UTC 2016 Added Files: src/lib/libm/noieee_src: n_ilogb.c Log Message: ilogb for the vax To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libm/noieee_src/n_ilogb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libm/noieee_src/n_ilogb.c diff -u /dev/null src/lib/libm/noieee_src/n_ilogb.c:1.1 --- /dev/null Wed Aug 24 05:08:50 2016 +++ src/lib/libm/noieee_src/n_ilogb.c Wed Aug 24 05:08:50 2016 @@ -0,0 +1,54 @@ +/* $NetBSD: n_ilogb.c,v 1.1 2016/08/24 09:08:50 christos Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include +#if defined(LIBM_SCCS) && !defined(lint) +__RCSID("$NetBSD: n_ilogb.c,v 1.1 2016/08/24 09:08:50 christos Exp $"); +#endif + +#include "math.h" + +int +ilogb(double x) +{ + if (x == 0) + return FP_ILOGB0; + if (x != x) + return FP_ILOGBNAN; + if (!finite(x)) + return INT_MAX; + return (int)logb(x); +} + +int +ilogbf(float x) +{ + return ilogb(x); +}
CVS commit: src/sbin/resize_ffs
Module Name:src Committed By: dholland Date: Wed Aug 24 07:44:05 UTC 2016 Modified Files: src/sbin/resize_ffs: resize_ffs.c Log Message: Fix handling of ffsv2 inode initialization. Retires PR 51116. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sbin/resize_ffs/resize_ffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/resize_ffs
Module Name:src Committed By: dholland Date: Wed Aug 24 07:44:05 UTC 2016 Modified Files: src/sbin/resize_ffs: resize_ffs.c Log Message: Fix handling of ffsv2 inode initialization. Retires PR 51116. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sbin/resize_ffs/resize_ffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/resize_ffs/resize_ffs.c diff -u src/sbin/resize_ffs/resize_ffs.c:1.46 src/sbin/resize_ffs/resize_ffs.c:1.47 --- src/sbin/resize_ffs/resize_ffs.c:1.46 Thu Mar 17 01:41:54 2016 +++ src/sbin/resize_ffs/resize_ffs.c Wed Aug 24 07:44:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: resize_ffs.c,v 1.46 2016/03/17 01:41:54 christos Exp $ */ +/* $NetBSD: resize_ffs.c,v 1.47 2016/08/24 07:44:05 dholland Exp $ */ /* From sources sent on February 17, 2003 */ /*- * As its sole author, I explicitly place this code in the public @@ -36,7 +36,7 @@ */ #include -__RCSID("$NetBSD: resize_ffs.c,v 1.46 2016/03/17 01:41:54 christos Exp $"); +__RCSID("$NetBSD: resize_ffs.c,v 1.47 2016/08/24 07:44:05 dholland Exp $"); #include #include @@ -105,7 +105,8 @@ union dinode { } while (0) /* a cg's worth of brand new squeaky-clean inodes */ -static struct ufs1_dinode *zinodes; +static struct ufs1_dinode *zinodes1; +static struct ufs2_dinode *zinodes2; /* pointers to the in-core cgs, read off disk and possibly modified */ static struct cg **cgs; @@ -615,10 +616,15 @@ initcg(int cgn) newsb->fs_cstotal.cs_nffree += cg->cg_cs.cs_nffree; newsb->fs_cstotal.cs_nbfree += cg->cg_cs.cs_nbfree; newsb->fs_cstotal.cs_nifree += cg->cg_cs.cs_nifree; - if (is_ufs2 == 0) + if (is_ufs2) { + /* Write out the cleared inodes. */ + writeat(FFS_FSBTODB(newsb, cgimin(newsb, cgn)), zinodes2, + cg->cg_initediblk * sizeof(*zinodes2)); + } else { /* Write out the cleared inodes. */ - writeat(FFS_FSBTODB(newsb, cgimin(newsb, cgn)), zinodes, - newsb->fs_ipg * sizeof(*zinodes)); + writeat(FFS_FSBTODB(newsb, cgimin(newsb, cgn)), zinodes1, + newsb->fs_ipg * sizeof(*zinodes1)); + } /* Dirty the cg. */ cgflags[cgn] |= CGF_DIRTY; } @@ -993,8 +999,15 @@ grow(void) /* Update the timestamp. */ newsb->fs_time = timestamp(); /* Allocate and clear the new-inode area, in case we add any cgs. */ - zinodes = alloconce(newsb->fs_ipg * sizeof(*zinodes), "zeroed inodes"); - memset(zinodes, 0, newsb->fs_ipg * sizeof(*zinodes)); + if (is_ufs2) { + zinodes2 = alloconce(newsb->fs_ipg * sizeof(*zinodes2), + "zeroed inodes"); + memset(zinodes2, 0, newsb->fs_ipg * sizeof(*zinodes2)); + } else { + zinodes1 = alloconce(newsb->fs_ipg * sizeof(*zinodes1), + "zeroed inodes"); + memset(zinodes1, 0, newsb->fs_ipg * sizeof(*zinodes1)); + } /* Check that the new last sector (frag, actually) is writable. Since * it's at least one frag larger than it used to be, we know we aren't
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: mrg Date: Wed Aug 24 06:34:24 UTC 2016 Modified Files: src/sys/arch/sparc64/dev: iommureg.h Log Message: use uint64_t consistently. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sparc64/dev/iommureg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/dev/iommureg.h diff -u src/sys/arch/sparc64/dev/iommureg.h:1.20 src/sys/arch/sparc64/dev/iommureg.h:1.21 --- src/sys/arch/sparc64/dev/iommureg.h:1.20 Sun Aug 24 19:09:43 2014 +++ src/sys/arch/sparc64/dev/iommureg.h Wed Aug 24 06:34:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: iommureg.h,v 1.20 2014/08/24 19:09:43 palle Exp $ */ +/* $NetBSD: iommureg.h,v 1.21 2016/08/24 06:34:24 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,11 +63,11 @@ struct iommureg2 { volatile uint64_t iommu_cr; /* IOMMU control register */ volatile uint64_t iommu_tsb; /* IOMMU TSB base register */ volatile uint64_t iommu_flush; /* IOMMU flush register */ - volatile u_int64_t iommu_ctxflush; - volatile u_int64_t iommu_reserved[28]; - volatile u_int64_t iommu_cache_flush; - volatile u_int64_t iommu_cache_invalidate; - volatile u_int64_t iommu_reserved2[30]; + volatile uint64_t iommu_ctxflush; + volatile uint64_t iommu_reserved[28]; + volatile uint64_t iommu_cache_flush; + volatile uint64_t iommu_cache_invalidate; + volatile uint64_t iommu_reserved2[30]; }; /* streaming buffer registers */
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: mrg Date: Wed Aug 24 06:34:24 UTC 2016 Modified Files: src/sys/arch/sparc64/dev: iommureg.h Log Message: use uint64_t consistently. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sparc64/dev/iommureg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Wed Aug 24 06:22:20 UTC 2016 Modified Files: src/sys/arch/alpha/include: fenv.h Log Message: restore the constants to the old values to match what the kernel expects internally. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/include/fenv.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/include/fenv.h diff -u src/sys/arch/alpha/include/fenv.h:1.1 src/sys/arch/alpha/include/fenv.h:1.2 --- src/sys/arch/alpha/include/fenv.h:1.1 Tue Aug 23 05:59:26 2016 +++ src/sys/arch/alpha/include/fenv.h Wed Aug 24 02:22:20 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.1 2016/08/23 09:59:26 christos Exp $ */ +/* $NetBSD: fenv.h,v 1.2 2016/08/24 06:22:20 christos Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz@@ -37,12 +37,12 @@ typedef __uint64_t fenv_t; typedef __uint16_t fexcept_t; /* Exception flags */ -#define FE_INVALID 0x02 -#define FE_DIVBYZERO 0x04 -#define FE_OVERFLOW 0x08 -#define FE_UNDERFLOW 0x10 -#define FE_INEXACT 0x20 -#define FE_INTOVF 0x40 /* not maskable */ +#define FE_INVALID 0x01 +#define FE_DIVBYZERO 0x02 +#define FE_OVERFLOW 0x04 +#define FE_UNDERFLOW 0x08 +#define FE_INEXACT 0x10 +#define FE_INTOVF 0x20 /* not maskable */ #define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INTOVF | \ FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) @@ -55,7 +55,7 @@ typedef __uint16_t fexcept_t; FE_UPWARD | FE_TOWARDZERO) #define _ROUND_SHIFT 58 -#define _FPUSW_SHIFT 51 +#define _FPUSW_SHIFT 52 #define __excb() __asm __volatile("excb") #define __mf_fpcr(__cw) __asm __volatile("mf_fpcr %0" : "=f" (*(__cw)))
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Wed Aug 24 06:22:20 UTC 2016 Modified Files: src/sys/arch/alpha/include: fenv.h Log Message: restore the constants to the old values to match what the kernel expects internally. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/include/fenv.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.