]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/h8300/p3.c
* p1.c, p3.c, run.c, writecode.c: all used h8/300 opcodes in and
[thirdparty/binutils-gdb.git] / sim / h8300 / p3.c
1 movflags8:
2 if (dst == 0xfeedface) abort();
3 n = dst & 0x80;
4 z = !(dst & 0xff);
5 v = 0;
6 goto next;
7 movflags16:
8 if (dst == 0xfeedface) abort();
9 n = dst & 0x8000;
10 z = !(dst & 0xffff);
11 v = 0;
12 goto next;
13 aluflags8:
14 if (dst == 0xfeedface) abort();
15 n = dst & 0x80;
16 z = !(dst & 0xff);
17 v = ((srca & 0x80) == (srcb & 0x80)) && ((srca & 0x80) != (dst & 0x80));
18 c = dst & 0x100;
19 goto next;
20 aluflags16:
21 if (dst == 0xfeedface) abort();
22 n = dst & 0x8000;
23 z = !(dst & 0xffff);
24 v = ((srca & 0x8000) == (srcb & 0x8000)) && ((srca & 0x8000) != (dst & 0x8000));
25 c = dst & 0x10000;
26 goto next;
27 setflags:;
28 SET_CCR(tmp);
29 break;
30 logflags:
31 shiftflags:
32 v = 0;
33 incflags:
34 if (dst == 0xfeedface) abort();
35 z = !(dst & 0xff);
36 n = dst & 0x80;
37 goto next;
38 next: ;
39 pc = npc;
40 } while (!exception);
41
42 saved_state.cycles = cycles;
43 saved_state.reg[PC] = pc - mem;
44 saved_state.reg[CCR] = GET_CCR();
45 }