Skip to content

Commit c825840

Browse files
committed
genksyms: fix syntax error for builtin (u)int*x*_t types
A longstanding issue with genksyms is that it has hidden syntax errors. When a syntax error occurs, yyerror() is called. However, error_with_pos() is a no-op unless the -w option is provided. You can observe syntax errors by manually passing the -w option. For example, genksyms fails to parse the following code in arch/arm64/lib/xor-neon.c: static inline uint64x2_t eor3(uint64x2_t p, uint64x2_t q, uint64x2_t r) { [ snip ] } The syntax error occurs because genksyms does not recognize the uint64x2_t keyword. This commit adds support for builtin types described in Arm Neon Intrinsics Reference. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Nicolas Schier <n.schier@avm.de>
1 parent 6494bd2 commit c825840

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/genksyms/lex.l

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>)
5151
5252
%%
5353
54+
u?int(8|16|32|64)x(1|2|4|8|16)_t return BUILTIN_INT_KEYW;
5455
5556
/* Keep track of our location in the original source files. */
5657
^#[ \t]+{INT}[ \t]+\"[^\"\n]+\".*\n return FILENAME;

0 commit comments

Comments
 (0)