#include <linux/types.h>
#include "debug.h"
#include "tests/tests.h"
#include "arch-tests.h"
#include "intel-pt-decoder/insn.h"
#include "intel-pt-decoder/intel-pt-insn-decoder.h"
#include "insn-x86-dat-32.c"
#include "insn-x86-dat-64.c"
Go to the source code of this file.
◆ get_branch()
static int get_branch |
( |
const char * |
branch_str | ) |
|
|
static |
◆ get_op()
static int get_op |
( |
const char * |
op_str | ) |
|
|
static |
◆ test__insn_x86()
int test__insn_x86 |
( |
struct test *test |
__maybe_unused, |
|
|
int subtest |
__maybe_unused |
|
) |
| |
test__insn_x86 - test x86 instruction decoder - new instructions.
This function implements a test that decodes a selection of instructions and checks the results. The Intel PT function that further categorizes instructions (i.e. intel_pt_get_insn()) is also checked.
The instructions are originally in insn-x86-dat-src.c which has been processed by scripts gen-insn-x86-dat.sh and gen-insn-x86-dat.awk to produce insn-x86-dat-32.c and insn-x86-dat-64.c which are included into this program. i.e. to add new instructions to the test, edit insn-x86-dat-src.c, run the gen-insn-x86-dat.sh script, make perf, and then run the test.
If the test passes %0 is returned, otherwise %-1 is returned. Use the verbose (-v) option to see all the instructions and whether or not they decoded successfuly.
Definition at line 175 of file insn-x86.c.
◆ test_data_item()
static int test_data_item |
( |
struct test_data * |
dat, |
|
|
int |
x86_64 |
|
) |
| |
|
static |
◆ test_data_set()
static int test_data_set |
( |
struct test_data * |
dat_set, |
|
|
int |
x86_64 |
|
) |
| |
|
static |
◆ test_data_32
◆ test_data_64