URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [or1ksim/] [cpu/] [or1k/] [sprs.h] - Diff between revs 997 and 1350
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 997 |
Rev 1350 |
Line 20... |
Line 20... |
#include "spr_defs.h"
|
#include "spr_defs.h"
|
|
|
typedef unsigned long sprword;
|
typedef unsigned long sprword;
|
|
|
/* Prototypes */
|
/* Prototypes */
|
inline void mtspr(const int regno, const sprword value);
|
inline void mtspr(uint16_t regno, const sprword value);
|
static inline sprword mfspr_(const int regno);
|
static inline sprword mfspr_(const uint16_t regno);
|
extern sprword sprs[MAX_SPRS];
|
extern sprword sprs[MAX_SPRS];
|
#define mfspr(regno) mfspr_(regno)
|
#define mfspr(regno) mfspr_(regno)
|
|
|
static inline void setsprbit(const int regno, const int bitnum, const unsigned long bitvalue);
|
static inline void setsprbit(const int regno, const int bitnum, const unsigned long bitvalue);
|
static inline int getsprbit(const int regno, const int bitnum);
|
static inline int getsprbit(const int regno, const int bitnum);
|
Line 35... |
Line 35... |
#include "tick.h"
|
#include "tick.h"
|
|
|
/* Ugly, but fast */
|
/* Ugly, but fast */
|
/* Get a specific SPR. */
|
/* Get a specific SPR. */
|
static inline sprword
|
static inline sprword
|
mfspr_(const int regno)
|
mfspr_(const uint16_t regno)
|
{
|
{
|
extern unsigned long reg[32];
|
extern unsigned long reg[32];
|
extern unsigned long pc;
|
|
extern unsigned long pcprev;
|
extern unsigned long pcprev;
|
extern sprword sprs[MAX_SPRS];
|
extern sprword sprs[MAX_SPRS];
|
|
|
switch (regno) {
|
switch (regno) {
|
case SPR_NPC:
|
case SPR_NPC:
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.