1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2006 by Dominic Rath *
5 * Dominic.Rath@gmx.de *
6 ***************************************************************************/
8 #ifndef OPENOCD_TARGET_ARM_SIMULATOR_H
9 #define OPENOCD_TARGET_ARM_SIMULATOR_H
13 struct arm_sim_interface
{
15 uint32_t (*get_reg
)(struct arm_sim_interface
*sim
, int reg
);
16 void (*set_reg
)(struct arm_sim_interface
*sim
, int reg
, uint32_t value
);
17 uint32_t (*get_reg_mode
)(struct arm_sim_interface
*sim
, int reg
);
18 void (*set_reg_mode
)(struct arm_sim_interface
*sim
, int reg
, uint32_t value
);
19 uint32_t (*get_cpsr
)(struct arm_sim_interface
*sim
, int pos
, int bits
);
20 enum arm_state (*get_state
)(struct arm_sim_interface
*sim
);
21 void (*set_state
)(struct arm_sim_interface
*sim
, enum arm_state mode
);
22 enum arm_mode (*get_mode
)(struct arm_sim_interface
*sim
);
26 int arm_simulate_step(struct target
*target
, uint32_t *dry_run_pc
);
28 #endif /* OPENOCD_TARGET_ARM_SIMULATOR_H */