lkml.org 
[lkml]   [2020]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch: Check for .byte-spelled insn opcodes documentation on x86
On Sat, Oct 10, 2020 at 08:27:20AM -0700, Joe Perches wrote:
> Then this could use:
>
> /"\s*\.byte\s+(?:0x[0-9a-fA-F]{1,2}\s*,\s*){2,4}/

Yes, this is getting close.

I've tweaked it a bit to:

'/\s*\.byte\s+(?:0x[0-9a-f]{1,2}[\s,]*){2,}/i'

which assumes at least 2 opcode bytes; upper limit can be more than 4.
It still has some false positives in crypto but I'd say that's good
enough. I'll play more with it later.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2020-10-11 00:56    [W:0.143 / U:1.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site