CVS commit: src/sys/arch/alpha/alpha
Module Name:src Committed By: thorpej Date: Wed Jul 7 03:30:35 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: locore.s patch.c Log Message: Provide a BWX version of alpha_copystr() and patch it into place if the system supports the BWX extension. The inner loop of the BWX version is 42% shorter than the non-BWX version (7 vs 12 insns). To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.139 src/sys/arch/alpha/alpha/locore.s cvs rdiff -u -r1.5 -r1.6 src/sys/arch/alpha/alpha/patch.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/alpha/alpha
Module Name:src Committed By: thorpej Date: Wed Jul 7 03:30:35 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: locore.s patch.c Log Message: Provide a BWX version of alpha_copystr() and patch it into place if the system supports the BWX extension. The inner loop of the BWX version is 42% shorter than the non-BWX version (7 vs 12 insns). To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.139 src/sys/arch/alpha/alpha/locore.s cvs rdiff -u -r1.5 -r1.6 src/sys/arch/alpha/alpha/patch.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/alpha/alpha/locore.s diff -u src/sys/arch/alpha/alpha/locore.s:1.138 src/sys/arch/alpha/alpha/locore.s:1.139 --- src/sys/arch/alpha/alpha/locore.s:1.138 Wed Jul 7 02:44:04 2021 +++ src/sys/arch/alpha/alpha/locore.s Wed Jul 7 03:30:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.138 2021/07/07 02:44:04 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.139 2021/07/07 03:30:35 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.138 2021/07/07 02:44:04 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.139 2021/07/07 03:30:35 thorpej Exp $"); #include "assym.h" @@ -902,6 +902,44 @@ LEAF_NOPROFILE(lwp_trampoline, 0) /* * alpha_copystr(const void *from, void *to, size_t len, size_t *donep) */ + .arch ev56 +LEAF(alpha_copystr_bwx, 4) + LDGP(pv) + + mov a2, t0 /* t0 = i = len */ + beq a2, 5f /* if (len == 0), bail */ + +1: ldbu t1, 0(a0) /* t1 = *from */ + subl a2, 1, a2 /* len-- */ + addq a0, 1, a0 /* from++ */ + stb t1, 0(a1) /* *to = t1 */ + beq t1, 2f /* if (t1 == '\0'), bail out */ + addq a1, 1, a1 /* to++ */ + bne a2, 1b /* if (len != 0), copy more */ + +2: beq a3, 3f /* if (lenp != NULL) */ + subl t0, a2, t0 /* *lenp = (i - len) */ + stq t0, 0(a3) +3: bne t1, 4f /* *from != '\0'; leave in a huff */ + + mov zero, v0 /* return 0. */ + RET + +4: ldiq v0, ENAMETOOLONG + RET + +5: ldiq t1, 1 /* fool the test above... */ + br zero, 2b + + nop/* pad to same length as... */ + nop/* non-BWX version. */ + nop + nop + nop + EXPORT(alpha_copystr_bwx_end) + END(alpha_copystr_bwx) + .arch ev4 + LEAF(alpha_copystr, 4) LDGP(pv) @@ -935,6 +973,7 @@ LEAF(alpha_copystr, 4) 5: ldiq t1, 1 /* fool the test above... */ br zero, 2b + EXPORT(alpha_copystr_end) END(alpha_copystr) NESTED(copyinstr, 4, 16, ra, IM_RA|IM_S0, 0) Index: src/sys/arch/alpha/alpha/patch.c diff -u src/sys/arch/alpha/alpha/patch.c:1.5 src/sys/arch/alpha/alpha/patch.c:1.6 --- src/sys/arch/alpha/alpha/patch.c:1.5 Fri Sep 4 03:41:49 2020 +++ src/sys/arch/alpha/alpha/patch.c Wed Jul 7 03:30:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: patch.c,v 1.5 2020/09/04 03:41:49 thorpej Exp $ */ +/* $NetBSD: patch.c,v 1.6 2021/07/07 03:30:35 thorpej Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: patch.c,v 1.5 2020/09/04 03:41:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: patch.c,v 1.6 2021/07/07 03:30:35 thorpej Exp $"); #include "opt_multiprocessor.h" @@ -57,6 +57,9 @@ void _membar_sync_end(void); void _membar_sync_mp(void); void _membar_sync_mp_end(void); +extern char alpha_copystr_bwx[], alpha_copystr_bwx_end[]; +extern char alpha_copystr[], alpha_copystr_end[]; + static void __attribute__((__unused__)) patchfunc(void *from_s, void *from_e, void *to_s, void *to_e) { @@ -85,6 +88,11 @@ alpha_patch(bool is_mp) * kernel code. */ + if (cpu_amask & ALPHA_AMASK_BWX) { + patchfunc(alpha_copystr_bwx, alpha_copystr_bwx_end, + alpha_copystr, alpha_copystr_end); + } + #if defined(MULTIPROCESSOR) if (is_mp) { KASSERT(curcpu()->ci_flags & CPUF_PRIMARY);
CVS commit: src/sys/arch/alpha/alpha
Module Name:src Committed By: thorpej Date: Wed Jul 7 03:24:26 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: mainbus.c Log Message: After attaching CPUs, call alpha_patch() in case there are any function patches we wish to do based on discovered architecture features. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/alpha/mainbus.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/alpha/alpha/mainbus.c diff -u src/sys/arch/alpha/alpha/mainbus.c:1.35 src/sys/arch/alpha/alpha/mainbus.c:1.36 --- src/sys/arch/alpha/alpha/mainbus.c:1.35 Sat Apr 24 23:36:23 2021 +++ src/sys/arch/alpha/alpha/mainbus.c Wed Jul 7 03:24:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.35 2021/04/24 23:36:23 thorpej Exp $ */ +/* $NetBSD: mainbus.c,v 1.36 2021/07/07 03:24:26 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.35 2021/04/24 23:36:23 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.36 2021/07/07 03:24:26 thorpej Exp $"); #include #include @@ -92,6 +92,9 @@ mbattach(device_t parent, device_t self, printf("WARNING: %d cpus in machine, %d attached\n", ncpus, cpuattachcnt); + /* Patch-up any routines based on architecture features. */ + alpha_patch(false); + if (alpha_is_qemu) { ma.ma_name = "qemu"; ma.ma_slot = 0; /* meaningless */
CVS commit: src/sys/arch/alpha/alpha
Module Name:src Committed By: thorpej Date: Wed Jul 7 03:24:26 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: mainbus.c Log Message: After attaching CPUs, call alpha_patch() in case there are any function patches we wish to do based on discovered architecture features. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/alpha/mainbus.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/alpha/alpha
Module Name:src Committed By: thorpej Date: Wed Jul 7 02:44:04 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: locore.s Log Message: Re-arrange alpha_copystr() so that the the error/unlikely cases are forward branches (which will be predicted as not-taken), and that the likely cases are fall-through, with the exception of the loop branch (which is a backward branch, and thus will be predicted as taken). To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/sys/arch/alpha/alpha/locore.s 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/alpha/locore.s diff -u src/sys/arch/alpha/alpha/locore.s:1.137 src/sys/arch/alpha/alpha/locore.s:1.138 --- src/sys/arch/alpha/alpha/locore.s:1.137 Sun May 23 01:00:53 2021 +++ src/sys/arch/alpha/alpha/locore.s Wed Jul 7 02:44:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.137 2021/05/23 01:00:53 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.138 2021/07/07 02:44:04 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.137 2021/05/23 01:00:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.138 2021/07/07 02:44:04 thorpej Exp $"); #include "assym.h" @@ -900,15 +900,13 @@ LEAF_NOPROFILE(lwp_trampoline, 0) /**/ /* - * XXX XXX XXX: Should be removed? + * alpha_copystr(const void *from, void *to, size_t len, size_t *donep) */ LEAF(alpha_copystr, 4) LDGP(pv) mov a2, t0 /* t0 = i = len */ - bne a2, 1f /* if (len != 0), proceed */ - ldiq t1, 1 /* else bail */ - br zero, 2f + beq a2, 5f /* if (len == 0), bail */ 1: ldq_u t1, 0(a0) /* t1 = *from */ extbl t1, a0, t1 @@ -927,13 +925,16 @@ LEAF(alpha_copystr, 4) 2: beq a3, 3f /* if (lenp != NULL) */ subl t0, a2, t0 /* *lenp = (i - len) */ stq t0, 0(a3) -3: beq t1, 4f /* *from == '\0'; leave quietly */ +3: bne t1, 4f /* *from != '\0'; leave in a huff */ - ldiq v0, ENAMETOOLONG /* *from != '\0'; error. */ + mov zero, v0 /* return 0. */ RET -4: mov zero, v0 /* return 0. */ +4: ldiq v0, ENAMETOOLONG RET + +5: ldiq t1, 1 /* fool the test above... */ + br zero, 2b END(alpha_copystr) NESTED(copyinstr, 4, 16, ra, IM_RA|IM_S0, 0)
CVS commit: src/sys/arch/alpha/alpha
Module Name:src Committed By: thorpej Date: Wed Jul 7 02:44:04 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: locore.s Log Message: Re-arrange alpha_copystr() so that the the error/unlikely cases are forward branches (which will be predicted as not-taken), and that the likely cases are fall-through, with the exception of the loop branch (which is a backward branch, and thus will be predicted as taken). To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/sys/arch/alpha/alpha/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 21:41:36 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: document further shift/reduce conflicts These cannot be resolved as easily as those from the previous commit. Anyway, the relevant code from the grammar is not yet covered by the tests, this needs to be done first. To generate a diff of this commit: cvs rdiff -u -r1.264 -r1.265 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 21:41:36 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: document further shift/reduce conflicts These cannot be resolved as easily as those from the previous commit. Anyway, the relevant code from the grammar is not yet covered by the tests, this needs to be done first. To generate a diff of this commit: cvs rdiff -u -r1.264 -r1.265 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.264 src/usr.bin/xlint/lint1/cgram.y:1.265 --- src/usr.bin/xlint/lint1/cgram.y:1.264 Tue Jul 6 20:56:38 2021 +++ src/usr.bin/xlint/lint1/cgram.y Tue Jul 6 21:41:36 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.264 2021/07/06 20:56:38 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.265 2021/07/06 21:41:36 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.264 2021/07/06 20:56:38 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.265 2021/07/06 21:41:36 rillig Exp $"); #endif #include @@ -749,6 +749,11 @@ member_declaration: } ; +/* + * XXX: shift/reduce conflict, caused by: + * type_attribute noclass_declspecs + * noclass_declspecs type_attribute + */ noclass_declspecs: clrtyp_typespec { add_type($1); @@ -1352,6 +1357,11 @@ abstract_declarator: /* C99 6.7.6 */ } ; +/* + * XXX: shift/reduce conflict, caused by: + * type_attribute direct_abstract_declarator + * direct_abstract_declarator type_attribute + */ direct_abstract_declarator: /* C99 6.7.6 */ T_LPAREN abstract_declarator T_RPAREN { $$ = $2;
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 20:56:38 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: document the cause for 24 of the 162 grammar conflicts To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.263 src/usr.bin/xlint/lint1/cgram.y:1.264 --- src/usr.bin/xlint/lint1/cgram.y:1.263 Tue Jul 6 20:29:08 2021 +++ src/usr.bin/xlint/lint1/cgram.y Tue Jul 6 20:56:38 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.263 2021/07/06 20:29:08 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.264 2021/07/06 20:56:38 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.263 2021/07/06 20:29:08 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.264 2021/07/06 20:56:38 rillig Exp $"); #endif #include @@ -963,6 +963,11 @@ type_decl: } ; +/* + * XXX: shift/reduce conflict, caused by: + * type_attribute notype_direct_decl + * notype_direct_decl type_attribute + */ notype_direct_decl: T_NAME { $$ = declarator_name(getsym($1)); @@ -987,6 +992,11 @@ notype_direct_decl: | notype_direct_decl type_attribute ; +/* + * XXX: shift/reduce conflict, caused by: + * type_attribute type_direct_decl + * type_direct_decl type_attribute + */ type_direct_decl: identifier { $$ = declarator_name(getsym($1));
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 20:56:38 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: document the cause for 24 of the 162 grammar conflicts To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 20:29:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: resolve conflict in grammar for __real__ and __imag__ There is no need for extra rules for '__real__(term)' since that is already handled by the simpler '__real__ term', just a few lines further up in the grammar. Likewise for __imag__. The GCC manual does not mention anything about parentheses either. To generate a diff of this commit: cvs rdiff -u -r1.262 -r1.263 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 20:29:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: resolve conflict in grammar for __real__ and __imag__ There is no need for extra rules for '__real__(term)' since that is already handled by the simpler '__real__ term', just a few lines further up in the grammar. Likewise for __imag__. The GCC manual does not mention anything about parentheses either. To generate a diff of this commit: cvs rdiff -u -r1.262 -r1.263 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.262 src/usr.bin/xlint/lint1/cgram.y:1.263 --- src/usr.bin/xlint/lint1/cgram.y:1.262 Tue Jul 6 19:08:28 2021 +++ src/usr.bin/xlint/lint1/cgram.y Tue Jul 6 20:29:08 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.262 2021/07/06 19:08:28 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.263 2021/07/06 20:29:08 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.262 2021/07/06 19:08:28 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.263 2021/07/06 20:29:08 rillig Exp $"); #endif #include @@ -123,7 +123,7 @@ anonymize(sym_t *s) } %} -%expect 164 +%expect 162 %union { val_t *y_val; @@ -1845,12 +1845,6 @@ term: | T_EXTENSION term { $$ = $2; } - | T_REAL T_LPAREN term T_RPAREN { - $$ = build(REAL, $3, NULL); - } - | T_IMAG T_LPAREN term T_RPAREN { - $$ = build(IMAG, $3, NULL); - } | T_BUILTIN_OFFSETOF T_LPAREN type_name T_COMMA identifier T_RPAREN { symtyp = FMEMBER; $$ = build_offsetof($3, getsym($5));
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 20:17:15 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: __real__ and __imag__ are GNU extensions https://gcc.gnu.org/onlinedocs/gcc/Complex.html To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.bin/xlint/lint1/lex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/lex.c diff -u src/usr.bin/xlint/lint1/lex.c:1.50 src/usr.bin/xlint/lint1/lex.c:1.51 --- src/usr.bin/xlint/lint1/lex.c:1.50 Wed Jun 30 10:25:02 2021 +++ src/usr.bin/xlint/lint1/lex.c Tue Jul 6 20:17:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.50 2021/06/30 10:25:02 rillig Exp $ */ +/* $NetBSD: lex.c,v 1.51 2021/07/06 20:17:15 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: lex.c,v 1.50 2021/06/30 10:25:02 rillig Exp $"); +__RCSID("$NetBSD: lex.c,v 1.51 2021/07/06 20:17:15 rillig Exp $"); #endif #include @@ -183,7 +183,7 @@ static struct kwtab { kwdef_gcc_attr( "gnu_printf", T_AT_FORMAT_GNU_PRINTF), kwdef_keyword( "goto", T_GOTO), kwdef_keyword( "if", T_IF), - kwdef_token( "imag", T_IMAG, 0,1,0,0,4), + kwdef_token( "imag", T_IMAG, 0,0,1,0,4), kwdef_sclass( "inline", INLINE, 0,1,0,0,7), kwdef_type( "int", INT, 0,0,0,0,1), kwdef_type( "long", LONG, 0,0,0,0,1), @@ -204,7 +204,7 @@ static struct kwtab { kwdef_gcc_attr( "pcs", T_AT_PCS), kwdef_gcc_attr( "printf", T_AT_FORMAT_PRINTF), kwdef_gcc_attr( "pure", T_AT_PURE), - kwdef_token( "real", T_REAL, 0,1,0,0,4), + kwdef_token( "real", T_REAL, 0,0,1,0,4), kwdef_sclass( "register", REG, 0,0,0,0,1), kwdef_tqual( "restrict", RESTRICT, 0,1,0,0,5), kwdef_keyword( "return", T_RETURN),
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 20:17:15 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: __real__ and __imag__ are GNU extensions https://gcc.gnu.org/onlinedocs/gcc/Complex.html To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.bin/xlint/lint1/lex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 19:08:28 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: do not allow _Alignas (from C11) or __packed after a label To generate a diff of this commit: cvs rdiff -u -r1.261 -r1.262 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.261 src/usr.bin/xlint/lint1/cgram.y:1.262 --- src/usr.bin/xlint/lint1/cgram.y:1.261 Tue Jul 6 18:28:08 2021 +++ src/usr.bin/xlint/lint1/cgram.y Tue Jul 6 19:08:28 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.261 2021/07/06 18:28:08 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.262 2021/07/06 19:08:28 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.261 2021/07/06 18:28:08 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.262 2021/07/06 19:08:28 rillig Exp $"); #endif #include @@ -123,7 +123,7 @@ anonymize(sym_t *s) } %} -%expect 166 +%expect 164 %union { val_t *y_val; @@ -1407,7 +1407,7 @@ statement: /* C99 6.8 */ ; labeled_statement: /* C99 6.8.1 */ - label type_attribute_opt statement + label gcc_attribute_list_opt statement ; label: @@ -1976,8 +1976,6 @@ comma_opt: /* GCC extensions */ -/* TODO: split into type_attribute and gcc_attribute */ - type_attribute_list: type_attribute | type_attribute_list type_attribute @@ -1992,6 +1990,16 @@ type_attribute: | T_NORETURN ; +gcc_attribute_list_opt: + /* empty */ + | gcc_attribute_list + ; + +gcc_attribute_list: + gcc_attribute + | gcc_attribute_list gcc_attribute + ; + /* https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html */ gcc_attribute: T_ATTRIBUTE T_LPAREN T_LPAREN {
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 19:08:28 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: do not allow _Alignas (from C11) or __packed after a label To generate a diff of this commit: cvs rdiff -u -r1.261 -r1.262 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 18:43:27 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: gcc_attribute.c Log Message: tests/lint: add test for empty __attribute__(()) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/gcc_attribute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 18:43:27 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: gcc_attribute.c Log Message: tests/lint: add test for empty __attribute__(()) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/gcc_attribute.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/usr.bin/xlint/lint1/gcc_attribute.c diff -u src/tests/usr.bin/xlint/lint1/gcc_attribute.c:1.7 src/tests/usr.bin/xlint/lint1/gcc_attribute.c:1.8 --- src/tests/usr.bin/xlint/lint1/gcc_attribute.c:1.7 Tue Jul 6 17:33:07 2021 +++ src/tests/usr.bin/xlint/lint1/gcc_attribute.c Tue Jul 6 18:43:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gcc_attribute.c,v 1.7 2021/07/06 17:33:07 rillig Exp $ */ +/* $NetBSD: gcc_attribute.c,v 1.8 2021/07/06 18:43:27 rillig Exp $ */ # 3 "gcc_attribute.c" /* @@ -65,3 +65,22 @@ func( __attribute__((__noreturn__)) __attribute__((__noreturn__)) ); + +/* + * https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html says that the + * attribute-list is a "possibly empty comma-separated sequence of + * attributes". + * + * No matter whether this particular example is interpreted as an empty list + * or a list containing a single empty attribute, the result is the same in + * both cases. + */ +void one_empty_attribute(void) +__attribute__((/* none */)); + +/* + * https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html further says that + * each individual attribute may be "Empty. Empty attributes are ignored". + */ +void two_empty_attributes(void) +__attribute__((/* none */, /* still none */));
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 18:28:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: rename grammar rules for GCC __attribute__ No functional change. To generate a diff of this commit: cvs rdiff -u -r1.260 -r1.261 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.260 src/usr.bin/xlint/lint1/cgram.y:1.261 --- src/usr.bin/xlint/lint1/cgram.y:1.260 Tue Jul 6 18:22:40 2021 +++ src/usr.bin/xlint/lint1/cgram.y Tue Jul 6 18:28:08 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.260 2021/07/06 18:22:40 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.261 2021/07/06 18:28:08 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.260 2021/07/06 18:22:40 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.261 2021/07/06 18:28:08 rillig Exp $"); #endif #include @@ -1984,27 +1984,29 @@ type_attribute_list: ; type_attribute: - T_ATTRIBUTE T_LPAREN T_LPAREN { - attron = true; - } type_attribute_spec_list { - attron = false; - } T_RPAREN T_RPAREN - | T_ALIGNAS T_LPAREN align_as T_RPAREN { - } + gcc_attribute + | T_ALIGNAS T_LPAREN align_as T_RPAREN | T_PACKED { addpacked(); } - | T_NORETURN { - } + | T_NORETURN ; /* https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html */ -type_attribute_spec_list: - type_attribute_spec - | type_attribute_spec_list T_COMMA type_attribute_spec +gcc_attribute: + T_ATTRIBUTE T_LPAREN T_LPAREN { + attron = true; + } gcc_attribute_spec_list { + attron = false; + } T_RPAREN T_RPAREN + ; + +gcc_attribute_spec_list: + gcc_attribute_spec + | gcc_attribute_spec_list T_COMMA gcc_attribute_spec ; -type_attribute_spec: +gcc_attribute_spec: /* empty */ | T_AT_ALWAYS_INLINE | T_AT_ALIAS T_LPAREN string T_RPAREN @@ -2012,7 +2014,7 @@ type_attribute_spec: | T_AT_ALIGNED | T_AT_ALLOC_SIZE T_LPAREN constant_expr T_COMMA constant_expr T_RPAREN | T_AT_ALLOC_SIZE T_LPAREN constant_expr T_RPAREN - | T_AT_BOUNDED T_LPAREN type_attribute_bounded_type + | T_AT_BOUNDED T_LPAREN gcc_attribute_bounded T_COMMA constant_expr T_COMMA constant_expr T_RPAREN | T_AT_COLD | T_AT_COMMON @@ -2025,7 +2027,7 @@ type_attribute_spec: | T_AT_FALLTHROUGH { fallthru(1); } - | T_AT_FORMAT T_LPAREN type_attribute_format_type T_COMMA + | T_AT_FORMAT T_LPAREN gcc_attribute_format T_COMMA constant_expr T_COMMA constant_expr T_RPAREN | T_AT_FORMAT_ARG T_LPAREN constant_expr T_RPAREN | T_AT_GNU_INLINE @@ -2066,13 +2068,13 @@ type_attribute_spec: } ; -type_attribute_bounded_type: +gcc_attribute_bounded: T_AT_MINBYTES | T_AT_STRING | T_AT_BUFFER ; -type_attribute_format_type: +gcc_attribute_format: T_AT_FORMAT_GNU_PRINTF | T_AT_FORMAT_PRINTF | T_AT_FORMAT_SCANF
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 18:28:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: rename grammar rules for GCC __attribute__ No functional change. To generate a diff of this commit: cvs rdiff -u -r1.260 -r1.261 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 18:22:41 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: move grammar rules for GCC __attribute__ to the bottom In GCC 2.95.3, attributes had already been available for functions, variables and types. At that time they were indeed related to declarations, and that's where they ended up in lint's grammar. Later, attributes were extended to labels, enumerators and statements as well. To keep the grammar for declarations short and comprehensible, move the rather large part about __attribute__ at the bottom of the grammar, creating a new section called "GCC extensions". The grammar rules are not named accurately (and never were). They are called "type attributes" but apply not only to types. These names will be improved in a follow-up commit. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.259 -r1.260 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 18:22:41 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: move grammar rules for GCC __attribute__ to the bottom In GCC 2.95.3, attributes had already been available for functions, variables and types. At that time they were indeed related to declarations, and that's where they ended up in lint's grammar. Later, attributes were extended to labels, enumerators and statements as well. To keep the grammar for declarations short and comprehensible, move the rather large part about __attribute__ at the bottom of the grammar, creating a new section called "GCC extensions". The grammar rules are not named accurately (and never were). They are called "type attributes" but apply not only to types. These names will be improved in a follow-up commit. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.259 -r1.260 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.259 src/usr.bin/xlint/lint1/cgram.y:1.260 --- src/usr.bin/xlint/lint1/cgram.y:1.259 Tue Jul 6 17:52:04 2021 +++ src/usr.bin/xlint/lint1/cgram.y Tue Jul 6 18:22:40 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.259 2021/07/06 17:52:04 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.260 2021/07/06 18:22:40 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.259 2021/07/06 17:52:04 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.260 2021/07/06 18:22:40 rillig Exp $"); #endif #include @@ -538,114 +538,6 @@ declaration: /* C99 6.7 */ | error T_SEMI ; -type_attribute_format_type: - T_AT_FORMAT_GNU_PRINTF - | T_AT_FORMAT_PRINTF - | T_AT_FORMAT_SCANF - | T_AT_FORMAT_STRFMON - | T_AT_FORMAT_STRFTIME - | T_AT_FORMAT_SYSLOG - ; - -type_attribute_bounded_type: - T_AT_MINBYTES - | T_AT_STRING - | T_AT_BUFFER - ; - - -type_attribute_spec: - /* empty */ - | T_AT_ALWAYS_INLINE - | T_AT_ALIAS T_LPAREN string T_RPAREN - | T_AT_ALIGNED T_LPAREN constant_expr T_RPAREN - | T_AT_ALIGNED - | T_AT_ALLOC_SIZE T_LPAREN constant_expr T_COMMA constant_expr T_RPAREN - | T_AT_ALLOC_SIZE T_LPAREN constant_expr T_RPAREN - | T_AT_BOUNDED T_LPAREN type_attribute_bounded_type - T_COMMA constant_expr T_COMMA constant_expr T_RPAREN - | T_AT_COLD - | T_AT_COMMON - | T_AT_CONSTRUCTOR T_LPAREN constant_expr T_RPAREN - | T_AT_CONSTRUCTOR - | T_AT_DEPRECATED T_LPAREN string T_RPAREN - | T_AT_DEPRECATED - | T_AT_DESTRUCTOR T_LPAREN constant_expr T_RPAREN - | T_AT_DESTRUCTOR - | T_AT_FALLTHROUGH { - fallthru(1); - } - | T_AT_FORMAT T_LPAREN type_attribute_format_type T_COMMA - constant_expr T_COMMA constant_expr T_RPAREN - | T_AT_FORMAT_ARG T_LPAREN constant_expr T_RPAREN - | T_AT_GNU_INLINE - | T_AT_MALLOC - | T_AT_MAY_ALIAS - | T_AT_MODE T_LPAREN T_NAME T_RPAREN - | T_AT_NOINLINE - | T_AT_NONNULL T_LPAREN constant_expr_list_opt T_RPAREN - | T_AT_NONNULL - | T_AT_NONSTRING - | T_AT_NORETURN - | T_AT_NOTHROW - | T_AT_NO_INSTRUMENT_FUNCTION - | T_AT_OPTIMIZE T_LPAREN string T_RPAREN - | T_AT_PACKED { - addpacked(); - } - | T_AT_PCS T_LPAREN string T_RPAREN - | T_AT_PURE - | T_AT_RETURNS_TWICE - | T_AT_SECTION T_LPAREN string T_RPAREN - | T_AT_SENTINEL T_LPAREN constant_expr T_RPAREN - | T_AT_SENTINEL - | T_AT_TLS_MODEL T_LPAREN string T_RPAREN - | T_AT_TUNION - | T_AT_UNUSED { - add_attr_used(); - } - | T_AT_USED { - add_attr_used(); - } - | T_AT_VISIBILITY T_LPAREN constant_expr T_RPAREN - | T_AT_WARN_UNUSED_RESULT - | T_AT_WEAK - | T_QUAL { - if ($1 != CONST) - yyerror("Bad attribute"); - } - ; - -type_attribute_spec_list: - type_attribute_spec - | type_attribute_spec_list T_COMMA type_attribute_spec - ; - -align_as: - typespec - | constant_expr - ; - -type_attribute: - T_ATTRIBUTE T_LPAREN T_LPAREN { - attron = true; - } type_attribute_spec_list { - attron = false; - } T_RPAREN T_RPAREN - | T_ALIGNAS T_LPAREN align_as T_RPAREN { - } - | T_PACKED { - addpacked(); - } - | T_NORETURN { - } - ; - -type_attribute_list: - type_attribute - | type_attribute_list type_attribute - ; - clrtyp: /* empty */ { clrtyp(); @@ -1228,6 +1120,11 @@ type_qualifier: } ; +align_as: /* See alignment-specifier in C11 6.7.5 */ + typespec + | constant_expr + ; + param_list: id_list_lparen identifier_list T_RPAREN { $$ = $2; @@ -2077,6 +1974,113 @@ comma_opt: | T_COMMA ; +/* GCC extensions */ + +/* TODO: split into type_attribute and gcc_attribute */ + +type_attribute_list: + type_attribute + | type_attribute_list type_attribute + ; + +type_attribute: + T_ATTRIBUTE T_LPAREN T_LPAREN { + attron = true; + } type_attribute_spec_list { + attron =
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 17:52:05 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: align grammar rules for enum-specifier with C99 No functional change. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.258 src/usr.bin/xlint/lint1/cgram.y:1.259 --- src/usr.bin/xlint/lint1/cgram.y:1.258 Tue Jul 6 16:02:44 2021 +++ src/usr.bin/xlint/lint1/cgram.y Tue Jul 6 17:52:04 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.258 2021/07/06 16:02:44 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.259 2021/07/06 17:52:04 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.258 2021/07/06 16:02:44 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.259 2021/07/06 17:52:04 rillig Exp $"); #endif #include @@ -300,8 +300,7 @@ anonymize(sym_t *s) %type constant_expr %type array_size %type enum_declaration -%type enums_with_opt_comma -%type enums +%type enumerator_list %type enumerator %type enumeration_constant %type notype_direct_decl @@ -964,7 +963,7 @@ enum_tag: ; enum_declaration: - enum_decl_lbrace enums_with_opt_comma T_RBRACE { + enum_decl_lbrace enumerator_list enumerator_list_comma_opt T_RBRACE { $$ = $2; } ; @@ -976,9 +975,19 @@ enum_decl_lbrace: } ; -enums_with_opt_comma: - enums - | enums T_COMMA { +enumerator_list: /* C99 6.7.2.2 */ + enumerator + | enumerator_list T_COMMA enumerator { + $$ = lnklst($1, $3); + } + | error { + $$ = NULL; + } + ; + +enumerator_list_comma_opt: + /* empty */ + | T_COMMA { if (sflag) { /* trailing ',' prohibited in enum declaration */ error(54); @@ -986,21 +995,10 @@ enums_with_opt_comma: /* trailing ',' prohibited in enum declaration */ c99ism(54); } - $$ = $1; - } - ; - -enums: - enumerator - | enums T_COMMA enumerator { - $$ = lnklst($1, $3); - } - | error { - $$ = NULL; } ; -enumerator: +enumerator: /* C99 6.7.2.2 */ enumeration_constant { $$ = enumeration_constant($1, enumval, true); }
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 17:52:05 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: align grammar rules for enum-specifier with C99 No functional change. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Jul 6 17:33:07 UTC 2021 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: Makefile gcc_attribute.c gcc_attribute.exp Added Files: src/tests/usr.bin/xlint/lint1: gcc_attribute_enum.c gcc_attribute_enum.exp gcc_attribute_func.c gcc_attribute_func.exp gcc_attribute_label.c gcc_attribute_label.exp gcc_attribute_stmt.c gcc_attribute_stmt.exp gcc_attribute_type.c gcc_attribute_type.exp gcc_attribute_var.c gcc_attribute_var.exp Log Message: tests/lint: add tests for GCC __attribute__ Before fixing the wrong handling of __attribute__ that is demonstrated at the end of gcc_attribute.c, ensure that the attribute handling works in the most basic cases. Lint currently accepts __attribute__ in more places than it should. This leads to some ambiguities in the grammar. To generate a diff of this commit: cvs rdiff -u -r1.1076 -r1.1077 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.79 -r1.80 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/gcc_attribute.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/gcc_attribute.exp cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/gcc_attribute_enum.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_enum.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_func.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_func.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_label.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_label.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_stmt.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_stmt.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_type.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_type.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_var.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_var.exp 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1076 src/distrib/sets/lists/tests/mi:1.1077 --- src/distrib/sets/lists/tests/mi:1.1076 Sun Jul 4 20:22:31 2021 +++ src/distrib/sets/lists/tests/mi Tue Jul 6 17:33:07 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1076 2021/07/04 20:22:31 rillig Exp $ +# $NetBSD: mi,v 1.1077 2021/07/06 17:33:07 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6219,6 +6219,18 @@ ./usr/tests/usr.bin/xlint/lint1/gcc_attribute.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_enum.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_enum.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_func.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_func.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_label.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_label.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_stmt.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_stmt.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_type.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_type.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_var.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_attribute_var.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_bit_field_types.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_bit_field_types.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_init_compound_literal.c tests-usr.bin-tests compattestfile,atf Index: src/tests/usr.bin/xlint/lint1/Makefile diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.79 src/tests/usr.bin/xlint/lint1/Makefile:1.80 --- src/tests/usr.bin/xlint/lint1/Makefile:1.79 Sun Jul 4 20:22:31 2021 +++ src/tests/usr.bin/xlint/lint1/Makefile Tue Jul 6 17:33:07 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.79 2021/07/04 20:22:31 rillig Exp $ +# $NetBSD: Makefile,v 1.80 2021/07/06 17:33:07 rillig Exp $ NOMAN= # defined MAX_MESSAGE= 345 # see lint1/err.c @@ -121,6 +121,18 @@ FILES+= gcc_attribute.c FILES+= gcc_attribute.exp FILES+= gcc_attribute_aligned.c FILES+= gcc_attribute_aligned.exp +FILES+= gcc_attribute_enum.c +FILES+= gcc_attribute_enum.exp
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Jul 6 17:33:07 UTC 2021 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: Makefile gcc_attribute.c gcc_attribute.exp Added Files: src/tests/usr.bin/xlint/lint1: gcc_attribute_enum.c gcc_attribute_enum.exp gcc_attribute_func.c gcc_attribute_func.exp gcc_attribute_label.c gcc_attribute_label.exp gcc_attribute_stmt.c gcc_attribute_stmt.exp gcc_attribute_type.c gcc_attribute_type.exp gcc_attribute_var.c gcc_attribute_var.exp Log Message: tests/lint: add tests for GCC __attribute__ Before fixing the wrong handling of __attribute__ that is demonstrated at the end of gcc_attribute.c, ensure that the attribute handling works in the most basic cases. Lint currently accepts __attribute__ in more places than it should. This leads to some ambiguities in the grammar. To generate a diff of this commit: cvs rdiff -u -r1.1076 -r1.1077 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.79 -r1.80 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/gcc_attribute.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/gcc_attribute.exp cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/gcc_attribute_enum.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_enum.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_func.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_func.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_label.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_label.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_stmt.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_stmt.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_type.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_type.exp \ src/tests/usr.bin/xlint/lint1/gcc_attribute_var.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_var.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 16:02:44 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: document grammar rule that deviates from C99 To generate a diff of this commit: cvs rdiff -u -r1.257 -r1.258 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 16:02:44 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: document grammar rule that deviates from C99 To generate a diff of this commit: cvs rdiff -u -r1.257 -r1.258 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.257 src/usr.bin/xlint/lint1/cgram.y:1.258 --- src/usr.bin/xlint/lint1/cgram.y:1.257 Tue Jul 6 05:39:27 2021 +++ src/usr.bin/xlint/lint1/cgram.y Tue Jul 6 16:02:44 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.257 2021/07/06 05:39:27 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.258 2021/07/06 16:02:44 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.257 2021/07/06 05:39:27 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.258 2021/07/06 16:02:44 rillig Exp $"); #endif #include @@ -1300,6 +1300,7 @@ parameter_type_list: } ; +/* XXX: C99 6.7.5 defines the same name, but it looks completely different. */ parameter_declaration: declmods deftyp { $$ = declare_argument(abstract_name(), false);
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: christos Date: Tue Jul 6 14:22:16 UTC 2021 Modified Files: src/lib/libc/stdio: fflush.c fvwrite.c Log Message: Handle EINTR, from RVP. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/stdio/fflush.c cvs rdiff -u -r1.25 -r1.26 src/lib/libc/stdio/fvwrite.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: christos Date: Tue Jul 6 14:22:16 UTC 2021 Modified Files: src/lib/libc/stdio: fflush.c fvwrite.c Log Message: Handle EINTR, from RVP. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/stdio/fflush.c cvs rdiff -u -r1.25 -r1.26 src/lib/libc/stdio/fvwrite.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/libc/stdio/fflush.c diff -u src/lib/libc/stdio/fflush.c:1.19 src/lib/libc/stdio/fflush.c:1.20 --- src/lib/libc/stdio/fflush.c:1.19 Mon Jul 5 03:26:00 2021 +++ src/lib/libc/stdio/fflush.c Tue Jul 6 10:22:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fflush.c,v 1.19 2021/07/05 07:26:00 christos Exp $ */ +/* $NetBSD: fflush.c,v 1.20 2021/07/06 14:22:16 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)fflush.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: fflush.c,v 1.19 2021/07/05 07:26:00 christos Exp $"); +__RCSID("$NetBSD: fflush.c,v 1.20 2021/07/06 14:22:16 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -107,7 +107,11 @@ __sflush(FILE *fp) for (; n > 0; n -= t, p += t) { t = (*fp->_write)(fp->_cookie, (char *)p, n); - if (t <= 0) { + if (t < 0) { + if (errno == EINTR) { +t = 0; +continue; + } /* Reset _p and _w. */ if (p > fp->_p) { /* Some was written. */ Index: src/lib/libc/stdio/fvwrite.c diff -u src/lib/libc/stdio/fvwrite.c:1.25 src/lib/libc/stdio/fvwrite.c:1.26 --- src/lib/libc/stdio/fvwrite.c:1.25 Tue Mar 27 11:05:42 2012 +++ src/lib/libc/stdio/fvwrite.c Tue Jul 6 10:22:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fvwrite.c,v 1.25 2012/03/27 15:05:42 christos Exp $ */ +/* $NetBSD: fvwrite.c,v 1.26 2021/07/06 14:22:16 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)fvwrite.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: fvwrite.c,v 1.25 2012/03/27 15:05:42 christos Exp $"); +__RCSID("$NetBSD: fvwrite.c,v 1.26 2021/07/06 14:22:16 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -97,15 +97,21 @@ __sfvwrite(FILE *fp, struct __suio *uio) len = iov->iov_len; \ iov++; \ } +#define WRITE(nw) \ + w = (*fp->_write)(fp->_cookie, p, nw); \ + if (w < 0) { \ + if (errno != EINTR) \ + goto err; \ + w = 0; \ + } else \ + w = w if (fp->_flags & __SNBF) { /* * Unbuffered: write up to BUFSIZ bytes at a time. */ do { GETIOV(;); - w = (*fp->_write)(fp->_cookie, p, MIN(len, BUFSIZ)); - if (w <= 0) -goto err; + WRITE(MIN(len, BUFSIZ)); p += w; len -= w; } while ((uio->uio_resid -= w) != 0); @@ -160,9 +166,7 @@ __sfvwrite(FILE *fp, struct __suio *uio) goto err; } else if (len >= (size_t)(w = fp->_bf._size)) { /* write directly */ -w = (*fp->_write)(fp->_cookie, p, (size_t)w); -if (w <= 0) - goto err; +WRITE((size_t)w); } else { /* fill and done */ w = len; @@ -199,9 +203,7 @@ __sfvwrite(FILE *fp, struct __suio *uio) if (fflush(fp)) goto err; } else if (s >= (w = fp->_bf._size)) { -w = (*fp->_write)(fp->_cookie, p, (size_t)w); -if (w <= 0) - goto err; +WRITE((size_t)w); } else { w = s; COPY(w);
CVS commit: src/doc
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:42:12 UTC 2021 Modified Files: src/doc: HACKS Log Message: Remove jemalloc and gdb hacks for alpha; root cause has been addressed. To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:42:12 UTC 2021 Modified Files: src/doc: HACKS Log Message: Remove jemalloc and gdb hacks for alpha; root cause has been addressed. To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.221 src/doc/HACKS:1.222 --- src/doc/HACKS:1.221 Mon Jul 5 11:16:56 2021 +++ src/doc/HACKS Tue Jul 6 12:42:12 2021 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.221 2021/07/05 11:16:56 hgutch Exp $ +# $NetBSD: HACKS,v 1.222 2021/07/06 12:42:12 thorpej Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -950,17 +950,6 @@ descr Disable optimization for rtld.c on second pass loop with elm == 0x kcah -port alpha -hack GCC 7.4/8.3/9.3: userland binaries crash randomly (port-alpha/54307) -cdate Fri Nov 1 20:43:35 UTC 2019 -mdate Wed Dec 16 01:21:32 UTC 2020 -who rin -file src/external/bsd/jemalloc/lib/Makefile.inc: 1.11 -descr GCC miscompiles rtree.c and tcache.c (for 7.4, 8.3, and 9.3) with - optimization levels -O[12]. Compile these files with -O0, - alternatively, compile whole jemalloc with -DJEMALLOC_DEBUG. -kcah - port powerpc hack compile tc.c, logerr.c, ubsan.c with -O0 for clang cdate Wed Jan 29 17:40:19 EST 2020 @@ -988,17 +977,6 @@ descr GCC 9.4 and 8.3 miscompile aes_ccm for sun3 (TME, 68020 emulator) and sun2 (TME, 68010 emulator). kcah -port alpha -hack compile __realpath in gdb/gnulib/canonicalize-lgpl.c with -O0 (PR/56153) -cdate Sat May 8 08:24:49 EDT 2021 -mdate Sat May 8 08:24:49 EDT 2021 -who christos -file src/external/gpl3/gdb/dist/gnulib/import/canonicalize-lgpl.c: 1.2 -descr For alpha gcc-9 and gcc-10 miscompile the malloca macro leading to -allocation from the stack and freeing with regular free which causes - a crash. -kcah - port sh3 hack gcc9-sh3-lint
CVS commit: src/external/gpl3/gdb/dist/gnulib/import
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:41:00 UTC 2021 Modified Files: src/external/gpl3/gdb/dist/gnulib/import: canonicalize-lgpl.c Log Message: Remote -O0 hack for alpha; root cause has been addressed. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/gdb/dist/gnulib/import/canonicalize-lgpl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/dist/gnulib/import/canonicalize-lgpl.c diff -u src/external/gpl3/gdb/dist/gnulib/import/canonicalize-lgpl.c:1.2 src/external/gpl3/gdb/dist/gnulib/import/canonicalize-lgpl.c:1.3 --- src/external/gpl3/gdb/dist/gnulib/import/canonicalize-lgpl.c:1.2 Sat May 8 12:23:47 2021 +++ src/external/gpl3/gdb/dist/gnulib/import/canonicalize-lgpl.c Tue Jul 6 12:41:00 2021 @@ -114,13 +114,6 @@ alloc_failed (void) holds the same value as the value returned. */ char * -#ifdef __alpha__ -/* - * toolchain/56153 - * GCC 10 and 9 miscompile malloca() macro for alpha. - */ -__attribute__((optimize("O0"))) -#endif __realpath (const char *name, char *resolved) { char *rpath, *dest, *extra_buf = NULL;
CVS commit: src/external/gpl3/gdb/dist/gnulib/import
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:41:00 UTC 2021 Modified Files: src/external/gpl3/gdb/dist/gnulib/import: canonicalize-lgpl.c Log Message: Remote -O0 hack for alpha; root cause has been addressed. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/gdb/dist/gnulib/import/canonicalize-lgpl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/jemalloc/lib
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:40:25 UTC 2021 Modified Files: src/external/bsd/jemalloc/lib: Makefile.inc Log Message: Remove -O0 hack for alpha; root cause has been addressed. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/bsd/jemalloc/lib/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/lib/Makefile.inc diff -u src/external/bsd/jemalloc/lib/Makefile.inc:1.13 src/external/bsd/jemalloc/lib/Makefile.inc:1.14 --- src/external/bsd/jemalloc/lib/Makefile.inc:1.13 Wed Dec 16 01:21:32 2020 +++ src/external/bsd/jemalloc/lib/Makefile.inc Tue Jul 6 12:40:24 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.13 2020/12/16 01:21:32 rin Exp $ +# $NetBSD: Makefile.inc,v 1.14 2021/07/06 12:40:24 thorpej Exp $ JEMALLOC:=${.PARSEDIR}/.. @@ -51,14 +51,6 @@ COPTS.ctl.c+=-Wno-error=stack-protector COPTS.stats.c+=-Wno-error=stack-protector COPTS.tcache.c+=-Wno-error=stack-protector -.if ${MACHINE} == "alpha" && ${ACTIVE_CC} == "gcc" -# These files need to be compiled with -O0, or build everything with -# -DJEMALLOC_DEBUG. Otherwise, userland binaries crash randomly, as -# reported in port-alpha/54307. -COPTS.rtree.c+= -O0 -COPTS.tcache.c+=-O0 -.endif - .if ${MACHINE_ARCH} == "vax" # in merge_overlapping_regs, at regrename.c COPTS.arena.c+=-O0
CVS commit: src/external/bsd/jemalloc/lib
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:40:25 UTC 2021 Modified Files: src/external/bsd/jemalloc/lib: Makefile.inc Log Message: Remove -O0 hack for alpha; root cause has been addressed. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/bsd/jemalloc/lib/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: christos Date: Tue Jul 6 12:26:03 UTC 2021 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: new acpica To generate a diff of this commit: cvs rdiff -u -r1.1804 -r1.1805 src/doc/3RDPARTY cvs rdiff -u -r1.2813 -r1.2814 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1804 src/doc/3RDPARTY:1.1805 --- src/doc/3RDPARTY:1.1804 Wed Jun 16 21:16:55 2021 +++ src/doc/3RDPARTY Tue Jul 6 08:26:03 2021 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1804 2021/06/17 01:16:55 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1805 2021/07/06 12:26:03 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -41,12 +41,12 @@ # Package: acpica -Version: 20210331 -Current Vers: 20210331 +Version: 20210604 +Current Vers: 20210604 Maintainer: Intel Archive Site: http://www.acpica.org/downloads/ Home Page: http://www.acpica.org/ -Date: 2021-04-03 +Date: 2021-07-06 Mailing List: de...@acpica.org License: BSD-like Responsible: jruoho Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2813 src/doc/CHANGES:1.2814 --- src/doc/CHANGES:1.2813 Tue Jun 29 06:26:17 2021 +++ src/doc/CHANGES Tue Jul 6 08:26:03 2021 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2813 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2814 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -335,7 +335,7 @@ Changes from NetBSD 9.0 to NetBSD 10.0: bind: Import version 9.16.12. [christos 20210219] OpenSSL: Imported 1.1.1j. [christos 20210219] byacc: Update to 20210109. [christos 20210220] - regex: Add NLS support and gnu regex extensions (off by default). + regex(3): Add NLS support and gnu regex extensions (off by default). [christos 20210223] wpa: Import wpa_supplicant and hostapd 2.9. [christos 20210228] tzcode: Updated to 2021a. [christos 20210228] @@ -346,7 +346,7 @@ Changes from NetBSD 9.0 to NetBSD 10.0: evbppc: Add support for DHT Walnut 405GP evaluation board. [rin 20210402] acpi(4): Updated ACPICA to 20210331. [christos 20210403] - libevent: Import libevent 2.1.12 [christos 20210406] + event(3): Import libevent 2.1.12 [christos 20210406] services(5), protocols(5): Pull iana-generated services and protocols. [christos 20210408] file(1): Upgraded to 5.40. [christos 20210409] @@ -384,3 +384,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0: m68k: Switch to GCC 10. [mrg 20210619] arm: Switch to GCC 10. [mrg 20210619] uscanner(4): Removed from the tree. [nia 20210629] + acpi(4): Updated ACPICA to 20210604. [christos 20210706]
CVS commit: src/doc
Module Name:src Committed By: christos Date: Tue Jul 6 12:26:03 UTC 2021 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: new acpica To generate a diff of this commit: cvs rdiff -u -r1.1804 -r1.1805 src/doc/3RDPARTY cvs rdiff -u -r1.2813 -r1.2814 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:38:40 UTC 2021 Modified Files: src/lib/libc/arch/alpha/gen: __setjmp14.S _lwp.c makecontext.c swapcontext.S src/lib/libm/arch/alpha: lrint.S Log Message: Ensure that the stack is always 16-byte aligned by rounding sizes as needed. All changes from rin@ except swapcontext.S, which is from me (added symbolic constants to make the code clearer). To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/alpha/gen/__setjmp14.S cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/alpha/gen/_lwp.c cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/alpha/gen/makecontext.c cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/alpha/gen/swapcontext.S cvs rdiff -u -r1.3 -r1.4 src/lib/libm/arch/alpha/lrint.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/alpha/gen/__setjmp14.S diff -u src/lib/libc/arch/alpha/gen/__setjmp14.S:1.8 src/lib/libc/arch/alpha/gen/__setjmp14.S:1.9 --- src/lib/libc/arch/alpha/gen/__setjmp14.S:1.8 Wed Oct 21 01:24:05 2020 +++ src/lib/libc/arch/alpha/gen/__setjmp14.S Tue Jul 6 12:38:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: __setjmp14.S,v 1.8 2020/10/21 01:24:05 thorpej Exp $ */ +/* $NetBSD: __setjmp14.S,v 1.9 2021/07/06 12:38:40 thorpej Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -68,12 +68,12 @@ LEAF(__setjmp14, 1) lda a2, SC_MASK(s0) /* point to mask in sc */ CALL(__sigprocmask14) - lda sp, -24(sp) /* sizeof struct sigaltstack */ + lda sp, -32(sp) /* roundup(sizeof(struct sigaltstack), 16) */ mov zero, a0 mov sp, a1 CALL(__sigaltstack14) ldl t0, 16(sp) /* offset of ss_flags */ - lda sp, 24(sp) /* sizeof struct sigaltstack */ + lda sp, 32(sp) /* pop the sigaltstack */ ldq ra, (SC_REGS+_REG_RA*8)(s0) /* restore return address */ blt v0, botch /* check for error */ and t0, 0x1, t0 /* get SA_ONSTACK flag */ Index: src/lib/libc/arch/alpha/gen/_lwp.c diff -u src/lib/libc/arch/alpha/gen/_lwp.c:1.7 src/lib/libc/arch/alpha/gen/_lwp.c:1.8 --- src/lib/libc/arch/alpha/gen/_lwp.c:1.7 Wed Sep 12 14:13:43 2012 +++ src/lib/libc/arch/alpha/gen/_lwp.c Tue Jul 6 12:38:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: _lwp.c,v 1.7 2012/09/12 14:13:43 manu Exp $ */ +/* $NetBSD: _lwp.c,v 1.8 2021/07/06 12:38:40 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _lwp.c,v 1.7 2012/09/12 14:13:43 manu Exp $"); +__RCSID("$NetBSD: _lwp.c,v 1.8 2021/07/06 12:38:40 thorpej Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -58,7 +58,7 @@ _lwp_makecontext(ucontext_t *u, void (*s gr[_REG_T12] = (unsigned long) start; gr[_REG_RA] = (unsigned long) _lwp_exit; gr[_REG_A0] = (unsigned long) arg; - gr[_REG_SP] = ((unsigned long) (stack_base + stack_size)) & ~0x7; + gr[_REG_SP] = ((unsigned long) (stack_base + stack_size)) & ~0xfUL; gr[_REG_S6] = 0; gr[_REG_UNIQUE] = (unsigned long)private; Index: src/lib/libc/arch/alpha/gen/makecontext.c diff -u src/lib/libc/arch/alpha/gen/makecontext.c:1.6 src/lib/libc/arch/alpha/gen/makecontext.c:1.7 --- src/lib/libc/arch/alpha/gen/makecontext.c:1.6 Tue Sep 20 08:42:29 2011 +++ src/lib/libc/arch/alpha/gen/makecontext.c Tue Jul 6 12:38:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: makecontext.c,v 1.6 2011/09/20 08:42:29 joerg Exp $ */ +/* $NetBSD: makecontext.c,v 1.7 2021/07/06 12:38:40 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: makecontext.c,v 1.6 2011/09/20 08:42:29 joerg Exp $"); +__RCSID("$NetBSD: makecontext.c,v 1.7 2021/07/06 12:38:40 thorpej Exp $"); #endif #include @@ -51,12 +51,14 @@ makecontext(ucontext_t *ucp, void (*func unsigned long *sp; va_list ap; - /* Compute and align stack pointer. */ + /* Compute stack pointer. */ sp = (unsigned long *) - (((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & ~0x7); + ((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); /* Allocate necessary stack space for arguments exceeding a0-5. */ if (argc > 6) sp -= (argc - 6); + /* Align stack pointer. */ + sp = (unsigned long *)((uintptr_t)sp & ~0xfUL); gr[_REG_SP] = (__greg_t)sp; /* Arrange for return via the trampoline code. */ gr[_REG_RA] = (__greg_t)__resumecontext; Index: src/lib/libc/arch/alpha/gen/swapcontext.S diff -u src/lib/libc/arch/alpha/gen/swapcontext.S:1.4 src/lib/libc/arch/alpha/gen/swapcontext.S:1.5 --- src/lib/libc/arch/alpha/gen/swapcontext.S:1.4 Wed Oct 21 01:24:05 2020 +++ src/lib/libc/arch/alpha/gen/swapcontext.S Tue Jul 6 12:38:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.4 2020/10/21 01:24:05 thorpej Exp $ */ +/* $NetBSD: swapcontext.S,v 1.5 2021/07/06 12:38:40 thorpej Exp $ */ /*- * Copyright (c)
CVS commit: src/lib
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:38:40 UTC 2021 Modified Files: src/lib/libc/arch/alpha/gen: __setjmp14.S _lwp.c makecontext.c swapcontext.S src/lib/libm/arch/alpha: lrint.S Log Message: Ensure that the stack is always 16-byte aligned by rounding sizes as needed. All changes from rin@ except swapcontext.S, which is from me (added symbolic constants to make the code clearer). To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/alpha/gen/__setjmp14.S cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/alpha/gen/_lwp.c cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/alpha/gen/makecontext.c cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/alpha/gen/swapcontext.S cvs rdiff -u -r1.3 -r1.4 src/lib/libm/arch/alpha/lrint.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/acpica/dist
Module Name:src Committed By: christos Date: Tue Jul 6 12:23:46 UTC 2021 Modified Files: src/sys/external/bsd/acpica/dist/compiler: aslcompiler.h aslutils.c dtfield.c dtutils.c src/sys/external/bsd/acpica/dist/include: acdisasm.h acpixf.h actbl1.h acutils.h src/sys/external/bsd/acpica/dist/namespace: nsrepair2.c src/sys/external/bsd/acpica/dist/utilities: utdelete.c utprint.c utuuid.c Log Message: merge changes for acpica-20210604 To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 \ src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h cvs rdiff -u -r1.28 -r1.29 \ src/sys/external/bsd/acpica/dist/compiler/aslutils.c cvs rdiff -u -r1.17 -r1.18 \ src/sys/external/bsd/acpica/dist/compiler/dtfield.c cvs rdiff -u -r1.16 -r1.17 \ src/sys/external/bsd/acpica/dist/compiler/dtutils.c cvs rdiff -u -r1.21 -r1.22 \ src/sys/external/bsd/acpica/dist/include/acdisasm.h cvs rdiff -u -r1.29 -r1.30 src/sys/external/bsd/acpica/dist/include/acpixf.h cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/acpica/dist/include/actbl1.h cvs rdiff -u -r1.23 -r1.24 src/sys/external/bsd/acpica/dist/include/acutils.h cvs rdiff -u -r1.17 -r1.18 \ src/sys/external/bsd/acpica/dist/namespace/nsrepair2.c cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/acpica/dist/utilities/utdelete.c cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/acpica/dist/utilities/utprint.c cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/acpica/dist/utilities/utuuid.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/external/bsd/acpica/dist/compiler/aslcompiler.h diff -u src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h:1.18 src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h:1.19 --- src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h:1.18 Sat Apr 3 13:45:02 2021 +++ src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h Tue Jul 6 08:23:46 2021 @@ -1116,6 +1116,10 @@ DbgPrint ( #define ASL_PARSE_OUTPUT1 #define ASL_TREE_OUTPUT 2 +BOOLEAN +UtIsIdInteger ( +UINT8 *Target); + UINT8 UtIsBigEndianMachine ( void); Index: src/sys/external/bsd/acpica/dist/compiler/aslutils.c diff -u src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.28 src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.29 --- src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.28 Sat Apr 3 13:45:02 2021 +++ src/sys/external/bsd/acpica/dist/compiler/aslutils.c Tue Jul 6 08:23:46 2021 @@ -98,6 +98,46 @@ UtIsBigEndianMachine ( } +/*** + * + * FUNCTION:UtIsIdInteger + * + * PARAMETERS: Pointer to an ACPI ID (HID, CID) string + * + * RETURN: TRUE if string is an integer + * FALSE if string is not an integer + * + * DESCRIPTION: Determine whether the input ACPI ID string can be converted to + * an integer value. + * + **/ + +BOOLEAN +UtIsIdInteger ( +UINT8 *Target) +{ +UINT32 i; + + +/* The first three characters of the string must be alphabetic */ + +for (i = 0; i < 3; i++) +{ +if (!isalpha ((int) Target[i])) +{ +break; +} +} + +if (i < 3) +{ +return (TRUE); +} + +return (FALSE); +} + + /** * * FUNCTION:UtQueryForOverwrite Index: src/sys/external/bsd/acpica/dist/compiler/dtfield.c diff -u src/sys/external/bsd/acpica/dist/compiler/dtfield.c:1.17 src/sys/external/bsd/acpica/dist/compiler/dtfield.c:1.18 --- src/sys/external/bsd/acpica/dist/compiler/dtfield.c:1.17 Sat Apr 3 13:45:02 2021 +++ src/sys/external/bsd/acpica/dist/compiler/dtfield.c Tue Jul 6 08:23:46 2021 @@ -326,14 +326,14 @@ DtCompileInteger ( { if (Value != 1) { -DtError (ASL_WARNING, ASL_MSG_RESERVED_VALUE, Field, +DtError (ASL_WARNING, ASL_MSG_RESERVED_FIELD, Field, "Must be one, setting to one"); Value = 1; } } else if (Value != 0) { -DtError (ASL_WARNING, ASL_MSG_RESERVED_VALUE, Field, +DtError (ASL_WARNING, ASL_MSG_RESERVED_FIELD, Field, "Must be zero, setting to zero"); Value = 0; } Index: src/sys/external/bsd/acpica/dist/compiler/dtutils.c diff -u src/sys/external/bsd/acpica/dist/compiler/dtutils.c:1.16 src/sys/external/bsd/acpica/dist/compiler/dtutils.c:1.17 --- src/sys/external/bsd/acpica/dist/compiler/dtutils.c:1.16 Sat Apr 3 13:45:02 2021 +++ src/sys/external/bsd/acpica/dist/compiler/dtutils.c Tue Jul 6 08:23:46 2021 @@ -318,6 +318,7 @@ DtGetFieldType
CVS commit: src/sys/external/bsd/acpica/dist
Module Name:src Committed By: christos Date: Tue Jul 6 12:23:46 UTC 2021 Modified Files: src/sys/external/bsd/acpica/dist/compiler: aslcompiler.h aslutils.c dtfield.c dtutils.c src/sys/external/bsd/acpica/dist/include: acdisasm.h acpixf.h actbl1.h acutils.h src/sys/external/bsd/acpica/dist/namespace: nsrepair2.c src/sys/external/bsd/acpica/dist/utilities: utdelete.c utprint.c utuuid.c Log Message: merge changes for acpica-20210604 To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 \ src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h cvs rdiff -u -r1.28 -r1.29 \ src/sys/external/bsd/acpica/dist/compiler/aslutils.c cvs rdiff -u -r1.17 -r1.18 \ src/sys/external/bsd/acpica/dist/compiler/dtfield.c cvs rdiff -u -r1.16 -r1.17 \ src/sys/external/bsd/acpica/dist/compiler/dtutils.c cvs rdiff -u -r1.21 -r1.22 \ src/sys/external/bsd/acpica/dist/include/acdisasm.h cvs rdiff -u -r1.29 -r1.30 src/sys/external/bsd/acpica/dist/include/acpixf.h cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/acpica/dist/include/actbl1.h cvs rdiff -u -r1.23 -r1.24 src/sys/external/bsd/acpica/dist/include/acutils.h cvs rdiff -u -r1.17 -r1.18 \ src/sys/external/bsd/acpica/dist/namespace/nsrepair2.c cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/acpica/dist/utilities/utdelete.c cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/acpica/dist/utilities/utprint.c cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/acpica/dist/utilities/utuuid.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/alpha
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:20:52 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: vm_machdep.c src/sys/arch/alpha/include: param.h Log Message: - Define STACK_ALIGNBYTES to override the default and ensure that stacks are 16-byte aligned, an assumption made by the compiler and recommended by the Alpha Architecture Handbook. - cpu_lwp_fork(): Ensure 16-byte stack alignment if the caller specified one. Addresses root casue of PR port-alpha/54307 and PR toolchain/56153. Many thanks to rin@ for performing the root cause analysis and testing changes. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/arch/alpha/alpha/vm_machdep.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/include/param.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
Module Name:src Committed By: thorpej Date: Tue Jul 6 12:20:52 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: vm_machdep.c src/sys/arch/alpha/include: param.h Log Message: - Define STACK_ALIGNBYTES to override the default and ensure that stacks are 16-byte aligned, an assumption made by the compiler and recommended by the Alpha Architecture Handbook. - cpu_lwp_fork(): Ensure 16-byte stack alignment if the caller specified one. Addresses root casue of PR port-alpha/54307 and PR toolchain/56153. Many thanks to rin@ for performing the root cause analysis and testing changes. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/arch/alpha/alpha/vm_machdep.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/include/param.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/alpha/vm_machdep.c diff -u src/sys/arch/alpha/alpha/vm_machdep.c:1.119 src/sys/arch/alpha/alpha/vm_machdep.c:1.120 --- src/sys/arch/alpha/alpha/vm_machdep.c:1.119 Sun Jul 4 22:42:35 2021 +++ src/sys/arch/alpha/alpha/vm_machdep.c Tue Jul 6 12:20:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.119 2021/07/04 22:42:35 thorpej Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.120 2021/07/06 12:20:52 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.119 2021/07/04 22:42:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.120 2021/07/06 12:20:52 thorpej Exp $"); #include #include @@ -116,10 +116,12 @@ cpu_lwp_fork(struct lwp *l1, struct lwp * Floating point state from the FP chip has already been saved. */ *pcb2 = *pcb1; - if (stack != NULL) - pcb2->pcb_hw.apcb_usp = (u_long)stack + stacksize; - else + if (stack != NULL) { + pcb2->pcb_hw.apcb_usp = + ((u_long)stack + stacksize) & ~((u_long)STACK_ALIGNBYTES); + } else { pcb2->pcb_hw.apcb_usp = alpha_pal_rdusp(); + } /* * Put l2 on the kernel's page tables until its first trip Index: src/sys/arch/alpha/include/param.h diff -u src/sys/arch/alpha/include/param.h:1.48 src/sys/arch/alpha/include/param.h:1.49 --- src/sys/arch/alpha/include/param.h:1.48 Mon May 31 14:38:55 2021 +++ src/sys/arch/alpha/include/param.h Tue Jul 6 12:20:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.48 2021/05/31 14:38:55 simonb Exp $ */ +/* $NetBSD: param.h,v 1.49 2021/07/06 12:20:52 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -57,6 +57,12 @@ #define ALPHA_PGSHIFT 13 #endif +/* + * Compiler assumes 16 byte stack alignment, per recommendation of + * Alpha Architecture Handbook. + */ +#define STACK_ALIGNBYTES (16 - 1) + #define NBPG (1 << ALPHA_PGSHIFT) /* bytes/page */ #define PGOFSET (NBPG-1) /* byte off. into pg */ #define PGSHIFT ALPHA_PGSHIFT /* LOG2(NBPG) */
Re: CVS commit: src/common/lib/libc/arch/aarch64/atomic
On 04/07/2021 23:11, Joerg Sonnenberger wrote: On Sun, Jul 04, 2021 at 06:55:47AM +, Nick Hudson wrote: Module Name:src Committed By: skrll Date: Sun Jul 4 06:55:47 UTC 2021 Modified Files: src/common/lib/libc/arch/aarch64/atomic: atomic_nand_16.S atomic_nand_32.S atomic_nand_64.S atomic_nand_8.S Log Message: Fix the logic operation for atomic_nand_{8,16,32,64} From the gcc docs the operations are as follows { tmp = *ptr; *ptr = ~(tmp & value); return tmp; } // nand { tmp = ~(*ptr & value); *ptr = tmp; return *ptr; } // nand yes, this is really rather strange. This depends on which GCC version you are looking at. They changed it sometime in the early GCC 4 days. Right... gcc 4.4 which is well before NetBSD had an arm64/aarch64 port. Nick
CVS import: src/sys/external/bsd/acpica/dist
Module Name:src Committed By: christos Date: Tue Jul 6 11:53:01 UTC 2021 Update of /cvsroot/src/sys/external/bsd/acpica/dist In directory ivanova.netbsd.org:/tmp/cvs-serv19767 Log Message: Import acpica-20210604 04 June 2021. Summary of changes for version 20210604: 1) ACPICA kernel-resident subsystem: Cleaned up (delete) the context mutex during local address handler object deletion. Fixed a memory leak caused by the _CID repair function. Added support for PlatformRtMechanism OperationRegion handler. Adds a new utility function, AcpiUtConvertUuidToString. Writing a buffer to a PlatformRtMechanism fieldunit invokes a bidirectional transaction. The input buffer contains 26 bytes containing 9 bytes of status, a command byte and a 16-byte UUID. This change will simply pass this incoming buffer to a handler registered by the OS. 2) iASL Compiler/Disassembler and ACPICA tools: Added full support for the PRMT ACPI table (Platform Runtime Mechanism Table). Includes support in the iASL compiler, the disassembler, and the template generator. Added full support for the BDAT (BIOS Data ACPI Table) ACPI table. Added full support for the RGRT (Regulatory Graphics Resource Table) ACPI table. Added full support for the SVKL (Storage Volume Key Location Table) ACPI table. Header file support from Kuppuswamy Sathyanarayanan . Completed full support for the IVRS (I/O Virtualization Reporting Structure) ACPI table. Added compiler support for IVRS, updated disassembler support. Adds a new utility, UtIsIdInteger, to determine if a HID/CID is an integer or a string. Headers: Added more structs to the CEDT table: CXL fixed memory window structure. ACPI 6.4: MADT: added Multiprocessor Wakeup Mailbox Structure. Status: Vendor Tag: intel Release Tags: acpica-20210604 U src/sys/external/bsd/acpica/dist/changes.txt U src/sys/external/bsd/acpica/dist/Makefile U src/sys/external/bsd/acpica/dist/generate/lint/files.lnt U src/sys/external/bsd/acpica/dist/generate/lint/lint.bat U src/sys/external/bsd/acpica/dist/generate/lint/lset.bat U src/sys/external/bsd/acpica/dist/generate/lint/options.lnt U src/sys/external/bsd/acpica/dist/generate/lint/readme.txt U src/sys/external/bsd/acpica/dist/generate/lint/std16.lnt U src/sys/external/bsd/acpica/dist/generate/lint/std32.lnt U src/sys/external/bsd/acpica/dist/generate/lint/std64.lnt U src/sys/external/bsd/acpica/dist/generate/release/build.sh U src/sys/external/bsd/acpica/dist/generate/release/release.sh U src/sys/external/bsd/acpica/dist/generate/unix/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.common U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.config U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.rules U src/sys/external/bsd/acpica/dist/generate/unix/readme.txt U src/sys/external/bsd/acpica/dist/generate/unix/acpibin/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpidump/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpiexamples/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpiexec/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpihelp/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpisrc/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpixtract/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/iasl/Makefile U src/sys/external/bsd/acpica/dist/common/acfileio.c U src/sys/external/bsd/acpica/dist/common/acgetline.c U src/sys/external/bsd/acpica/dist/common/adfile.c U src/sys/external/bsd/acpica/dist/common/adisasm.c U src/sys/external/bsd/acpica/dist/common/adwalk.c U src/sys/external/bsd/acpica/dist/common/ahids.c U src/sys/external/bsd/acpica/dist/common/ahpredef.c U src/sys/external/bsd/acpica/dist/common/ahtable.c U src/sys/external/bsd/acpica/dist/common/ahuuids.c U src/sys/external/bsd/acpica/dist/common/cmfsize.c U src/sys/external/bsd/acpica/dist/common/dmextern.c U src/sys/external/bsd/acpica/dist/common/dmrestag.c U src/sys/external/bsd/acpica/dist/common/dmswitch.c U src/sys/external/bsd/acpica/dist/common/dmtable.c U src/sys/external/bsd/acpica/dist/common/dmtables.c U src/sys/external/bsd/acpica/dist/common/dmtbdump.c U src/sys/external/bsd/acpica/dist/common/dmtbdump1.c U src/sys/external/bsd/acpica/dist/common/dmtbdump2.c U src/sys/external/bsd/acpica/dist/common/dmtbdump3.c U src/sys/external/bsd/acpica/dist/common/dmtbinfo.c U src/sys/external/bsd/acpica/dist/common/dmtbinfo1.c U src/sys/external/bsd/acpica/dist/common/dmtbinfo2.c U src/sys/external/bsd/acpica/dist/common/dmtbinfo3.c U src/sys/external/bsd/acpica/dist/common/getopt.c U src/sys/external/bsd/acpica/dist/tests/misc/badcode.asl U src/sys/external/bsd/acpica/dist/tests/misc/converterSample.asl U src/sys/external/bsd/acpica/dist/tests/misc/grammar.asl U src/sys/external/bsd/acpica/dist/tests/templates/Makefile U src/sys/external/bsd/acpica/dist/tests/templates/templates.sh U
CVS import: src/sys/external/bsd/acpica/dist
Module Name:src Committed By: christos Date: Tue Jul 6 11:53:01 UTC 2021 Update of /cvsroot/src/sys/external/bsd/acpica/dist In directory ivanova.netbsd.org:/tmp/cvs-serv19767 Log Message: Import acpica-20210604 04 June 2021. Summary of changes for version 20210604: 1) ACPICA kernel-resident subsystem: Cleaned up (delete) the context mutex during local address handler object deletion. Fixed a memory leak caused by the _CID repair function. Added support for PlatformRtMechanism OperationRegion handler. Adds a new utility function, AcpiUtConvertUuidToString. Writing a buffer to a PlatformRtMechanism fieldunit invokes a bidirectional transaction. The input buffer contains 26 bytes containing 9 bytes of status, a command byte and a 16-byte UUID. This change will simply pass this incoming buffer to a handler registered by the OS. 2) iASL Compiler/Disassembler and ACPICA tools: Added full support for the PRMT ACPI table (Platform Runtime Mechanism Table). Includes support in the iASL compiler, the disassembler, and the template generator. Added full support for the BDAT (BIOS Data ACPI Table) ACPI table. Added full support for the RGRT (Regulatory Graphics Resource Table) ACPI table. Added full support for the SVKL (Storage Volume Key Location Table) ACPI table. Header file support from Kuppuswamy Sathyanarayanan . Completed full support for the IVRS (I/O Virtualization Reporting Structure) ACPI table. Added compiler support for IVRS, updated disassembler support. Adds a new utility, UtIsIdInteger, to determine if a HID/CID is an integer or a string. Headers: Added more structs to the CEDT table: CXL fixed memory window structure. ACPI 6.4: MADT: added Multiprocessor Wakeup Mailbox Structure. Status: Vendor Tag: intel Release Tags: acpica-20210604 U src/sys/external/bsd/acpica/dist/changes.txt U src/sys/external/bsd/acpica/dist/Makefile U src/sys/external/bsd/acpica/dist/generate/lint/files.lnt U src/sys/external/bsd/acpica/dist/generate/lint/lint.bat U src/sys/external/bsd/acpica/dist/generate/lint/lset.bat U src/sys/external/bsd/acpica/dist/generate/lint/options.lnt U src/sys/external/bsd/acpica/dist/generate/lint/readme.txt U src/sys/external/bsd/acpica/dist/generate/lint/std16.lnt U src/sys/external/bsd/acpica/dist/generate/lint/std32.lnt U src/sys/external/bsd/acpica/dist/generate/lint/std64.lnt U src/sys/external/bsd/acpica/dist/generate/release/build.sh U src/sys/external/bsd/acpica/dist/generate/release/release.sh U src/sys/external/bsd/acpica/dist/generate/unix/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.common U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.config U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.rules U src/sys/external/bsd/acpica/dist/generate/unix/readme.txt U src/sys/external/bsd/acpica/dist/generate/unix/acpibin/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpidump/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpiexamples/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpiexec/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpihelp/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpisrc/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/acpixtract/Makefile U src/sys/external/bsd/acpica/dist/generate/unix/iasl/Makefile U src/sys/external/bsd/acpica/dist/common/acfileio.c U src/sys/external/bsd/acpica/dist/common/acgetline.c U src/sys/external/bsd/acpica/dist/common/adfile.c U src/sys/external/bsd/acpica/dist/common/adisasm.c U src/sys/external/bsd/acpica/dist/common/adwalk.c U src/sys/external/bsd/acpica/dist/common/ahids.c U src/sys/external/bsd/acpica/dist/common/ahpredef.c U src/sys/external/bsd/acpica/dist/common/ahtable.c U src/sys/external/bsd/acpica/dist/common/ahuuids.c U src/sys/external/bsd/acpica/dist/common/cmfsize.c U src/sys/external/bsd/acpica/dist/common/dmextern.c U src/sys/external/bsd/acpica/dist/common/dmrestag.c U src/sys/external/bsd/acpica/dist/common/dmswitch.c U src/sys/external/bsd/acpica/dist/common/dmtable.c U src/sys/external/bsd/acpica/dist/common/dmtables.c U src/sys/external/bsd/acpica/dist/common/dmtbdump.c U src/sys/external/bsd/acpica/dist/common/dmtbdump1.c U src/sys/external/bsd/acpica/dist/common/dmtbdump2.c U src/sys/external/bsd/acpica/dist/common/dmtbdump3.c U src/sys/external/bsd/acpica/dist/common/dmtbinfo.c U src/sys/external/bsd/acpica/dist/common/dmtbinfo1.c U src/sys/external/bsd/acpica/dist/common/dmtbinfo2.c U src/sys/external/bsd/acpica/dist/common/dmtbinfo3.c U src/sys/external/bsd/acpica/dist/common/getopt.c U src/sys/external/bsd/acpica/dist/tests/misc/badcode.asl U src/sys/external/bsd/acpica/dist/tests/misc/converterSample.asl U src/sys/external/bsd/acpica/dist/tests/misc/grammar.asl U src/sys/external/bsd/acpica/dist/tests/templates/Makefile U src/sys/external/bsd/acpica/dist/tests/templates/templates.sh U
CVS commit: src/distrib/utils/embedded/conf
Module Name:src Committed By: jmcneill Date: Tue Jul 6 11:49:36 UTC 2021 Modified Files: src/distrib/utils/embedded/conf: evbarm.conf evbmips.conf rpi_inst.conf usermode.conf x86.conf Log Message: Disable kernfs on live images -- it is not required. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/distrib/utils/embedded/conf/evbarm.conf cvs rdiff -u -r1.2 -r1.3 src/distrib/utils/embedded/conf/evbmips.conf cvs rdiff -u -r1.17 -r1.18 src/distrib/utils/embedded/conf/rpi_inst.conf cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/embedded/conf/usermode.conf cvs rdiff -u -r1.9 -r1.10 src/distrib/utils/embedded/conf/x86.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/conf/evbarm.conf diff -u src/distrib/utils/embedded/conf/evbarm.conf:1.38 src/distrib/utils/embedded/conf/evbarm.conf:1.39 --- src/distrib/utils/embedded/conf/evbarm.conf:1.38 Wed Dec 23 10:35:18 2020 +++ src/distrib/utils/embedded/conf/evbarm.conf Tue Jul 6 11:49:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: evbarm.conf,v 1.38 2020/12/23 10:35:18 rin Exp $ +# $NetBSD: evbarm.conf,v 1.39 2021/07/06 11:49:36 jmcneill Exp $ # evbarm shared config # image=$HOME/${board}.img @@ -71,7 +71,6 @@ make_fstab_evbarm_gpt() { # See /usr/share/examples/fstab/ for more examples. NAME=${gpt_label_ffs:-netbsd-root} / ffs rw,noatime 1 1 NAME=${gpt_label_boot:-EFI} /boot msdos rw 1 1 -kernfs /kern kernfs rw ptyfs /dev/pts ptyfs rw procfs /proc procfs rw tmpfs /var/shm tmpfs rw,-m1777,-sram%25 @@ -84,7 +83,6 @@ make_fstab_evbarm_normal() { # See /usr/share/examples/fstab/ for more examples. ROOT.a / ffs rw,noatime 1 1 ROOT.e /boot msdos rw 1 1 -kernfs /kern kernfs rw ptyfs /dev/pts ptyfs rw procfs /proc procfs rw tmpfs /var/shm tmpfs rw,-m1777,-sram%25 @@ -100,7 +98,6 @@ make_fstab_evbarm_minwrites() { # See /usr/share/examples/fstab/ for more examples. ROOT.a / ffs rw,log,noatime,nodevmtime 1 1 ROOT.e /boot msdos rw 1 1 -kernfs /kern kernfs rw ptyfs /dev/pts ptyfs rw procfs /proc procfs rw tmpfs /tmp tmpfs rw,-s32M @@ -128,8 +125,6 @@ make_fstab_evbarm() { # Missing mount points from fstab echo "./proc type=dir uname=root gname=wheel mode=0755" \ >> "$tmp/selected_sets" - echo "./kern type=dir uname=root gname=wheel mode=0755" \ - >> "$tmp/selected_sets" } customize_evbarm() { Index: src/distrib/utils/embedded/conf/evbmips.conf diff -u src/distrib/utils/embedded/conf/evbmips.conf:1.2 src/distrib/utils/embedded/conf/evbmips.conf:1.3 --- src/distrib/utils/embedded/conf/evbmips.conf:1.2 Wed Dec 23 10:35:18 2020 +++ src/distrib/utils/embedded/conf/evbmips.conf Tue Jul 6 11:49:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: evbmips.conf,v 1.2 2020/12/23 10:35:18 rin Exp $ +# $NetBSD: evbmips.conf,v 1.3 2021/07/06 11:49:36 jmcneill Exp $ # evbmips shared config # image=$HOME/${board}.img @@ -71,7 +71,6 @@ make_fstab_evbmips_gpt() { # See /usr/share/examples/fstab/ for more examples. NAME=${gpt_label_ffs:-netbsd-root} / ffs rw,noatime 1 1 NAME=${gpt_label_boot:-boot} /boot msdos rw 1 1 -kernfs /kern kernfs rw ptyfs /dev/pts ptyfs rw procfs /proc procfs rw tmpfs /var/shm tmpfs rw,-m1777,-sram%25 @@ -84,7 +83,6 @@ make_fstab_evbmips_normal() { # See /usr/share/examples/fstab/ for more examples. ROOT.a / ffs rw,noatime 1 1 ROOT.e /boot msdos rw 1 1 -kernfs /kern kernfs rw ptyfs /dev/pts ptyfs rw procfs /proc procfs rw tmpfs /var/shm tmpfs rw,-m1777,-sram%25 @@ -100,7 +98,6 @@ make_fstab_evbmips_minwrites() { # See /usr/share/examples/fstab/ for more examples. ROOT.a / ffs rw,log,noatime,nodevmtime 1 1 ROOT.e /boot msdos rw 1 1 -kernfs /kern kernfs rw ptyfs /dev/pts ptyfs rw procfs /proc procfs rw tmpfs /tmp tmpfs rw,-s32M @@ -128,8 +125,6 @@ make_fstab_evbmips() { # Missing mount points from fstab echo "./proc type=dir uname=root gname=wheel mode=0755" \ >> "$tmp/selected_sets" - echo "./kern type=dir uname=root gname=wheel mode=0755" \ - >> "$tmp/selected_sets" } customize_evbmips() { Index: src/distrib/utils/embedded/conf/rpi_inst.conf diff -u src/distrib/utils/embedded/conf/rpi_inst.conf:1.17 src/distrib/utils/embedded/conf/rpi_inst.conf:1.18 --- src/distrib/utils/embedded/conf/rpi_inst.conf:1.17 Tue Dec 1 04:21:10 2020 +++ src/distrib/utils/embedded/conf/rpi_inst.conf Tue Jul 6 11:49:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: rpi_inst.conf,v 1.17 2020/12/01 04:21:10 rin Exp $ +# $NetBSD: rpi_inst.conf,v 1.18 2021/07/06 11:49:36 jmcneill Exp $ # Raspberry Pi customization script used by mkimage # @@ -24,7 +24,7 @@ make_label() { customize() { echo "${bar} creating directories ${bar}" - mkdir ${mnt}/proc ${mnt}/kern + mkdir ${mnt}/proc } make_fstab() { Index: src/distrib/utils/embedded/conf/usermode.conf diff -u
CVS commit: src/distrib/utils/embedded/conf
Module Name:src Committed By: jmcneill Date: Tue Jul 6 11:49:36 UTC 2021 Modified Files: src/distrib/utils/embedded/conf: evbarm.conf evbmips.conf rpi_inst.conf usermode.conf x86.conf Log Message: Disable kernfs on live images -- it is not required. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/distrib/utils/embedded/conf/evbarm.conf cvs rdiff -u -r1.2 -r1.3 src/distrib/utils/embedded/conf/evbmips.conf cvs rdiff -u -r1.17 -r1.18 src/distrib/utils/embedded/conf/rpi_inst.conf cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/embedded/conf/usermode.conf cvs rdiff -u -r1.9 -r1.10 src/distrib/utils/embedded/conf/x86.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/examples/pud/intro
Module Name:src Committed By: jmcneill Date: Tue Jul 6 09:30:07 UTC 2021 Modified Files: src/share/examples/pud/intro: doioctl.c Log Message: build fix To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/examples/pud/intro/doioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/pud/intro/doioctl.c diff -u src/share/examples/pud/intro/doioctl.c:1.1 src/share/examples/pud/intro/doioctl.c:1.2 --- src/share/examples/pud/intro/doioctl.c:1.1 Thu Nov 22 11:28:48 2007 +++ src/share/examples/pud/intro/doioctl.c Tue Jul 6 09:30:07 2021 @@ -1,10 +1,12 @@ -/* $NetBSD: doioctl.c,v 1.1 2007/11/22 11:28:48 pooka Exp $ */ +/* $NetBSD: doioctl.c,v 1.2 2021/07/06 09:30:07 jmcneill Exp $ */ #include #include +#include #include #include +#include #include "common.h"
CVS commit: src/share/examples/pud/intro
Module Name:src Committed By: jmcneill Date: Tue Jul 6 09:30:07 UTC 2021 Modified Files: src/share/examples/pud/intro: doioctl.c Log Message: build fix To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/examples/pud/intro/doioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: christos Date: Tue Jul 6 09:26:47 UTC 2021 Modified Files: src/usr.bin/ftp: fetch.c Log Message: Use raw write(2) instead of fwrite(3) to avoid stream corruption because of the progress bar interrupts. From RVP. To generate a diff of this commit: cvs rdiff -u -r1.232 -r1.233 src/usr.bin/ftp/fetch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/fetch.c diff -u src/usr.bin/ftp/fetch.c:1.232 src/usr.bin/ftp/fetch.c:1.233 --- src/usr.bin/ftp/fetch.c:1.232 Fri Jul 10 20:29:38 2020 +++ src/usr.bin/ftp/fetch.c Tue Jul 6 05:26:47 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fetch.c,v 1.232 2020/07/11 00:29:38 lukem Exp $ */ +/* $NetBSD: fetch.c,v 1.233 2021/07/06 09:26:47 christos Exp $ */ /*- * Copyright (c) 1997-2015 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fetch.c,v 1.232 2020/07/11 00:29:38 lukem Exp $"); +__RCSID("$NetBSD: fetch.c,v 1.233 2021/07/06 09:26:47 christos Exp $"); #endif /* not lint */ /* @@ -138,6 +138,43 @@ static int redirect_loop; ((urltype) == HTTP_URL_T) #endif +/** + * fwrite(3) replacement that just uses write(2). Many stdio implementations + * don't handle interrupts properly and corrupt the output. We are taking + * alarm interrupts because of the progress bar. + * + * Assumes `fp' is pristine with no prior I/O calls on it. + */ +static size_t +maxwrite(const void *buf, size_t size, size_t nmemb, FILE *fp) +{ + const char *p = buf; + ssize_t nwr = 0; + ssize_t n; + int fd = fileno(fp); + + size *= nmemb; /* assume no overflow */ + + while (size > 0) { + if ((n = write(fd, p, size)) == -1) { + switch (errno) { + case EINTR: + case EAGAIN: +#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN + case EWOULDBLOCK: +#endif +continue; + default: +return nwr; + } + } + p += n; + nwr += n; + size -= n; + } + return nwr; +} + /* * Determine if token is the next word in buf (case insensitive). * If so, advance buf past the token and any trailing LWS, and @@ -1650,7 +1687,7 @@ fetch_url(const char *url, const char *p } bytes += flen; bufrem -= flen; -if (fwrite(xferbuf, sizeof(char), flen, fout) +if (maxwrite(xferbuf, sizeof(char), flen, fout) != flen) { warn("Writing `%s'", savefile); goto cleanup_fetch_url;
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: christos Date: Tue Jul 6 09:26:47 UTC 2021 Modified Files: src/usr.bin/ftp: fetch.c Log Message: Use raw write(2) instead of fwrite(3) to avoid stream corruption because of the progress bar interrupts. From RVP. To generate a diff of this commit: cvs rdiff -u -r1.232 -r1.233 src/usr.bin/ftp/fetch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/aarch64/atomic
Module Name:src Committed By: skrll Date: Tue Jul 6 08:31:41 UTC 2021 Modified Files: src/common/lib/libc/arch/aarch64/atomic: atomic_nand_16.S Log Message: One more s/pte/ptr/ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S diff -u src/common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S:1.3 src/common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S:1.4 --- src/common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S:1.3 Sun Jul 4 06:55:47 2021 +++ src/common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S Tue Jul 6 08:31:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_nand_16.S,v 1.3 2021/07/04 06:55:47 skrll Exp $ */ +/* $NetBSD: atomic_nand_16.S,v 1.4 2021/07/06 08:31:41 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ ENTRY_NP(_atomic_nand_16) mov x4, x0 1: ldxrh w0, [x4] /* load old value (*ptr) */ and w3, w0, w1 /* w3 = (*ptr & value) */ - mvn w3, w3 /* w3 = ~(*pte & value) */ + mvn w3, w3 /* w3 = ~(*ptr & value) */ stxrh w2, w3, [x4] /* try to store */ cbnz w2, 2f /* succeed? no, try again */ ret/* return old value */ @@ -58,7 +58,7 @@ ENTRY_NP(_atomic_nand_16_nv) mov x4, x0 /* need r0 for return value */ 1: ldxrh w0, [x4] /* load old value (*ptr) */ and w0, w0, w1 /* w0 = (*ptr & value) */ - mvn w0, w0 /* w0 = ~(*pte & value), return value */ + mvn w0, w0 /* w0 = ~(*ptr & value), return value */ stxrh w2, w0, [x4] /* try to store */ cbnz w2, 2f /* succeed? no, try again? */ ret/* return new value */
CVS commit: src/common/lib/libc/arch/aarch64/atomic
Module Name:src Committed By: skrll Date: Tue Jul 6 08:31:41 UTC 2021 Modified Files: src/common/lib/libc/arch/aarch64/atomic: atomic_nand_16.S Log Message: One more s/pte/ptr/ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Tue Jul 6 08:34:28 UTC 2021 Modified Files: src/sys/arch/arm/arm32: cpu.c Log Message: Assume all ARM11[37]6 r0 variants are missing ISAR and friends. This is certainly the case for r0 variants I could find TRMs for. PR/50596 CPU_ID_ARM1136JS r0p4 does not support feature registers To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/arch/arm/arm32/cpu.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/arm/arm32/cpu.c diff -u src/sys/arch/arm/arm32/cpu.c:1.147 src/sys/arch/arm/arm32/cpu.c:1.148 --- src/sys/arch/arm/arm32/cpu.c:1.147 Thu Jul 2 11:49:48 2020 +++ src/sys/arch/arm/arm32/cpu.c Tue Jul 6 08:34:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.147 2020/07/02 11:49:48 martin Exp $ */ +/* $NetBSD: cpu.c,v 1.148 2021/07/06 08:34:28 skrll Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe. @@ -46,7 +46,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.147 2020/07/02 11:49:48 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.148 2021/07/06 08:34:28 skrll Exp $"); #include @@ -739,7 +739,10 @@ identify_arm_cpu(device_t dv, struct cpu aprint_normal("\n"); if (CPU_ID_CORTEX_P(arm_cpuid) || CPU_ID_ARM11_P(arm_cpuid) || CPU_ID_MV88SV58XX_P(arm_cpuid)) { - identify_features(dv); + if ((arm_cpuid & CPU_ID_CPU_MASK) != CPU_ID_ARM1136JS && + (arm_cpuid & CPU_ID_CPU_MASK) != CPU_ID_ARM1176JZS) { + identify_features(dv); + } } /* Print cache info. */
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Tue Jul 6 08:34:28 UTC 2021 Modified Files: src/sys/arch/arm/arm32: cpu.c Log Message: Assume all ARM11[37]6 r0 variants are missing ISAR and friends. This is certainly the case for r0 variants I could find TRMs for. PR/50596 CPU_ID_ARM1136JS r0p4 does not support feature registers To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/arch/arm/arm32/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 06:38:29 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: gcc_attribute.c Log Message: tests/lint: document wrong handling of GCC __attribute__ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/gcc_attribute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Jul 6 06:38:29 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: gcc_attribute.c Log Message: tests/lint: document wrong handling of GCC __attribute__ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/gcc_attribute.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/usr.bin/xlint/lint1/gcc_attribute.c diff -u src/tests/usr.bin/xlint/lint1/gcc_attribute.c:1.5 src/tests/usr.bin/xlint/lint1/gcc_attribute.c:1.6 --- src/tests/usr.bin/xlint/lint1/gcc_attribute.c:1.5 Mon May 3 07:08:54 2021 +++ src/tests/usr.bin/xlint/lint1/gcc_attribute.c Tue Jul 6 06:38:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gcc_attribute.c,v 1.5 2021/05/03 07:08:54 rillig Exp $ */ +/* $NetBSD: gcc_attribute.c,v 1.6 2021/07/06 06:38:29 rillig Exp $ */ # 3 "gcc_attribute.c" /* @@ -53,3 +53,21 @@ local_variable_pcs(void) int pcs = 3; return pcs; } + +/* + * FIXME: The attributes are handled by different grammar rules even though + * they occur in the same syntactical position. + * + * Grammar rule abstract_decl_param_list handles the first attribute. + * + * Grammar rule direct_abstract_declarator handles all remaining attributes. + * + * Since abstract_decl_param_list contains type_attribute_opt, this could be + * the source of the many shift/reduce conflicts in the grammar. + */ +int +func( +int(int) +__attribute__((__noreturn__)) +__attribute__((__noreturn__)) +);