Fix RELOC_FOR_GLOBAL_SYMBOLS macro so that it can cope with user defined symbols...
[binutils-gdb.git] / sim / example-synacor / example-synacor-sim.h
blobb7bd8ba86f79d80dd1074e5d91fe6271879fc44c
1 /* Example synacor simulator.
3 Copyright (C) 2005-2024 Free Software Foundation, Inc.
4 Contributed by Mike Frysinger.
6 This file is part of the GNU simulators.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 #ifndef EXAMPLE_SYNACOR_SIM_H
22 #define EXAMPLE_SYNACOR_SIM_H
24 struct example_sim_cpu {
25 uint16_t regs[8];
26 sim_cia pc;
28 /* This isn't a real register, and the stack is not directly addressable,
29 so use memory outside of the 16-bit address space. */
30 uint32_t sp;
33 #define EXAMPLE_SIM_CPU(cpu) ((struct example_sim_cpu *) CPU_ARCH_DATA (cpu))
35 extern void step_once (SIM_CPU *);
36 extern void initialize_cpu (SIM_DESC, SIM_CPU *);
38 #endif