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@cisco.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <adabphy750b.fsf@roland-alpha.cisco.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
Roland Dreier 2009-12-16 17:39:48 -08:00 committed by H. Peter Anvin
parent c051346b7d
commit 4beb3d6d14

View file

@ -6,8 +6,6 @@
# Awk implementation sanity check # Awk implementation sanity check
function check_awk_implement() { function check_awk_implement() {
if (!match("abc", "[[:lower:]]+"))
return "Your awk doesn't support charactor-class."
if (sprintf("%x", 0) != "0") if (sprintf("%x", 0) != "0")
return "Your awk has a printf-format problem." return "Your awk has a printf-format problem."
return "" return ""
@ -44,12 +42,12 @@ BEGIN {
delete gtable delete gtable
delete atable delete atable
opnd_expr = "^[[:alpha:]/]" opnd_expr = "^[A-Za-z/]"
ext_expr = "^\\(" ext_expr = "^\\("
sep_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["Ib"] = "INAT_MAKE_IMM(INAT_IMM_BYTE)"
imm_flag["Jb"] = "INAT_MAKE_IMM(INAT_IMM_BYTE)" imm_flag["Jb"] = "INAT_MAKE_IMM(INAT_IMM_BYTE)"
imm_flag["Iw"] = "INAT_MAKE_IMM(INAT_IMM_WORD)" imm_flag["Iw"] = "INAT_MAKE_IMM(INAT_IMM_WORD)"
@ -62,7 +60,7 @@ BEGIN {
imm_flag["Ob"] = "INAT_MOFFSET" imm_flag["Ob"] = "INAT_MOFFSET"
imm_flag["Ov"] = "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\\)" force64_expr = "\\([df]64\\)"
rex_expr = "^REX(\\.[XRWB]+)*" rex_expr = "^REX(\\.[XRWB]+)*"
fpu_expr = "^ESC" # TODO fpu_expr = "^ESC" # TODO