0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _SPARC64_FPUMACRO_H
0009 #define _SPARC64_FPUMACRO_H
0010
0011 #include <asm/asi.h>
0012 #include <asm/visasm.h>
0013
0014 struct fpustate {
0015 u32 regs[64];
0016 };
0017
0018 #define FPUSTATE (struct fpustate *)(current_thread_info()->fpregs)
0019
0020 static inline unsigned long fprs_read(void)
0021 {
0022 unsigned long retval;
0023
0024 __asm__ __volatile__("rd %%fprs, %0" : "=r" (retval));
0025
0026 return retval;
0027 }
0028
0029 static inline void fprs_write(unsigned long val)
0030 {
0031 __asm__ __volatile__("wr %0, 0x0, %%fprs" : : "r" (val));
0032 }
0033
0034 #endif