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])"
76 # All opcodes starting with lower-case 'v', 'k' or with (v1) superscript
86 prefix_num["Operand-Size"] = "INAT_PFX_OPNDSZ"
98 prefix_num["Address-Size"] = "INAT_PFX_ADDRSZ"
148 if (aid == -1 && eid == -1) # primary opcode table
172 if (gid != -1) {
260 /^[0-9a-f]+:/ {
264 idx = "0x" substr($1, 1, index($1,":") - 1)
289 ext = null
299 ext = $(i++)
314 if (match(ext, force64_expr))
326 if (match(ext, evexonly_expr))
328 else if (match(ext, vexonly_expr))
330 else if (match(ext, vexok_expr) || match(opcode, vexok_opcode_expr))
334 if (match(ext, prefix_expr)) {
342 if (match(ext, lprefix1_expr)) {
346 if (match(ext, lprefix2_expr)) {
350 if (match(ext, lprefix3_expr)) {
354 if (!match(ext, lprefix_expr)){