Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 5d908bceaafc4ad78dd63b3e575382abc356c1d8 1 parent db1fcd0
Andreas Färber authored

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. +4 0 target-78k0/cpu.c
4 target-78k0/cpu.c
@@ -32,12 +32,16 @@ static void rl78_cpu_reset(CPUState *cs)
32 32 RL78CPUClass *rcc = RL78_CPU_GET_CLASS(cs);
33 33 uint8_t *rom;
34 34 uint16_t reset_vector;
  35 + hwaddr addr;
35 36
36 37 rcc->parent_reset(cs);
37 38
38 39 tlb_flush(&cpu->env, 1);
39 40
40 41 memset(&cpu->env, 0, offsetof(CPU78K0State, breakpoints));
  42 + for (addr = 0xffee0; addr < 0xfff00; addr += 2) {
  43 + stw_phys(addr, 0);
  44 + }
41 45 #ifdef TARGET_RL78
42 46 cpu->env.psw = 0x06;
43 47 cpu->env.es = 0x0f;

0 comments on commit 5d908bc

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