Lines Matching full:dat
22 #include "insn-x86-dat-32.c"
29 #include "insn-x86-dat-64.c"
96 static int test_data_item(struct test_data *dat, int x86_64) in test_data_item() argument
102 ret = insn_decode(&insn, dat->data, MAX_INSN_SIZE, in test_data_item()
105 pr_debug("Failed to decode: %s\n", dat->asm_rep); in test_data_item()
109 if (insn.length != dat->expected_length) { in test_data_item()
111 insn.length, dat->expected_length, dat->asm_rep); in test_data_item()
115 op = get_op(dat->expected_op_str); in test_data_item()
116 branch = get_branch(dat->expected_branch_str); in test_data_item()
118 if (intel_pt_get_insn(dat->data, MAX_INSN_SIZE, x86_64, &intel_pt_insn)) { in test_data_item()
119 pr_debug("Intel PT failed to decode: %s\n", dat->asm_rep); in test_data_item()
125 intel_pt_insn.op, op, dat->asm_rep); in test_data_item()
131 intel_pt_insn.branch, branch, dat->asm_rep); in test_data_item()
135 if (intel_pt_insn.rel != dat->expected_rel) { in test_data_item()
137 intel_pt_insn.rel, dat->expected_rel, dat->asm_rep); in test_data_item()
141 pr_debug("Decoded ok: %s\n", dat->asm_rep); in test_data_item()
148 struct test_data *dat; in test_data_set() local
151 for (dat = dat_set; dat->expected_length; dat++) { in test_data_set()
152 if (test_data_item(dat, x86_64)) in test_data_set()
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.