sim: example-synacor: invert sim_cpu storage

This commit is contained in:
Mike Frysinger
2022-11-01 11:42:11 +05:45
parent 3fbdc6f908
commit 86ecb89bb7
3 changed files with 47 additions and 37 deletions

View File

@@ -21,21 +21,22 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
#define SIM_HAVE_COMMON_SIM_CPU
#include "sim-basics.h"
#include "sim-base.h"
struct _sim_cpu {
/* ... simulator specific members ... */
struct example_sim_cpu {
uint16_t regs[8];
sim_cia pc;
/* This isn't a real register, and the stack is not directly addressable,
so use memory outside of the 16-bit address space. */
uint32_t sp;
sim_cpu_base base;
};
#define EXAMPLE_SIM_CPU(cpu) ((struct example_sim_cpu *) CPU_ARCH_DATA (cpu))
extern void step_once (SIM_CPU *);
extern void initialize_cpu (SIM_DESC, SIM_CPU *);