License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6/btrfs-unstable.git] / arch / sparc / include / asm / fpumacro.h
blobbc378df97fa8b6d55a3f52c924aed72aaaca2084
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* fpumacro.h: FPU related macros.
4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
5 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
6 */
8 #ifndef _SPARC64_FPUMACRO_H
9 #define _SPARC64_FPUMACRO_H
11 #include <asm/asi.h>
12 #include <asm/visasm.h>
14 struct fpustate {
15 u32 regs[64];
18 #define FPUSTATE (struct fpustate *)(current_thread_info()->fpregs)
20 static inline unsigned long fprs_read(void)
22 unsigned long retval;
24 __asm__ __volatile__("rd %%fprs, %0" : "=r" (retval));
26 return retval;
29 static inline void fprs_write(unsigned long val)
31 __asm__ __volatile__("wr %0, 0x0, %%fprs" : : "r" (val));
34 #endif /* !(_SPARC64_FPUMACRO_H) */