File: fpu.h

package info (click to toggle)
linux 6.12.69-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie-proposed-updates
  • size: 1,675,776 kB
  • sloc: ansic: 25,915,311; asm: 269,652; sh: 136,658; python: 65,456; makefile: 55,720; perl: 37,753; xml: 19,284; cpp: 5,895; yacc: 4,927; lex: 2,939; awk: 1,594; sed: 28; ruby: 25
file content (22 lines) | stat: -rw-r--r-- 468 bytes parent folder | download | duplicates (23)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_OPENRISC_FPU_H
#define __ASM_OPENRISC_FPU_H

struct task_struct;

#ifdef CONFIG_FPU
static inline void save_fpu(struct task_struct *task)
{
	task->thread.fpcsr = mfspr(SPR_FPCSR);
}

static inline void restore_fpu(struct task_struct *task)
{
	mtspr(SPR_FPCSR, task->thread.fpcsr);
}
#else
#define save_fpu(tsk)			do { } while (0)
#define restore_fpu(tsk)		do { } while (0)
#endif

#endif /* __ASM_OPENRISC_FPU_H */