Lines Matching +full:ext +full:- +full:gen
1 #!/bin/awk -f
2 # SPDX-License-Identifier: GPL-2.0
3 # gen-insn-attr-x86.awk: Instruction attribute table generator
6 # Usage: awk -f gen-insn-attr-x86.awk x86-opcode-map.txt > inat-tables.c
11 return "Your awk has a printf-format problem."
21 eid = -1 # escape id
22 gid = -1 # group id
23 aid = -1 # AVX id
37 print "/* x86 opcode map generated from x86-opcode-map.txt */"
46 opnd_expr = "^[A-Za-z/]"
49 group_expr = "^Grp[0-9A-Za-z]+"
51 imm_expr = "^[IJAOL][a-z]"
65 modrm_expr = "^([CDEGMNPQRSUVW/][a-z]+|NTA|T[012])"
78 # All opcodes starting with lower-case 'v', 'k' or with (v1) superscript
90 prefix_num["Operand-Size"] = "INAT_PFX_OPNDSZ"
102 prefix_num["Address-Size"] = "INAT_PFX_ADDRSZ"
153 if (aid == -1 && eid == -1) # primary opcode table
177 if (gid != -1) {
265 /^[0-9a-f]+:/ {
269 idx = "0x" substr($1, 1, index($1,":") - 1)
294 ext = null
304 ext = $(i++)
319 if (match(ext, force64_expr))
323 if (match(ext, no_rex2_expr))
335 if (match(ext, evexonly_expr))
337 else if (match(ext, evex_scalable_expr))
339 else if (match(ext, vexonly_expr))
341 else if (match(ext, vexok_expr) || match(opcode, vexok_opcode_expr))
345 if (match(ext, prefix_expr)) {
353 if (match(ext, lprefix1_expr)) {
357 if (match(ext, lprefix2_expr)) {
361 if (match(ext, lprefix3_expr)) {
365 if (match(ext, rex2_expr))
367 if (!match(ext, lprefix_expr)){