All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gen-insn-attr-x86.awk: Fix regexp warnings
@ 2019-09-21 11:37 Alexander Kapshuk
  2019-09-22  8:33 ` kbuild test robot
  0 siblings, 1 reply; 13+ messages in thread
From: Alexander Kapshuk @ 2019-09-21 11:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, mingo, bp, hpa, x86, Alexander Kapshuk

This patch fixes the regexp warnings shown below:
  GEN      /home/sasha/torvalds/tools/objtool/arch/x86/lib/inat-tables.c
awk: ../arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape sequence `\:' is not a known regexp operator
awk: ../arch/x86/tools/gen-insn-attr-x86.awk:350: (FILENAME=../arch/x86/lib/x86-opcode-map.txt FNR=41) warning: regexp escape sequence `\&' is not a known regexp operator

The ':' and '&' characters need not escaping when used in string constants
as part of regular expressions.

[Test-run]
awk -f /home/sasha/torvalds/arch/x86/tools/gen-insn-attr-x86.awk \
	/home/sasha/torvalds/arch/x86/lib/x86-opcode-map.txt >tmp/inat-tables.c

diff -U0 /home/sasha/torvalds/tools/objtool/arch/x86/lib/inat-tables.c \
tmp/inat-tables.c; echo $?
0

[Debugging output]
DBG:ext:(66&F2)
DBG:match(ext, ...):(66&F2)
DBG:match(..., lprefix3_expr):\((F2|!F3|66&F2)\)

Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
---
 arch/x86/tools/gen-insn-attr-x86.awk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/tools/gen-insn-attr-x86.awk b/arch/x86/tools/gen-insn-attr-x86.awk
index b02a36b2c14f..a42015b305f4 100644
--- a/arch/x86/tools/gen-insn-attr-x86.awk
+++ b/arch/x86/tools/gen-insn-attr-x86.awk
@@ -69,7 +69,7 @@ BEGIN {

 	lprefix1_expr = "\\((66|!F3)\\)"
 	lprefix2_expr = "\\(F3\\)"
-	lprefix3_expr = "\\((F2|!F3|66\\&F2)\\)"
+	lprefix3_expr = "\\((F2|!F3|66&F2)\\)"
 	lprefix_expr = "\\((66|F2|F3)\\)"
 	max_lprefix = 4

@@ -257,7 +257,7 @@ function convert_operands(count,opnd,       i,j,imm,mod)
 	return add_flags(imm, mod)
 }

-/^[0-9a-f]+\:/ {
+/^[0-9a-f]+:/ {
 	if (NR == 1)
 		next
 	# get index
--
2.23.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-10-01 10:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-21 11:37 [PATCH] gen-insn-attr-x86.awk: Fix regexp warnings Alexander Kapshuk
2019-09-22  8:33 ` kbuild test robot
2019-09-22 15:03   ` [PATCH RESEND] " Alexander Kapshuk
2019-09-23  9:19     ` Borislav Petkov
2019-09-23  9:56       ` Alexander Kapshuk
2019-09-23 10:27         ` Borislav Petkov
2019-09-23 10:31     ` Borislav Petkov
2019-09-23 10:54       ` Alexander Kapshuk
2019-09-23 18:49       ` Masami Hiramatsu
2019-09-24  4:46         ` Alexander Kapshuk
2019-09-30  5:34           ` Borislav Petkov
2019-09-30  5:48             ` Alexander Kapshuk
2019-10-01 10:19           ` [tip: core/objtool] x86/insn: Fix awk " tip-bot2 for Alexander Kapshuk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.