Lines Matching refs:model

22 #include "sim-model.h"
41 { {"model", required_argument, NULL, OPTION_MODEL},
42 '\0', "MODEL", "Specify model to simulate",
45 { {"model-info", no_argument, NULL, OPTION_MODEL_INFO},
48 { {"info-model", no_argument, NULL, OPTION_MODEL_INFO},
63 const MODEL *model = sim_model_lookup (arg);
64 if (! model)
66 sim_io_eprintf (sd, "unknown model `%s'\n", arg);
69 sim_model_set (sd, cpu, model);
76 const MODEL *model;
81 for (model = MACH_MODELS (*machp); MODEL_NAME (model) != NULL;
82 ++model)
83 sim_io_printf (sd, " %s", MODEL_NAME (model));
104 /* Subroutine of sim_model_set to set the model for one cpu. */
107 model_set (sim_cpu *cpu, const MODEL *model)
109 CPU_MACH (cpu) = MODEL_MACH (model);
110 CPU_MODEL (cpu) = model;
111 (* MACH_INIT_CPU (MODEL_MACH (model))) (cpu);
112 (* MODEL_INIT (model)) (cpu);
115 /* Set the current model of CPU to MODEL.
119 sim_model_set (SIM_DESC sd, sim_cpu *cpu, const MODEL *model)
127 model_set (STATE_CPU (sd, c), model);
131 model_set (cpu, model);
135 /* Look up model named NAME.
142 const MODEL *model;
146 for (model = MACH_MODELS (*machp); MODEL_NAME (model) != NULL; ++model)
148 if (strcmp (MODEL_NAME (model), name) == 0)
149 return model;
187 /* Initialize model support. */
194 /* If both cpu model and state architecture are set, ensure they're
196 use the default model. STATE_ARCHITECTURE is the bfd_arch_info data
206 /* Set the default model. */
207 const MODEL *model = sim_model_lookup (WITH_DEFAULT_MODEL);
208 sim_model_set (sd, NULL, model);
217 sim_io_eprintf (sd, "invalid model `%s' for `%s'\n",
225 /* Use the default model for the selected machine.
226 The default model is the first one in the list. */