]>
git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/i960/arch.c
1 /* Simulator support for i960.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
7 This file is part of the GNU Simulators.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 const MACH
*sim_machs
[] =
30 #ifdef HAVE_CPU_I960BASE
33 #ifdef HAVE_CPU_I960BASE
39 /* Get the value of h-pc. */
42 a_i960_h_pc_get (SIM_CPU
*current_cpu
)
44 switch (STATE_ARCHITECTURE (CPU_STATE (current_cpu
))->mach
)
46 #ifdef HAVE_CPU_I960BASE
47 case bfd_mach_i960_ka_sa
:
48 return i960base_h_pc_get (current_cpu
);
50 #ifdef HAVE_CPU_I960BASE
51 case bfd_mach_i960_ca
:
52 return i960base_h_pc_get (current_cpu
);
59 /* Set a value for h-pc. */
62 a_i960_h_pc_set (SIM_CPU
*current_cpu
, USI newval
)
64 switch (STATE_ARCHITECTURE (CPU_STATE (current_cpu
))->mach
)
66 #ifdef HAVE_CPU_I960BASE
67 case bfd_mach_i960_ka_sa
:
68 i960base_h_pc_set (current_cpu
, newval
);
71 #ifdef HAVE_CPU_I960BASE
72 case bfd_mach_i960_ca
:
73 i960base_h_pc_set (current_cpu
, newval
);
81 /* Get the value of h-gr. */
84 a_i960_h_gr_get (SIM_CPU
*current_cpu
, UINT regno
)
86 switch (STATE_ARCHITECTURE (CPU_STATE (current_cpu
))->mach
)
88 #ifdef HAVE_CPU_I960BASE
89 case bfd_mach_i960_ka_sa
:
90 return i960base_h_gr_get (current_cpu
, regno
);
92 #ifdef HAVE_CPU_I960BASE
93 case bfd_mach_i960_ca
:
94 return i960base_h_gr_get (current_cpu
, regno
);
101 /* Set a value for h-gr. */
104 a_i960_h_gr_set (SIM_CPU
*current_cpu
, UINT regno
, SI newval
)
106 switch (STATE_ARCHITECTURE (CPU_STATE (current_cpu
))->mach
)
108 #ifdef HAVE_CPU_I960BASE
109 case bfd_mach_i960_ka_sa
:
110 i960base_h_gr_set (current_cpu
, regno
, newval
);
113 #ifdef HAVE_CPU_I960BASE
114 case bfd_mach_i960_ca
:
115 i960base_h_gr_set (current_cpu
, regno
, newval
);
123 /* Get the value of h-cc. */
126 a_i960_h_cc_get (SIM_CPU
*current_cpu
)
128 switch (STATE_ARCHITECTURE (CPU_STATE (current_cpu
))->mach
)
130 #ifdef HAVE_CPU_I960BASE
131 case bfd_mach_i960_ka_sa
:
132 return i960base_h_cc_get (current_cpu
);
134 #ifdef HAVE_CPU_I960BASE
135 case bfd_mach_i960_ca
:
136 return i960base_h_cc_get (current_cpu
);
143 /* Set a value for h-cc. */
146 a_i960_h_cc_set (SIM_CPU
*current_cpu
, SI newval
)
148 switch (STATE_ARCHITECTURE (CPU_STATE (current_cpu
))->mach
)
150 #ifdef HAVE_CPU_I960BASE
151 case bfd_mach_i960_ka_sa
:
152 i960base_h_cc_set (current_cpu
, newval
);
155 #ifdef HAVE_CPU_I960BASE
156 case bfd_mach_i960_ca
:
157 i960base_h_cc_set (current_cpu
, newval
);