Skip to content
Browse files

target-rl78: Reset GPR area

This is not in the manual, but all registers in CPUState are cleared
implicitly.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
  • Loading branch information...
1 parent db1fcd0 commit 5d908bceaafc4ad78dd63b3e575382abc356c1d8 @afaerber committed Nov 29, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 target-78k0/cpu.c
View
4 target-78k0/cpu.c
@@ -32,12 +32,16 @@ static void rl78_cpu_reset(CPUState *cs)
RL78CPUClass *rcc = RL78_CPU_GET_CLASS(cs);
uint8_t *rom;
uint16_t reset_vector;
+ hwaddr addr;
rcc->parent_reset(cs);
tlb_flush(&cpu->env, 1);
memset(&cpu->env, 0, offsetof(CPU78K0State, breakpoints));
+ for (addr = 0xffee0; addr < 0xfff00; addr += 2) {
+ stw_phys(addr, 0);
+ }
#ifdef TARGET_RL78
cpu->env.psw = 0x06;
cpu->env.es = 0x0f;

0 comments on commit 5d908bc

Please sign in to comment.
Something went wrong with that request. Please try again.