Lines Matching defs:dat
22 #include "insn-x86-dat-32.c"
29 #include "insn-x86-dat-64.c"
95 static int test_data_item(struct test_data *dat, int x86_64)
101 insn_init(&insn, dat->data, MAX_INSN_SIZE, x86_64);
105 pr_debug("Failed to decode: %s\n", dat->asm_rep);
109 if (insn.length != dat->expected_length) {
111 insn.length, dat->expected_length, dat->asm_rep);
115 op = get_op(dat->expected_op_str);
116 branch = get_branch(dat->expected_branch_str);
118 if (intel_pt_get_insn(dat->data, MAX_INSN_SIZE, x86_64, &intel_pt_insn)) {
119 pr_debug("Intel PT failed to decode: %s\n", dat->asm_rep);
125 intel_pt_insn.op, op, dat->asm_rep);
131 intel_pt_insn.branch, branch, dat->asm_rep);
135 if (intel_pt_insn.rel != dat->expected_rel) {
137 intel_pt_insn.rel, dat->expected_rel, dat->asm_rep);
141 pr_debug("Decoded ok: %s\n", dat->asm_rep);
148 struct test_data *dat;
151 for (dat = dat_set; dat->expected_length; dat++) {
152 if (test_data_item(dat, x86_64))
166 * The instructions are originally in insn-x86-dat-src.c which has been
167 * processed by scripts gen-insn-x86-dat.sh and gen-insn-x86-dat.awk to produce
168 * insn-x86-dat-32.c and insn-x86-dat-64.c which are included into this program.
169 * i.e. to add new instructions to the test, edit insn-x86-dat-src.c, run the
170 * gen-insn-x86-dat.sh script, make perf, and then run the test.