[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B2A3071.9000003@redhat.com>
Date: Thu, 17 Dec 2009 08:21:53 -0500
From: Masami Hiramatsu <mhiramat@...hat.com>
To: Roland Dreier <rdreier@...co.com>
CC: Andrew Isaacson <adi@...are.com>, Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
Rob Landley <rob@...dley.net>
Subject: Re: CONFIG_KPROBES=y build requires gawk
Roland Dreier wrote:
> Is there any reason not to apply the patch below, to allow more awk
> implementations to be used? After all, it's not like we're going to put
> non-ASCII characters into the map file...
>
> ===
>
> x86: Don't use POSIX character classes in gen-insn-attr-x86.awk
>
> Not all awk implementations (including the default awk in Ubuntu 9.10)
> support POSIX character classes. Since x86-opcode-map.txt is plain
> ASCII, we can just use explicit ranges for lower case, alphabetic, and
> alphanumeric characters instead.
>
> Signed-off-by: Roland Dreier <rolandd@...co.com>
As far as Peter's LC_* patch is accepted:), this looks good to me.
Thank you for fixing and discussing that!
Acked-by: Masami Hiramatsu <mhiramat@...hat.com>
> ---
> arch/x86/tools/gen-insn-attr-x86.awk | 10 ++++------
> 1 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/tools/gen-insn-attr-x86.awk b/arch/x86/tools/gen-insn-attr-x86.awk
> index 7a68506..eaf11f5 100644
> --- a/arch/x86/tools/gen-insn-attr-x86.awk
> +++ b/arch/x86/tools/gen-insn-attr-x86.awk
> @@ -6,8 +6,6 @@
>
> # Awk implementation sanity check
> function check_awk_implement() {
> - if (!match("abc", "[[:lower:]]+"))
> - return "Your awk doesn't support charactor-class."
> if (sprintf("%x", 0) != "0")
> return "Your awk has a printf-format problem."
> return ""
> @@ -44,12 +42,12 @@ BEGIN {
> delete gtable
> delete atable
>
> - opnd_expr = "^[[:alpha:]/]"
> + opnd_expr = "^[A-Za-z/]"
> ext_expr = "^\\("
> sep_expr = "^\\|$"
> - group_expr = "^Grp[[:alnum:]]+"
> + group_expr = "^Grp[0-9A-Za-z]+"
>
> - imm_expr = "^[IJAO][[:lower:]]"
> + imm_expr = "^[IJAO][a-z]"
> imm_flag["Ib"] = "INAT_MAKE_IMM(INAT_IMM_BYTE)"
> imm_flag["Jb"] = "INAT_MAKE_IMM(INAT_IMM_BYTE)"
> imm_flag["Iw"] = "INAT_MAKE_IMM(INAT_IMM_WORD)"
> @@ -62,7 +60,7 @@ BEGIN {
> imm_flag["Ob"] = "INAT_MOFFSET"
> imm_flag["Ov"] = "INAT_MOFFSET"
>
> - modrm_expr = "^([CDEGMNPQRSUVW/][[:lower:]]+|NTA|T[012])"
> + modrm_expr = "^([CDEGMNPQRSUVW/][a-z]+|NTA|T[012])"
> force64_expr = "\\([df]64\\)"
> rex_expr = "^REX(\\.[XRWB]+)*"
> fpu_expr = "^ESC" # TODO
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists