Lines Matching defs:dat
22 #include "insn-x86-dat-32.c"
29 #include "insn-x86-dat-64.c"
100 static int test_data_item(const struct test_data *dat, int x86_64)
106 ret = insn_decode(&insn, dat->data, MAX_INSN_SIZE,
109 pr_debug("Failed to decode: %s\n", dat->asm_rep);
113 if (insn.length != dat->expected_length) {
115 insn.length, dat->expected_length, dat->asm_rep);
119 op = get_op(dat->expected_op_str);
120 branch = get_branch(dat->expected_branch_str);
122 if (intel_pt_get_insn(dat->data, MAX_INSN_SIZE, x86_64, &intel_pt_insn)) {
123 pr_debug("Intel PT failed to decode: %s\n", dat->asm_rep);
129 intel_pt_insn.op, op, dat->asm_rep);
135 intel_pt_insn.branch, branch, dat->asm_rep);
139 if (intel_pt_insn.rel != dat->expected_rel) {
141 intel_pt_insn.rel, dat->expected_rel, dat->asm_rep);
145 pr_debug("Decoded ok: %s\n", dat->asm_rep);
152 const struct test_data *dat;
155 for (dat = dat_set; dat->expected_length; dat++) {
156 if (test_data_item(dat, x86_64))
170 * The instructions are originally in insn-x86-dat-src.c which has been
171 * processed by scripts gen-insn-x86-dat.sh and gen-insn-x86-dat.awk to produce
172 * insn-x86-dat-32.c and insn-x86-dat-64.c which are included into this program.
173 * i.e. to add new instructions to the test, edit insn-x86-dat-src.c, run the
174 * gen-insn-x86-dat.sh script, make perf, and then run the test.