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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-sparc64/] [fpumacro.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/* fpumacro.h: FPU related macros.
2
 *
3
 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
4
 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
5
 */
6
 
7
#ifndef _SPARC64_FPUMACRO_H
8
#define _SPARC64_FPUMACRO_H
9
 
10
#include <asm/asi.h>
11
#include <asm/visasm.h>
12
 
13
struct fpustate {
14
        u32     regs[64];
15
};
16
 
17
#define FPUSTATE (struct fpustate *)(((unsigned long)current) + AOFF_task_fpregs)
18
 
19
extern __inline__ unsigned long fprs_read(void)
20
{
21
        unsigned long retval;
22
 
23
        __asm__ __volatile__("rd %%fprs, %0" : "=r" (retval));
24
 
25
        return retval;
26
}
27
 
28
extern __inline__ void fprs_write(unsigned long val)
29
{
30
        __asm__ __volatile__("wr %0, 0x0, %%fprs" : : "r" (val));
31
}
32
 
33
#endif /* !(_SPARC64_FPUMACRO_H) */

powered by: WebSVN 2.1.0

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