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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [cpu/] [or1k/] [sprs.h] - Diff between revs 123 and 167

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

Rev 123 Rev 167
Line 20... Line 20...
#include "spr_defs.h"
#include "spr_defs.h"
 
 
typedef unsigned long sprword;
typedef unsigned long sprword;
 
 
/* Prototypes */
/* Prototypes */
void mtspr(int regno, sprword value);
inline void mtspr(const int regno, const sprword value);
sprword mfspr(int regno);
inline sprword mfspr_(const int regno);
void setsprbit(int regno, int bitnum, unsigned long bitvalue);
#ifdef DEBUGMOD_OFF
int getsprbit(int regno, int bitnum);
extern sprword sprs[MAX_SPRS];
 
extern int cont_run;   /* defined in toplevel.c */
 
#define mfspr(regno)\
 
 ((regno == SPR_SR && temp_disable_except > 0)?(sprs[regno] & ~SPR_SR_EXR)\
 
  :((regno < MAX_SPRS)?(sprs[regno])\
 
  :((printf("\nABORT: read out of SPR range %08X\n", regno),\
 
    cont_run = 0))))
 
#else /* DEBUGMOD_OFF */
 
#define mfspr(regno) mfspr_(regno)
 
#endif /* DEBUGMOD_OFF */
 
 
 
inline void setsprbit(const int regno, const int bitnum, const unsigned long bitvalue);
 
inline int getsprbit(const int regno, const int bitnum);
void sprs_status();
void sprs_status();
 
 
/* MM: If set, disables exceptions for temp_disable_except cycles.  */
/* MM: If set, disables exceptions for temp_disable_except cycles.  */
extern int temp_disable_except;
extern int temp_disable_except;
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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