Home | History | Annotate | Download | only in common

Lines Matching defs:model

0 /* Model support.
27 #include "sim-model.h"
44 { {"model", required_argument, NULL, OPTION_MODEL},
45 '\0', "MODEL", "Specify model to simulate",
48 { {"model-info", no_argument, NULL, OPTION_MODEL_INFO},
51 { {"info-model", no_argument, NULL, OPTION_MODEL_INFO},
66 const SIM_MODEL *model = sim_model_lookup (sd, arg);
67 if (! model)
69 sim_io_eprintf (sd, "unknown model `%s'\n", arg);
73 sim_model_set (sd, cpu, model);
80 const SIM_MODEL *model;
92 for (model = MACH_MODELS (*machp); MODEL_NAME (model) != NULL;
93 ++model)
94 sim_io_printf (sd, " %s", MODEL_NAME (model));
115 /* Subroutine of sim_model_set to set the model for one cpu. */
118 model_set (sim_cpu *cpu, const SIM_MODEL *model)
120 CPU_MACH (cpu) = MODEL_MACH (model);
121 CPU_MODEL (cpu) = model;
122 (* MACH_INIT_CPU (MODEL_MACH (model))) (cpu);
123 (* MODEL_INIT (model)) (cpu);
126 /* Set the current model of CPU to MODEL.
127 If CPU is NULL, all cpus are set to MODEL. */
130 sim_model_set (SIM_DESC sd, sim_cpu *cpu, const SIM_MODEL *model)
138 model_set (STATE_CPU (sd, c), model);
142 model_set (cpu, model);
146 /* Look up model named NAME.
147 Result is pointer to MODEL entry or NULL if not found. */
153 const SIM_MODEL *model;
160 for (model = MACH_MODELS (*machp); MODEL_NAME (model) != NULL; ++model)
162 if (strcmp (MODEL_NAME (model), name) == 0)
163 return model;
207 /* Initialize model support. */
214 /* If both cpu model and state architecture are set, ensure they're
216 use the default model. STATE_ARCHITECTURE is the bfd_arch_info data
227 /* Set the default model. */
228 const SIM_MODEL *model = sim_model_lookup (sd, STATE_MODEL_NAME (sd));
229 SIM_ASSERT (model != NULL);
230 sim_model_set (sd, NULL, model);
239 sim_io_eprintf (sd, "invalid model `%s' for `%s'\n",
247 /* Use the default model for the selected machine.
248 The default model is the first one in the list. */