2009-09-23 22:01:47 +02:00
|
|
|
/* Simulator for Xilinx MicroBlaze processor
|
2017-01-01 07:50:51 +01:00
|
|
|
Copyright 2009-2017 Free Software Foundation, Inc.
|
2009-09-23 22:01:47 +02:00
|
|
|
|
|
|
|
This file is part of GDB, the GNU debugger.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2012-12-19 08:12:02 +01:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2009-09-23 22:01:47 +02:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2012-12-19 08:18:22 +01:00
|
|
|
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
2009-09-23 22:01:47 +02:00
|
|
|
|
2012-06-06 23:50:03 +02:00
|
|
|
#include "config.h"
|
2009-09-23 22:01:47 +02:00
|
|
|
#include <signal.h>
|
2015-02-19 10:09:54 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
2009-09-23 22:01:47 +02:00
|
|
|
#include "bfd.h"
|
|
|
|
#include "gdb/callback.h"
|
|
|
|
#include "libiberty.h"
|
|
|
|
#include "gdb/remote-sim.h"
|
2015-03-29 23:40:30 +02:00
|
|
|
|
2009-09-23 22:01:47 +02:00
|
|
|
#include "sim-main.h"
|
2015-03-29 23:40:30 +02:00
|
|
|
#include "sim-options.h"
|
|
|
|
|
2009-10-06 17:19:52 +02:00
|
|
|
#include "microblaze-dis.h"
|
2009-09-23 22:01:47 +02:00
|
|
|
|
2017-06-02 17:04:59 +02:00
|
|
|
#define target_big_endian (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
|
2009-09-23 22:01:47 +02:00
|
|
|
|
2015-03-16 07:26:48 +01:00
|
|
|
static unsigned long
|
2009-09-23 22:01:47 +02:00
|
|
|
microblaze_extract_unsigned_integer (unsigned char *addr, int len)
|
|
|
|
{
|
|
|
|
unsigned long retval;
|
|
|
|
unsigned char *p;
|
|
|
|
unsigned char *startaddr = (unsigned char *)addr;
|
|
|
|
unsigned char *endaddr = startaddr + len;
|
|
|
|
|
|
|
|
if (len > (int) sizeof (unsigned long))
|
|
|
|
printf ("That operation is not available on integers of more than "
|
2015-03-08 08:24:03 +01:00
|
|
|
"%zu bytes.", sizeof (unsigned long));
|
2009-09-23 22:01:47 +02:00
|
|
|
|
|
|
|
/* Start at the most significant end of the integer, and work towards
|
|
|
|
the least significant. */
|
|
|
|
retval = 0;
|
|
|
|
|
|
|
|
if (!target_big_endian)
|
|
|
|
{
|
|
|
|
for (p = endaddr; p > startaddr;)
|
|
|
|
retval = (retval << 8) | * -- p;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for (p = startaddr; p < endaddr;)
|
|
|
|
retval = (retval << 8) | * p ++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return retval;
|
|
|
|
}
|
|
|
|
|
2015-03-16 07:26:48 +01:00
|
|
|
static void
|
2009-09-23 22:01:47 +02:00
|
|
|
microblaze_store_unsigned_integer (unsigned char *addr, int len,
|
|
|
|
unsigned long val)
|
|
|
|
{
|
|
|
|
unsigned char *p;
|
|
|
|
unsigned char *startaddr = (unsigned char *)addr;
|
|
|
|
unsigned char *endaddr = startaddr + len;
|
|
|
|
|
|
|
|
if (!target_big_endian)
|
|
|
|
{
|
|
|
|
for (p = startaddr; p < endaddr;)
|
|
|
|
{
|
|
|
|
*p++ = val & 0xff;
|
|
|
|
val >>= 8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for (p = endaddr; p > startaddr;)
|
|
|
|
{
|
|
|
|
*--p = val & 0xff;
|
|
|
|
val >>= 8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-29 23:40:30 +02:00
|
|
|
set_initial_gprs (SIM_CPU *cpu)
|
2009-09-23 22:01:47 +02:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
long space;
|
|
|
|
|
|
|
|
/* Set up machine just out of reset. */
|
|
|
|
PC = 0;
|
|
|
|
MSR = 0;
|
|
|
|
|
|
|
|
/* Clean out the GPRs */
|
|
|
|
for (i = 0; i < 32; i++)
|
|
|
|
CPU.regs[i] = 0;
|
|
|
|
CPU.insts = 0;
|
|
|
|
CPU.cycles = 0;
|
|
|
|
CPU.imm_enable = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int tracing = 0;
|
|
|
|
|
|
|
|
void
|
2015-06-09 10:10:49 +02:00
|
|
|
sim_engine_run (SIM_DESC sd,
|
|
|
|
int next_cpu_nr, /* ignore */
|
|
|
|
int nr_cpus, /* ignore */
|
|
|
|
int siggnal) /* ignore */
|
2009-09-23 22:01:47 +02:00
|
|
|
{
|
2015-03-29 23:40:30 +02:00
|
|
|
SIM_CPU *cpu = STATE_CPU (sd, 0);
|
2009-09-23 22:01:47 +02:00
|
|
|
int needfetch;
|
|
|
|
word inst;
|
|
|
|
enum microblaze_instr op;
|
|
|
|
int memops;
|
|
|
|
int bonus_cycles;
|
|
|
|
int insts;
|
|
|
|
int w;
|
|
|
|
int cycs;
|
|
|
|
word WLhash;
|
|
|
|
ubyte carry;
|
|
|
|
int imm_unsigned;
|
|
|
|
short ra, rb, rd;
|
|
|
|
long immword;
|
|
|
|
uword oldpc, newpc;
|
|
|
|
short delay_slot_enable;
|
|
|
|
short branch_taken;
|
|
|
|
short num_delay_slot; /* UNUSED except as reqd parameter */
|
|
|
|
enum microblaze_instr_type insn_type;
|
|
|
|
|
|
|
|
memops = 0;
|
|
|
|
bonus_cycles = 0;
|
|
|
|
insts = 0;
|
2015-03-16 07:23:02 +01:00
|
|
|
|
2015-06-09 10:10:49 +02:00
|
|
|
while (1)
|
2009-09-23 22:01:47 +02:00
|
|
|
{
|
|
|
|
/* Fetch the initial instructions that we'll decode. */
|
2015-04-12 11:49:31 +02:00
|
|
|
inst = MEM_RD_WORD (PC & 0xFFFFFFFC);
|
2009-09-23 22:01:47 +02:00
|
|
|
|
2015-03-16 07:23:02 +01:00
|
|
|
op = get_insn_microblaze (inst, &imm_unsigned, &insn_type,
|
2009-09-23 22:01:47 +02:00
|
|
|
&num_delay_slot);
|
|
|
|
|
|
|
|
if (op == invalid_inst)
|
|
|
|
fprintf (stderr, "Unknown instruction 0x%04x", inst);
|
|
|
|
|
|
|
|
if (tracing)
|
|
|
|
fprintf (stderr, "%.4x: inst = %.4x ", PC, inst);
|
|
|
|
|
|
|
|
rd = GET_RD;
|
|
|
|
rb = GET_RB;
|
|
|
|
ra = GET_RA;
|
|
|
|
/* immword = IMM_W; */
|
|
|
|
|
|
|
|
oldpc = PC;
|
|
|
|
delay_slot_enable = 0;
|
|
|
|
branch_taken = 0;
|
|
|
|
if (op == microblaze_brk)
|
2015-06-09 10:10:49 +02:00
|
|
|
sim_engine_halt (sd, NULL, NULL, NULL_CIA, sim_stopped, SIM_SIGTRAP);
|
2009-09-23 22:01:47 +02:00
|
|
|
else if (inst == MICROBLAZE_HALT_INST)
|
|
|
|
{
|
|
|
|
insts += 1;
|
|
|
|
bonus_cycles++;
|
2015-06-09 10:10:49 +02:00
|
|
|
sim_engine_halt (sd, NULL, NULL, NULL_CIA, sim_exited, RETREG);
|
2009-09-23 22:01:47 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
switch(op)
|
|
|
|
{
|
|
|
|
#define INSTRUCTION(NAME, OPCODE, TYPE, ACTION) \
|
|
|
|
case NAME: \
|
|
|
|
ACTION; \
|
|
|
|
break;
|
|
|
|
#include "microblaze.isa"
|
|
|
|
#undef INSTRUCTION
|
|
|
|
|
|
|
|
default:
|
2015-06-09 10:10:49 +02:00
|
|
|
sim_engine_halt (sd, NULL, NULL, NULL_CIA, sim_signalled,
|
|
|
|
SIM_SIGILL);
|
2009-09-23 22:01:47 +02:00
|
|
|
fprintf (stderr, "ERROR: Unknown opcode\n");
|
|
|
|
}
|
|
|
|
/* Make R0 consistent */
|
|
|
|
CPU.regs[0] = 0;
|
|
|
|
|
|
|
|
/* Check for imm instr */
|
|
|
|
if (op == imm)
|
|
|
|
IMM_ENABLE = 1;
|
|
|
|
else
|
|
|
|
IMM_ENABLE = 0;
|
|
|
|
|
|
|
|
/* Update cycle counts */
|
|
|
|
insts ++;
|
|
|
|
if (insn_type == memory_store_inst || insn_type == memory_load_inst)
|
|
|
|
memops++;
|
|
|
|
if (insn_type == mult_inst)
|
|
|
|
bonus_cycles++;
|
|
|
|
if (insn_type == barrel_shift_inst)
|
|
|
|
bonus_cycles++;
|
|
|
|
if (insn_type == anyware_inst)
|
|
|
|
bonus_cycles++;
|
|
|
|
if (insn_type == div_inst)
|
|
|
|
bonus_cycles += 33;
|
|
|
|
|
|
|
|
if ((insn_type == branch_inst || insn_type == return_inst)
|
2015-03-16 07:23:02 +01:00
|
|
|
&& branch_taken)
|
2009-09-23 22:01:47 +02:00
|
|
|
{
|
|
|
|
/* Add an extra cycle for taken branches */
|
|
|
|
bonus_cycles++;
|
|
|
|
/* For branch instructions handle the instruction in the delay slot */
|
2015-03-16 07:23:02 +01:00
|
|
|
if (delay_slot_enable)
|
2009-09-23 22:01:47 +02:00
|
|
|
{
|
|
|
|
newpc = PC;
|
|
|
|
PC = oldpc + INST_SIZE;
|
2015-04-12 11:49:31 +02:00
|
|
|
inst = MEM_RD_WORD (PC & 0xFFFFFFFC);
|
2009-09-23 22:01:47 +02:00
|
|
|
op = get_insn_microblaze (inst, &imm_unsigned, &insn_type,
|
|
|
|
&num_delay_slot);
|
|
|
|
if (op == invalid_inst)
|
|
|
|
fprintf (stderr, "Unknown instruction 0x%04x", inst);
|
|
|
|
if (tracing)
|
|
|
|
fprintf (stderr, "%.4x: inst = %.4x ", PC, inst);
|
|
|
|
rd = GET_RD;
|
|
|
|
rb = GET_RB;
|
|
|
|
ra = GET_RA;
|
|
|
|
/* immword = IMM_W; */
|
|
|
|
if (op == microblaze_brk)
|
|
|
|
{
|
2015-04-12 11:49:31 +02:00
|
|
|
if (STATE_VERBOSE_P (sd))
|
2009-09-23 22:01:47 +02:00
|
|
|
fprintf (stderr, "Breakpoint set in delay slot "
|
|
|
|
"(at address 0x%x) will not be honored\n", PC);
|
|
|
|
/* ignore the breakpoint */
|
|
|
|
}
|
|
|
|
else if (insn_type == branch_inst || insn_type == return_inst)
|
|
|
|
{
|
2015-04-12 11:49:31 +02:00
|
|
|
if (STATE_VERBOSE_P (sd))
|
2009-09-23 22:01:47 +02:00
|
|
|
fprintf (stderr, "Cannot have branch or return instructions "
|
|
|
|
"in delay slot (at address 0x%x)\n", PC);
|
2015-06-09 10:10:49 +02:00
|
|
|
sim_engine_halt (sd, NULL, NULL, NULL_CIA, sim_signalled,
|
|
|
|
SIM_SIGILL);
|
2009-09-23 22:01:47 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
switch(op)
|
|
|
|
{
|
|
|
|
#define INSTRUCTION(NAME, OPCODE, TYPE, ACTION) \
|
|
|
|
case NAME: \
|
|
|
|
ACTION; \
|
|
|
|
break;
|
|
|
|
#include "microblaze.isa"
|
|
|
|
#undef INSTRUCTION
|
|
|
|
|
|
|
|
default:
|
2015-06-09 10:10:49 +02:00
|
|
|
sim_engine_halt (sd, NULL, NULL, NULL_CIA,
|
|
|
|
sim_signalled, SIM_SIGILL);
|
2009-09-23 22:01:47 +02:00
|
|
|
fprintf (stderr, "ERROR: Unknown opcode at 0x%x\n", PC);
|
|
|
|
}
|
|
|
|
/* Update cycle counts */
|
|
|
|
insts++;
|
|
|
|
if (insn_type == memory_store_inst
|
2015-03-16 07:23:02 +01:00
|
|
|
|| insn_type == memory_load_inst)
|
2009-09-23 22:01:47 +02:00
|
|
|
memops++;
|
|
|
|
if (insn_type == mult_inst)
|
|
|
|
bonus_cycles++;
|
|
|
|
if (insn_type == barrel_shift_inst)
|
|
|
|
bonus_cycles++;
|
|
|
|
if (insn_type == anyware_inst)
|
|
|
|
bonus_cycles++;
|
|
|
|
if (insn_type == div_inst)
|
|
|
|
bonus_cycles += 33;
|
|
|
|
}
|
|
|
|
/* Restore the PC */
|
|
|
|
PC = newpc;
|
|
|
|
/* Make R0 consistent */
|
|
|
|
CPU.regs[0] = 0;
|
|
|
|
/* Check for imm instr */
|
|
|
|
if (op == imm)
|
|
|
|
IMM_ENABLE = 1;
|
|
|
|
else
|
|
|
|
IMM_ENABLE = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
/* no delay slot: increment cycle count */
|
|
|
|
bonus_cycles++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tracing)
|
|
|
|
fprintf (stderr, "\n");
|
2015-06-09 10:10:49 +02:00
|
|
|
|
|
|
|
if (sim_events_tick (sd))
|
|
|
|
sim_events_process (sd);
|
2009-09-23 22:01:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Hide away the things we've cached while executing. */
|
|
|
|
/* CPU.pc = pc; */
|
|
|
|
CPU.insts += insts; /* instructions done ... */
|
|
|
|
CPU.cycles += insts; /* and each takes a cycle */
|
|
|
|
CPU.cycles += bonus_cycles; /* and extra cycles for branches */
|
|
|
|
CPU.cycles += memops; /* and memop cycle delays */
|
|
|
|
}
|
|
|
|
|
2015-12-30 09:28:45 +01:00
|
|
|
static int
|
|
|
|
microblaze_reg_store (SIM_CPU *cpu, int rn, unsigned char *memory, int length)
|
2009-09-23 22:01:47 +02:00
|
|
|
{
|
|
|
|
if (rn < NUM_REGS + NUM_SPECIAL && rn >= 0)
|
|
|
|
{
|
|
|
|
if (length == 4)
|
|
|
|
{
|
|
|
|
/* misalignment safe */
|
|
|
|
long ival = microblaze_extract_unsigned_integer (memory, 4);
|
|
|
|
if (rn < NUM_REGS)
|
|
|
|
CPU.regs[rn] = ival;
|
|
|
|
else
|
|
|
|
CPU.spregs[rn-NUM_REGS] = ival;
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-12-30 09:28:45 +01:00
|
|
|
static int
|
|
|
|
microblaze_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *memory, int length)
|
2009-09-23 22:01:47 +02:00
|
|
|
{
|
|
|
|
long ival;
|
2015-03-29 23:40:30 +02:00
|
|
|
|
2009-09-23 22:01:47 +02:00
|
|
|
if (rn < NUM_REGS + NUM_SPECIAL && rn >= 0)
|
|
|
|
{
|
|
|
|
if (length == 4)
|
|
|
|
{
|
|
|
|
if (rn < NUM_REGS)
|
|
|
|
ival = CPU.regs[rn];
|
|
|
|
else
|
|
|
|
ival = CPU.spregs[rn-NUM_REGS];
|
|
|
|
|
|
|
|
/* misalignment-safe */
|
|
|
|
microblaze_store_unsigned_integer (memory, 4, ival);
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
sim_info (SIM_DESC sd, int verbose)
|
|
|
|
{
|
2015-03-29 23:40:30 +02:00
|
|
|
SIM_CPU *cpu = STATE_CPU (sd, 0);
|
|
|
|
host_callback *callback = STATE_CALLBACK (sd);
|
|
|
|
|
2009-09-23 22:01:47 +02:00
|
|
|
callback->printf_filtered (callback, "\n\n# instructions executed %10d\n",
|
|
|
|
CPU.insts);
|
|
|
|
callback->printf_filtered (callback, "# cycles %10d\n",
|
|
|
|
(CPU.cycles) ? CPU.cycles+2 : 0);
|
|
|
|
}
|
|
|
|
|
2015-04-17 08:16:10 +02:00
|
|
|
static sim_cia
|
|
|
|
microblaze_pc_get (sim_cpu *cpu)
|
|
|
|
{
|
|
|
|
return cpu->microblaze_cpu.spregs[0];
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
microblaze_pc_set (sim_cpu *cpu, sim_cia pc)
|
|
|
|
{
|
|
|
|
cpu->microblaze_cpu.spregs[0] = pc;
|
|
|
|
}
|
|
|
|
|
2015-03-29 23:40:30 +02:00
|
|
|
static void
|
|
|
|
free_state (SIM_DESC sd)
|
|
|
|
{
|
|
|
|
if (STATE_MODULES (sd) != NULL)
|
|
|
|
sim_module_uninstall (sd);
|
|
|
|
sim_cpu_free_all (sd);
|
|
|
|
sim_state_free (sd);
|
|
|
|
}
|
|
|
|
|
2009-09-23 22:01:47 +02:00
|
|
|
SIM_DESC
|
2016-01-03 07:51:44 +01:00
|
|
|
sim_open (SIM_OPEN_KIND kind, host_callback *cb,
|
|
|
|
struct bfd *abfd, char * const *argv)
|
2009-09-23 22:01:47 +02:00
|
|
|
{
|
2015-03-29 23:40:30 +02:00
|
|
|
int i;
|
|
|
|
SIM_DESC sd = sim_state_alloc (kind, cb);
|
|
|
|
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 (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK)
|
|
|
|
{
|
|
|
|
free_state (sd);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
|
|
|
|
{
|
|
|
|
free_state (sd);
|
|
|
|
return 0;
|
|
|
|
}
|
2009-09-23 22:01:47 +02:00
|
|
|
|
2016-01-04 03:40:34 +01:00
|
|
|
/* The parser will print an error message for us, so we silently return. */
|
2015-03-29 23:40:30 +02:00
|
|
|
if (sim_parse_args (sd, argv) != SIM_RC_OK)
|
|
|
|
{
|
|
|
|
free_state (sd);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check for/establish the a reference program image. */
|
|
|
|
if (sim_analyze_program (sd,
|
|
|
|
(STATE_PROG_ARGV (sd) != NULL
|
|
|
|
? *STATE_PROG_ARGV (sd)
|
|
|
|
: NULL), abfd) != SIM_RC_OK)
|
|
|
|
{
|
|
|
|
free_state (sd);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Configure/verify the target byte order and other runtime
|
|
|
|
configuration options. */
|
|
|
|
if (sim_config (sd) != SIM_RC_OK)
|
|
|
|
{
|
|
|
|
sim_module_uninstall (sd);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sim_post_argv_init (sd) != SIM_RC_OK)
|
|
|
|
{
|
|
|
|
/* Uninstall the modules to avoid memory leaks,
|
|
|
|
file descriptor leaks, etc. */
|
|
|
|
sim_module_uninstall (sd);
|
|
|
|
return 0;
|
|
|
|
}
|
2009-09-23 22:01:47 +02:00
|
|
|
|
2015-03-29 23:40:30 +02:00
|
|
|
/* CPU specific initialization. */
|
|
|
|
for (i = 0; i < MAX_NR_PROCESSORS; ++i)
|
|
|
|
{
|
|
|
|
SIM_CPU *cpu = STATE_CPU (sd, i);
|
|
|
|
|
2015-12-30 09:28:45 +01:00
|
|
|
CPU_REG_FETCH (cpu) = microblaze_reg_fetch;
|
|
|
|
CPU_REG_STORE (cpu) = microblaze_reg_store;
|
2015-04-17 08:16:10 +02:00
|
|
|
CPU_PC_FETCH (cpu) = microblaze_pc_get;
|
|
|
|
CPU_PC_STORE (cpu) = microblaze_pc_set;
|
|
|
|
|
2015-03-29 23:40:30 +02:00
|
|
|
set_initial_gprs (cpu);
|
|
|
|
}
|
2009-09-23 22:01:47 +02:00
|
|
|
|
2015-04-12 11:49:31 +02:00
|
|
|
/* Default to a 8 Mbyte (== 2^23) memory space. */
|
|
|
|
sim_do_commandf (sd, "memory-size 0x800000");
|
|
|
|
|
2015-03-29 23:40:30 +02:00
|
|
|
return sd;
|
2009-09-23 22:01:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
SIM_RC
|
2016-01-03 07:51:44 +01:00
|
|
|
sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd,
|
|
|
|
char * const *argv, char * const *env)
|
2009-09-23 22:01:47 +02:00
|
|
|
{
|
2015-03-29 23:40:30 +02:00
|
|
|
SIM_CPU *cpu = STATE_CPU (sd, 0);
|
2009-09-23 22:01:47 +02:00
|
|
|
|
|
|
|
PC = bfd_get_start_address (prog_bfd);
|
|
|
|
|
|
|
|
return SIM_RC_OK;
|
|
|
|
}
|