Module Name:    src
Committed By:   martin
Date:           Mon Jan  6 10:46:44 UTC 2025

Modified Files:
        src/sys/arch/hppa/include: asm.h
        src/sys/arch/ia64/include: asm.h
        src/sys/arch/m68k/include: asm.h
        src/sys/arch/mips/include: asm.h
        src/sys/arch/or1k/include: asm.h
        src/sys/arch/powerpc/include: asm.h
        src/sys/arch/riscv/include: asm.h
        src/sys/arch/sh3/include: asm.h
        src/sys/arch/sparc/include: asm.h
        src/sys/arch/vax/include: asm.h

Log Message:
PR 58960: fix misunderstanding in semantic and provide both the original
id string as well as _NETBSD_REVISIONID.
Do not rely on string concatenation in the inline assembler, use .ascii
and .asciz for individual string parts instead.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hppa/include/asm.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/include/asm.h
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/m68k/include/asm.h
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/mips/include/asm.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/or1k/include/asm.h
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/powerpc/include/asm.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/riscv/include/asm.h
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sh3/include/asm.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sparc/include/asm.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/vax/include/asm.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/hppa/include/asm.h
diff -u src/sys/arch/hppa/include/asm.h:1.19 src/sys/arch/hppa/include/asm.h:1.20
--- src/sys/arch/hppa/include/asm.h:1.19	Sat Jan  4 21:10:19 2025
+++ src/sys/arch/hppa/include/asm.h	Mon Jan  6 10:46:43 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.19 2025/01/04 21:10:19 skrll Exp $	*/
+/*	$NetBSD: asm.h,v 1.20 2025/01/06 10:46:43 martin Exp $	*/
 
 /*	$OpenBSD: asm.h,v 1.12 2001/03/29 02:15:57 mickey Exp $	*/
 
@@ -101,8 +101,10 @@
 
 #ifdef _NETBSD_REVISIONID
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Index: src/sys/arch/ia64/include/asm.h
diff -u src/sys/arch/ia64/include/asm.h:1.10 src/sys/arch/ia64/include/asm.h:1.11
--- src/sys/arch/ia64/include/asm.h:1.10	Sat Jan  4 19:09:13 2025
+++ src/sys/arch/ia64/include/asm.h	Mon Jan  6 10:46:44 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.10 2025/01/04 19:09:13 martin Exp $	*/
+/*	$NetBSD: asm.h,v 1.11 2025/01/06 10:46:44 martin Exp $	*/
 
 /* -
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -205,8 +205,10 @@ label:	ASCIZ msg;				\
 #ifdef __ELF__
 #ifdef _NETBSD_REVISIONID
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__ 			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Index: src/sys/arch/m68k/include/asm.h
diff -u src/sys/arch/m68k/include/asm.h:1.36 src/sys/arch/m68k/include/asm.h:1.37
--- src/sys/arch/m68k/include/asm.h:1.36	Sat Jan  4 19:17:58 2025
+++ src/sys/arch/m68k/include/asm.h	Mon Jan  6 10:46:44 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.36 2025/01/04 19:17:58 martin Exp $	*/
+/*	$NetBSD: asm.h,v 1.37 2025/01/06 10:46:44 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -141,8 +141,10 @@
 
 #ifdef _NETBSD_REVISIONID
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__ 			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Index: src/sys/arch/mips/include/asm.h
diff -u src/sys/arch/mips/include/asm.h:1.76 src/sys/arch/mips/include/asm.h:1.77
--- src/sys/arch/mips/include/asm.h:1.76	Sat Jan  4 19:29:44 2025
+++ src/sys/arch/mips/include/asm.h	Mon Jan  6 10:46:43 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.76 2025/01/04 19:29:44 martin Exp $	*/
+/*	$NetBSD: asm.h,v 1.77 2025/01/06 10:46:43 martin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -348,8 +348,10 @@ _C_LABEL(x):
 
 #ifdef _NETBSD_REVISIONID
 #define	RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__ 			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define	RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Index: src/sys/arch/or1k/include/asm.h
diff -u src/sys/arch/or1k/include/asm.h:1.3 src/sys/arch/or1k/include/asm.h:1.4
--- src/sys/arch/or1k/include/asm.h:1.3	Sun Jan  5 16:52:19 2025
+++ src/sys/arch/or1k/include/asm.h	Mon Jan  6 10:46:43 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.3 2025/01/05 16:52:19 martin Exp $ */
+/* $NetBSD: asm.h,v 1.4 2025/01/06 10:46:43 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -85,8 +85,10 @@
 
 #ifdef _NETBSD_REVISIONID
 #define __RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define __RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Index: src/sys/arch/powerpc/include/asm.h
diff -u src/sys/arch/powerpc/include/asm.h:1.55 src/sys/arch/powerpc/include/asm.h:1.56
--- src/sys/arch/powerpc/include/asm.h:1.55	Sat Jan  4 18:37:23 2025
+++ src/sys/arch/powerpc/include/asm.h	Mon Jan  6 10:46:44 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.55 2025/01/04 18:37:23 martin Exp $	*/
+/*	$NetBSD: asm.h,v 1.56 2025/01/06 10:46:44 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -159,8 +159,10 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 #define RCSID(x)	__RCSID(x)
 #ifdef _NETBSD_REVISIONID
 #define __RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__ 			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define __RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Index: src/sys/arch/riscv/include/asm.h
diff -u src/sys/arch/riscv/include/asm.h:1.10 src/sys/arch/riscv/include/asm.h:1.11
--- src/sys/arch/riscv/include/asm.h:1.10	Sun Jan  5 15:08:59 2025
+++ src/sys/arch/riscv/include/asm.h	Mon Jan  6 10:46:43 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.10 2025/01/05 15:08:59 martin Exp $	*/
+/*	$NetBSD: asm.h,v 1.11 2025/01/06 10:46:43 martin Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -123,8 +123,10 @@
 
 #ifdef _NETBSD_REVISIONID
 #define __RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define __RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Index: src/sys/arch/sh3/include/asm.h
diff -u src/sys/arch/sh3/include/asm.h:1.30 src/sys/arch/sh3/include/asm.h:1.31
--- src/sys/arch/sh3/include/asm.h:1.30	Sat Jan  4 18:28:16 2025
+++ src/sys/arch/sh3/include/asm.h	Mon Jan  6 10:46:44 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.30 2025/01/04 18:28:16 martin Exp $	*/
+/*	$NetBSD: asm.h,v 1.31 2025/01/06 10:46:44 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -205,8 +205,10 @@
 #ifdef __ELF__
 #ifdef _NETBSD_REVISIONID
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__ 			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Index: src/sys/arch/sparc/include/asm.h
diff -u src/sys/arch/sparc/include/asm.h:1.24 src/sys/arch/sparc/include/asm.h:1.25
--- src/sys/arch/sparc/include/asm.h:1.24	Sat Jan  4 18:45:23 2025
+++ src/sys/arch/sparc/include/asm.h	Mon Jan  6 10:46:44 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.24 2025/01/04 18:45:23 martin Exp $ */
+/*	$NetBSD: asm.h,v 1.25 2025/01/06 10:46:44 martin Exp $ */
 
 /*
  * Copyright (c) 1994 Allen Briggs
@@ -159,8 +159,10 @@
 #ifdef __ELF__
 #ifdef _NETBSD_REVISIONID
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__ 			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Index: src/sys/arch/vax/include/asm.h
diff -u src/sys/arch/vax/include/asm.h:1.29 src/sys/arch/vax/include/asm.h:1.30
--- src/sys/arch/vax/include/asm.h:1.29	Sat Jan  4 19:02:51 2025
+++ src/sys/arch/vax/include/asm.h	Mon Jan  6 10:46:44 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.29 2025/01/04 19:02:51 martin Exp $ */
+/*	$NetBSD: asm.h,v 1.30 2025/01/06 10:46:44 martin Exp $ */
 /*
  * Copyright (c) 1982, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -81,8 +81,10 @@
 #define ALTENTRY(x)		.globl _C_LABEL(x); _C_LABEL(x):
 #ifdef _NETBSD_REVISIONID
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
-			.asciz "$" "NetBSD: " __FILE__ 			\
-			    " " _NETBSD_REVISIONID " $";		\
+			.asciz x;					\
+			.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+			.ascii " "; .ascii _NETBSD_REVISIONID;		\
+			.asciz " $";					\
 			.popsection
 #else
 #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\

Reply via email to