current_alignment = NONSTRICT_ALIGNMENT;
/* Perform the initialization steps one by one. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct aarch64_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct aarch64_sim_cpu))
!= SIM_RC_OK
|| sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK
|| sim_parse_args (sd, argv) != SIM_RC_OK
current_alignment = STRICT_ALIGNMENT;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
+ if (sim_cpu_alloc_all (sd, 0) != SIM_RC_OK)
{
free_state (sd);
return 0;
current_target_byte_order = BFD_ENDIAN_LITTLE;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct avr_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct avr_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
current_target_byte_order = BFD_ENDIAN_LITTLE;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct bfin_cpu_state))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct bfin_cpu_state))
!= SIM_RC_OK)
{
free_state (sd);
STATE_MACHS (sd) = bpf_sim_machs;
STATE_MODEL_NAME (sd) = "bpf-def";
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct bpf_sim_cpu)) != SIM_RC_OK)
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct bpf_sim_cpu)) != SIM_RC_OK)
goto error;
if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
{
int c;
+ /* TODO: This should be a command line option for users to control. */
+ if (ncpus == 0)
+ ncpus = MAX_NR_PROCESSORS;
+
for (c = 0; c < ncpus; ++c)
STATE_CPU (sd, c) = sim_cpu_alloc_extra (sd, extra_bytes);
+
return SIM_RC_OK;
}
cb->syscall_map = cb_cr16_syscall_map;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
+ if (sim_cpu_alloc_all (sd, 0) != SIM_RC_OK)
{
free_state (sd);
return 0;
current_target_byte_order = BFD_ENDIAN_LITTLE;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct cris_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct cris_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
cb->syscall_map = cb_d10v_syscall_map;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
+ if (sim_cpu_alloc_all (sd, 0) != SIM_RC_OK)
{
free_state (sd);
return 0;
current_target_byte_order = BFD_ENDIAN_LITTLE;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct example_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct example_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
current_target_byte_order = BFD_ENDIAN_BIG;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct frv_sim_cpu)) != SIM_RC_OK)
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct frv_sim_cpu)) != SIM_RC_OK)
{
free_state (sd);
return 0;
current_target_byte_order = BFD_ENDIAN_LITTLE;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct ft32_cpu_state))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct ft32_cpu_state))
!= SIM_RC_OK)
{
free_state (sd);
current_target_byte_order = BFD_ENDIAN_BIG;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct h8300_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct h8300_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
current_target_byte_order = BFD_ENDIAN_BIG;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct iq2000_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct iq2000_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
current_target_byte_order = BFD_ENDIAN_BIG;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct lm32_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct lm32_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
current_target_byte_order = BFD_ENDIAN_BIG;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct m32r_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct m32r_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
current_target_byte_order = BFD_ENDIAN_BIG;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct m68hc11_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct m68hc11_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
cb->syscall_map = cb_mcore_syscall_map;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct mcore_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct mcore_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct microblaze_regset))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct microblaze_regset))
!= SIM_RC_OK)
{
free_state (sd);
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct mips_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct mips_sim_cpu))
!= SIM_RC_OK)
return 0;
current_target_byte_order = BFD_ENDIAN_LITTLE;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
+ if (sim_cpu_alloc_all (sd, 0) != SIM_RC_OK)
return 0;
/* for compatibility */
current_target_byte_order = BFD_ENDIAN_BIG;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct moxie_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct moxie_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
/* Set default options before parsing user options. */
current_target_byte_order = BFD_ENDIAN_LITTLE;
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct msp430_cpu_state))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct msp430_cpu_state))
!= SIM_RC_OK)
{
sim_state_free (sd);
current_target_byte_order = BFD_ENDIAN_BIG;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct or1k_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct or1k_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
current_target_byte_order = BFD_ENDIAN_LITTLE;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct pru_regset)) != SIM_RC_OK)
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct pru_regset)) != SIM_RC_OK)
{
free_state (sd);
return 0;
callback->syscall_map = cb_riscv_syscall_map;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct riscv_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct riscv_sim_cpu))
!= SIM_RC_OK)
{
free_state (sd);
cb->syscall_map = cb_sh_syscall_map;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
+ if (sim_cpu_alloc_all (sd, 0) != SIM_RC_OK)
{
free_state (sd);
return 0;
cb->syscall_map = cb_v850_syscall_map;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct v850_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct v850_sim_cpu))
!= SIM_RC_OK)
return 0;