OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [cpu/] [common/] [parse.c] - Diff between revs 1487 and 1556

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1487 Rev 1556
Line 223... Line 223...
/* Changed parameters so address can be passed as argument */
/* Changed parameters so address can be passed as argument */
void addprogram(oraddr_t address, uint32_t insn, int* breakpoint)
void addprogram(oraddr_t address, uint32_t insn, int* breakpoint)
{
{
  int vaddr = (!runtime.sim.filename) ? translate(address,breakpoint) : translate(freemem,breakpoint);
  int vaddr = (!runtime.sim.filename) ? translate(address,breakpoint) : translate(freemem,breakpoint);
 
 
  set_program32 (vaddr, insn);
  /* We can't have set_program32 functions since it is not gauranteed that the
 
   * section we're loading is aligned on a 4-byte boundry */
 
  set_program8 (vaddr, (insn >> 24) & 0xff);
 
  set_program8 (vaddr + 1, (insn >> 16) & 0xff);
 
  set_program8 (vaddr + 2, (insn >> 8) & 0xff);
 
  set_program8 (vaddr + 3, insn & 0xff);
#if IMM_STATS
#if IMM_STATS
  check_insn (insn);
  check_insn (insn);
#endif
#endif
  if(runtime.sim.filename)
  if(runtime.sim.filename)
    freemem += insn_len (insn_decode (insn));
    freemem += insn_len (insn_decode (insn));

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.