Module Name:    src
Committed By:   rillig
Date:           Wed Aug 25 22:48:40 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y lex.c

Log Message:
lint: add __attribute__ regparm

Seen in libexec/ld.elf_so/rtld.h.


To generate a diff of this commit:
cvs rdiff -u -r1.357 -r1.358 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.69 -r1.70 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/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.357 src/usr.bin/xlint/lint1/cgram.y:1.358
--- src/usr.bin/xlint/lint1/cgram.y:1.357	Sat Aug 21 07:03:30 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Wed Aug 25 22:48:40 2021
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.357 2021/08/21 07:03:30 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.358 2021/08/25 22:48:40 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.357 2021/08/21 07:03:30 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.358 2021/08/25 22:48:40 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -248,6 +248,7 @@ anonymize(sym_t *s)
 %token			T_AT_PACKED
 %token			T_AT_PCS
 %token			T_AT_PURE
+%token			T_AT_REGPARM
 %token			T_AT_RETURNS_NONNULL
 %token			T_AT_RETURNS_TWICE
 %token			T_AT_SECTION
@@ -2077,6 +2078,7 @@ gcc_attribute_spec:
 	  }
 	| T_AT_PCS T_LPAREN string T_RPAREN
 	| T_AT_PURE
+	| T_AT_REGPARM T_LPAREN constant_expr T_RPAREN
 	| T_AT_RETURNS_NONNULL
 	| T_AT_RETURNS_TWICE
 	| T_AT_SECTION T_LPAREN string T_RPAREN

Index: src/usr.bin/xlint/lint1/lex.c
diff -u src/usr.bin/xlint/lint1/lex.c:1.69 src/usr.bin/xlint/lint1/lex.c:1.70
--- src/usr.bin/xlint/lint1/lex.c:1.69	Mon Aug 23 06:26:37 2021
+++ src/usr.bin/xlint/lint1/lex.c	Wed Aug 25 22:48:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.69 2021/08/23 06:26:37 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.70 2021/08/25 22:48:40 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.69 2021/08/23 06:26:37 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.70 2021/08/25 22:48:40 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -205,6 +205,7 @@ static	struct	kwtab {
 	kwdef_gcc_attr(	"pure",		T_AT_PURE),
 	kwdef_token(	"__real__",	T_REAL,			0,0,1,0,1),
 	kwdef_sclass(	"register",	REG,			0,0,0,0,1),
+	kwdef_gcc_attr(	"regparm",	T_AT_REGPARM),
 	kwdef_tqual(	"restrict",	RESTRICT,		0,1,0,0,5),
 	kwdef_keyword(	"return",	T_RETURN),
 	kwdef_gcc_attr(	"returns_nonnull",T_AT_RETURNS_NONNULL),

Reply via email to