2 #include <linux/types.h> 6 #include "arch-tests.h" 22 {{0x0f, 0x01, 0xee}, 3, 0, NULL, NULL,
"0f 01 ee \trdpkru"},
23 {{0x0f, 0x01, 0xef}, 3, 0, NULL, NULL,
"0f 01 ef \twrpkru"},
24 {{0}, 0, 0, NULL, NULL, NULL},
29 {{0x0f, 0x01, 0xee}, 3, 0, NULL, NULL,
"0f 01 ee \trdpkru"},
30 {{0x0f, 0x01, 0xef}, 3, 0, NULL, NULL,
"0f 01 ef \twrpkru"},
31 {{0}, 0, 0, NULL, NULL, NULL},
34 static int get_op(
const char *op_str)
54 if (!op_str || !strlen(op_str))
57 for (val = vals; val->name; val++) {
58 if (!strcmp(val->name, op_str))
81 if (!branch_str || !strlen(branch_str))
84 for (val = vals; val->name; val++) {
85 if (!strcmp(val->name, branch_str))
109 pr_debug(
"Failed to decode length (%d vs expected %d): %s\n",
122 if ((
int)intel_pt_insn.
op != op) {
123 pr_debug(
"Failed to decode 'op' value (%d vs expected %d): %s\n",
128 if ((
int)intel_pt_insn.
branch != branch) {
129 pr_debug(
"Failed to decode 'branch' value (%d vs expected %d): %s\n",
135 pr_debug(
"Failed to decode 'rel' value (%#x vs expected %#x): %s\n",
const char * expected_op_str
static int get_branch(const char *branch_str)
void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64)
enum intel_pt_insn_branch branch
const char * expected_branch_str
struct test_data test_data_32[]
void insn_get_length(struct insn *insn)
#define pr_debug(fmt,...)
static int insn_complete(struct insn *insn)
int test__insn_x86(struct test *test __maybe_unused, int subtest __maybe_unused)
static int test_data_item(struct test_data *dat, int x86_64)
int intel_pt_get_insn(const unsigned char *buf, size_t len, int x86_64, struct intel_pt_insn *intel_pt_insn)
static int test_data_set(struct test_data *dat_set, int x86_64)
static int get_op(const char *op_str)
struct test_data test_data_64[]