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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc1/] [or1ksim/] [cpu/] [or1k/] [sprs.c] - Diff between revs 1308 and 1350

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

Rev 1308 Rev 1350
Line 20... Line 20...
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <errno.h>
#include <errno.h>
 
 
 
#include "config.h"
 
 
 
#ifdef HAVE_INTTYPES_H
 
#include <inttypes.h>
 
#endif
 
 
 
#include "port.h"
#include "arch.h"
#include "arch.h"
#include "sprs.h"
 
#include "abstract.h"
#include "abstract.h"
 
#include "sprs.h"
#include "sim-config.h"
#include "sim-config.h"
#include "except.h"
#include "except.h"
 
#include "execute.h"
 
 
extern int flag;
extern int flag;
 
 
sprword sprs[MAX_SPRS];
sprword sprs[MAX_SPRS];
 
 
int audio_cnt = 0;
int audio_cnt = 0;
 
 
static FILE *fo = 0;
static FILE *fo = 0;
/* Set a specific SPR with a value. */
/* Set a specific SPR with a value. */
inline void
inline void
mtspr(int regno, const sprword value)
mtspr(uint16_t regno, const sprword value)
{
{
  regno %= MAX_SPRS;
  regno %= MAX_SPRS;
  sprs[regno] = value;
  sprs[regno] = value;
 
 
  /* MM: Register hooks.  */
  /* MM: Register hooks.  */
Line 56... Line 64...
    else flag = 0;
    else flag = 0;
    sprs[regno] |= SPR_SR_FO;
    sprs[regno] |= SPR_SR_FO;
    break;
    break;
  case SPR_NPC:
  case SPR_NPC:
    {
    {
      extern unsigned long pc;
 
      extern unsigned long pcnext;
 
      extern int delay_insn;
      extern int delay_insn;
 
 
      clear_pending_exception ();
      clear_pending_exception ();
 
 
      /* The debugger has redirected us to a new address */
      /* The debugger has redirected us to a new address */

powered by: WebSVN 2.1.0

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