diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2015-03-24 16:35:00 +0000 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2015-03-24 16:35:00 +0000 |
| commit | 1e8781edb296be22fed3bd5588151e465ac5c4ac (patch) | |
| tree | 9c6d1fa0494e3c6f1277e74b1cb7c3d504d027d7 /Linux/spim | |
| parent | 662e797001aeaf4a8acfe46e5c12a52b862ff492 (diff) | |
empty fpuctl.h
Diffstat (limited to 'Linux/spim')
| -rw-r--r-- | Linux/spim/include/fpuctl.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/Linux/spim/include/fpuctl.h b/Linux/spim/include/fpuctl.h index ad5dcba7..e69de29b 100644 --- a/Linux/spim/include/fpuctl.h +++ b/Linux/spim/include/fpuctl.h @@ -1,65 +0,0 @@ -/* FCR */ -#define FCRBITS 0x00000F83 -#define FPINEX (1<<7) -#define FPUNFL (1<<8) -#define FPOVFL (1<<9) -#define FPZDIV (1<<10) -#define FPINVAL (1<<11) -#define FPRNR (0<<0) -#define FPRZ (1<<0) -#define FPRPINF (2<<0) -#define FPRNINF (3<<0) -#define FPRMASK (3<<0) -#define FPPEXT 0 -#define FPPSGL 0 -#define FPPDBL 0 -#define FPPMASK 0 -/* FSR */ -#define FSRBITS 0x0003F07C -#define FPAINEX (1<<2) -#define FPAOVFL (1<<4) -#define FPAUNFL (1<<3) -#define FPAZDIV (1<<5) -#define FPAINVAL (1<<6) - -/* - * Linux mips fpu support - * Mimic Plan9 floating point support - */ - -static void -setfcr(ulong fcr) -{ - __asm__("ctc1 %0,$31\n" - : :"r" (fcr) - ); -} - -static ulong -getfcr(void) -{ - ulong fcr = 0; - __asm__("cfc1 %0,$31\n" - : "=r" (fcr) - ); - fcr &= FCRBITS; - return fcr; -} - -static ulong -getfsr(void) -{ - ulong fsr = 0; - __asm__("cfc1 %0,$31\n" - : "=r" (fsr) - ); - fsr &= FSRBITS; - return fsr; -} - -static void -setfsr(ulong fsr) -{ - fsr |= getfcr(); - setfcr(getfcr()|fsr); -} |
