Lines Matching full: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) in test_data_item() argument
106 ret = insn_decode(&insn, dat->data, MAX_INSN_SIZE, in test_data_item()
109 pr_debug("Failed to decode: %s\n", dat->asm_rep); in test_data_item()
113 if (insn.length != dat->expected_length) { in test_data_item()
115 insn.length, dat->expected_length, dat->asm_rep); in test_data_item()
119 op = get_op(dat->expected_op_str); in test_data_item()
120 branch = get_branch(dat->expected_branch_str); in test_data_item()
122 if (intel_pt_get_insn(dat->data, MAX_INSN_SIZE, x86_64, &intel_pt_insn)) { in test_data_item()
123 pr_debug("Intel PT failed to decode: %s\n", dat->asm_rep); in test_data_item()
129 intel_pt_insn.op, op, dat->asm_rep); in test_data_item()
135 intel_pt_insn.branch, branch, dat->asm_rep); in test_data_item()
139 if (intel_pt_insn.rel != dat->expected_rel) { in test_data_item()
141 intel_pt_insn.rel, dat->expected_rel, dat->asm_rep); in test_data_item()
145 pr_debug("Decoded ok: %s\n", dat->asm_rep); in test_data_item()
152 const struct test_data *dat; in test_data_set() local
155 for (dat = dat_set; dat->expected_length; dat++) { in test_data_set()
156 if (test_data_item(dat, x86_64)) in test_data_set()
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.