/** 1101 sss1 ss01 1dst MOVA src,dest */
+ {
static reg_id map[8] = { r2r0, r3r1, a0, a1 };
prefix (0, 0, 0);
sc = decode_src23 (sss, ss, 1);
if (!sc.mem || !map[dst])
UNSUPPORTED();
put_reg (map[dst], sc.u.addr);
+ }
/** 0000 0001 1011 ddd0 dd hl 1110 MOVdir R0L,dest */
/** 1000 1110 POPM dest */
+ {
static int map[] = { r0, r1, r2, r3, a0, a1, sb, fb };
prefix (0, 0, 0);
imm = IMM(1);
put_reg (map[a], v);
put_reg (sp, get_reg (sp) + 4);
}
+ }
/** 1010 111w PUSH.size #IMM */
+ {
+ int a;
prefix (0, 0, 0);
imm = IMM(w+1);
tprintf("push%s: %x\n", w ? "hi" : "qi", imm);
- int a = get_reg (sp) - 2;
+ a = get_reg (sp) - 2;
if (w)
mem_put_hi (a, imm);
else
mem_put_qi (a, imm);
put_reg (sp, a);
+ }
/** 1100 sss w ss00 1110 PUSH.size src */
/** 1000 1111 PUSHM src */
+ {
static int map[] = { fb, sb, a1, a0, r3, r2, r1, r0 };
imm = IMM(1);
tprintf("pushm: %x\n", imm);
v = get_reg (map[a]);
mem_put_hi (get_reg (sp), v);
}
+ }
/** 1001 1110 REIT */
/** 1011 1000 010w 0011 RMPA.size */
+ {
int count = get_reg (r3);
int list1 = get_reg (a0);
int list2 = get_reg (a1);
put_reg (a1, list2);
put_reg (r2r0, (int)(sum & 0xffffffffU));
put_reg (r1, (int)(sum >> 32));
+ }
/** 1011 ddd w dd10 1110 ROLC.size dest */
/* w = width, i = immediate, c = carry, s = subtract */
+ {
int src = i ? IMM(w) : get_reg (w ? r1 : r0h);
int dest = get_reg (w ? r0 : r0l);
int res;
set_szc (res, w+1, c);
put_reg (w ? r0 : r0l, res);
+ }
/** 1010 1dst DEC.B dest */
/** 1110 1011 0reg 1src MOVA src,dest */
+ {
static reg_id map[] = { r0, r1, r2, r3, a0, a1, 0, 0 };
sc = decode_srcdest4 (8 + src, 0);
put_reg (map[reg], sc.u.addr);
+ }
/** 0111 1100 10hl dest MOVdir R0L,dest */
/** 1110 1101 POPM dest */
+ {
static int map[] = { r0, r1, r2, r3, a0, a1, sb, fb };
imm = IMM(0);
tprintf("popm: %x\n", imm);
put_reg (map[a], v);
put_reg (sp, get_reg (sp) + 2);
}
+ }
/** 0111 110w 1110 0010 PUSH.size:G #IMM */
/** 1110 1100 PUSHM src */
+ {
static int map[] = { fb, sb, a1, a0, r3, r2, r1, r0 };
imm = IMM(0);
tprintf("pushm: %x\n", imm);
v = get_reg (map[a]);
mem_put_hi (get_reg (sp), v);
}
+ }
/** 1111 1011 REIT */
/** 0111 110w 1111 0001 RMPA.size */
+ {
int count = get_reg (r3);
int list1 = get_reg (a0);
int list2 = get_reg (a1);
put_reg (a0, list1);
put_reg (a1, list2);
put_reg (w ? r2r0 : r0, sum);
+ }
/** 0111 011w 1010 dest ROLC.size dest */
/** 0111 110w 1110 100b SMOVB.size */
+ {
int count = get_reg (r3);
int s1 = get_reg (a0) + (get_reg (r1h) << 16);
int s2 = get_reg (a1);
put_reg (a0, s1 & 0xffff);
put_reg (a1, s2);
put_reg (r1h, s1 >> 16);
+ }
/** 0111 110w 1110 1010 SSTR.size */
+ {
int count = get_reg (r3);
int s1 = get_reg (a1);
v = get_reg (w ? r0 : r0l);
}
put_reg (r3, count);
put_reg (a1, s1);
+ }
/** 0111 1011 1src dest STC src,dest */