useful when skipping functions
*
* This work is licensed under the terms of 3-clause BSD license.
* See COPYING file in the top-level directory.
*
* This work is licensed under the terms of 3-clause BSD license.
* See COPYING file in the top-level directory.
// datap:
// OP_CALL - parser proto hint (str)
// datap:
// OP_CALL - parser proto hint (str)
-// (OPF_CC) - point to one of (OPF_FLAGS) that affects cc op
-// OP_POP - point to OP_PUSH in push/pop pair
+// (OPF_CC) - points to one of (OPF_FLAGS) that affects cc op
+// OP_POP - points to OP_PUSH in push/pop pair
struct parsed_equ {
char name[64];
struct parsed_equ {
char name[64];
// mmx
{ "emms", OP_EMMS, 0, 0, OPF_DATA },
{ "movq", OP_MOV, 2, 2, OPF_DATA },
// mmx
{ "emms", OP_EMMS, 0, 0, OPF_DATA },
{ "movq", OP_MOV, 2, 2, OPF_DATA },
+ // must be last
+ { "ud2", OP_UD2 },
};
static void parse_op(struct parsed_op *op, char words[16][256], int wordc)
};
static void parse_op(struct parsed_op *op, char words[16][256], int wordc)
- if (i == ARRAY_SIZE(op_table))
- aerr("unhandled op: '%s'\n", words[0]);
+ if (i == ARRAY_SIZE(op_table)) {
+ anote("unhandled op: '%s'\n", words[0]);
+ i--; // OP_UD2
+ }
w++;
op->op = op_table[i].op;
w++;
op->op = op_table[i].op;
op->regmask_src = op->regmask_dst = 0;
op->asmln = asmln;
op->regmask_src = op->regmask_dst = 0;
op->asmln = asmln;
+ if (op->op == OP_UD2)
+ return;
+
for (opr = 0; opr < op_table[i].maxopr; opr++) {
if (opr >= op_table[i].minopr && w >= wordc)
break;
for (opr = 0; opr < op_table[i].maxopr; opr++) {
if (opr >= op_table[i].minopr && w >= wordc)
break;