diff options
Diffstat (limited to 'arch/x86/tools')
-rw-r--r-- | arch/x86/tools/gen-insn-attr-x86.awk | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/tools/gen-insn-attr-x86.awk b/arch/x86/tools/gen-insn-attr-x86.awk index e34e92a28eb6..7a6850683c34 100644 --- a/arch/x86/tools/gen-insn-attr-x86.awk +++ b/arch/x86/tools/gen-insn-attr-x86.awk | |||
@@ -226,12 +226,12 @@ function add_flags(old,new) { | |||
226 | } | 226 | } |
227 | 227 | ||
228 | # convert operands to flags. | 228 | # convert operands to flags. |
229 | function convert_operands(opnd, i,imm,mod) | 229 | function convert_operands(count,opnd, i,j,imm,mod) |
230 | { | 230 | { |
231 | imm = null | 231 | imm = null |
232 | mod = null | 232 | mod = null |
233 | for (i in opnd) { | 233 | for (j = 1; j <= count; j++) { |
234 | i = opnd[i] | 234 | i = opnd[j] |
235 | if (match(i, imm_expr) == 1) { | 235 | if (match(i, imm_expr) == 1) { |
236 | if (!imm_flag[i]) | 236 | if (!imm_flag[i]) |
237 | semantic_error("Unknown imm opnd: " i) | 237 | semantic_error("Unknown imm opnd: " i) |
@@ -282,8 +282,8 @@ function convert_operands(opnd, i,imm,mod) | |||
282 | # parse one opcode | 282 | # parse one opcode |
283 | if (match($i, opnd_expr)) { | 283 | if (match($i, opnd_expr)) { |
284 | opnd = $i | 284 | opnd = $i |
285 | split($(i++), opnds, ",") | 285 | count = split($(i++), opnds, ",") |
286 | flags = convert_operands(opnds) | 286 | flags = convert_operands(count, opnds) |
287 | } | 287 | } |
288 | if (match($i, ext_expr)) | 288 | if (match($i, ext_expr)) |
289 | ext = $(i++) | 289 | ext = $(i++) |