Update test_z_inst.c

Added test case for add immediate 16 bits RI-a 
Added test case for add immediate 32 bits RIL-a
This commit is contained in:
ketank-new 2016-12-06 14:11:30 +05:30 committed by GitHub
parent 2156278508
commit 7c79bbc768

View File

@ -76,6 +76,23 @@ static void lab(dasm_State *state)
| br r14
}
static void add_imm16(dasm_State *state)
{
dasm_State **Dst = &state;
| ahi r2 , 0xf
| br r14
}
static void add_imm32(dasm_State *state)
{
dasm_State **Dst = &state;
| afi r2 , 0xe
| br r14
}
typedef struct {
int64_t arg1;
int64_t arg2;
@ -90,7 +107,9 @@ test_table test[] = {
{ 2, 3, mul, 6, "mul"},
{ 5, 7, rx, 12298, "rx"},
{ 5, 7, rxy, 10, "rxy"},
{ 2, 4, lab, 32, "lab"}
{ 2, 4, lab, 32, "lab"},
{ 2, 0, add_imm16,17, "imm16"}
{ 2, 0, add_imm32,16, "imm32"}
};
static void *jitcode(dasm_State **state, size_t *size)