2022-01-15 07:07:11 +00:00
|
|
|
#include "head.c"
|
|
|
|
|
|
|
|
static pr_int_t lea_globals_init[] = {
|
|
|
|
// pointers
|
|
|
|
24, 26, 28, 29,
|
|
|
|
32, -4, -2, 0,
|
|
|
|
1, 4, 0xdeadbeef, 0xfeedf00d,
|
|
|
|
|
2022-01-15 07:27:46 +00:00
|
|
|
0, 0, 0, 0,
|
2022-01-15 07:07:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static pr_int_t lea_globals_expect[] = {
|
|
|
|
// pointers
|
|
|
|
24, 26, 28, 29,
|
|
|
|
32, -4, -2, 0,
|
|
|
|
1, 4, 0xdeadbeef, 0xfeedf00d,
|
|
|
|
|
2022-01-15 07:27:46 +00:00
|
|
|
7, 34, 26, 88,
|
2022-01-15 07:07:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static dstatement_t lea_statements[] = {
|
|
|
|
{OP(0, 0, 0, OP_LEA_A), 7, 9, 12},
|
2022-01-15 07:27:46 +00:00
|
|
|
{OP(0, 0, 0, OP_LEA_C), 2, 6, 13},
|
|
|
|
{OP(0, 0, 0, OP_LEA_D), 2, 6, 14},
|
2022-01-20 05:55:29 +00:00
|
|
|
{OP(0, 0, 0, OP_LEA_B), 4, 2, 15},
|
2022-01-15 07:07:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
test_t tests[] = {
|
|
|
|
{
|
|
|
|
.desc = "lea",
|
|
|
|
.num_globals = num_globals (lea_globals_init, lea_globals_expect),
|
|
|
|
.num_statements = num_statements (lea_statements),
|
|
|
|
.statements = lea_statements,
|
|
|
|
.init_globals = lea_globals_init,
|
|
|
|
.expect_globals = lea_globals_expect,
|
|
|
|
.edict_area = 28,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
#include "main.c"
|