diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-04-28 22:34:01 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-23 15:12:37 +0200 |
commit | e0cc3a42eb50593a50e2b99d9dc92b4279f2efda (patch) | |
tree | 7676dd1588614c9b8b5e250eecfc89b57cf8464d /arch/mips/include/asm/fpu_emulator.h | |
parent | 3f7cac416b5e62d37aa693538729c6c23e9b938b (diff) | |
download | blackbird-op-linux-e0cc3a42eb50593a50e2b99d9dc92b4279f2efda.tar.gz blackbird-op-linux-e0cc3a42eb50593a50e2b99d9dc92b4279f2efda.zip |
MIPS: math-emu: Inline fpu_emulator_init_fpu()
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/fpu_emulator.h')
-rw-r--r-- | arch/mips/include/asm/fpu_emulator.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/mips/include/asm/fpu_emulator.h b/arch/mips/include/asm/fpu_emulator.h index 2abb587d5ab4..f761719eab65 100644 --- a/arch/mips/include/asm/fpu_emulator.h +++ b/arch/mips/include/asm/fpu_emulator.h @@ -23,9 +23,12 @@ #ifndef _ASM_FPU_EMULATOR_H #define _ASM_FPU_EMULATOR_H +#include <linux/sched.h> #include <asm/break.h> +#include <asm/thread_info.h> #include <asm/inst.h> #include <asm/local.h> +#include <asm/processor.h> #ifdef CONFIG_DEBUG_FS @@ -71,4 +74,17 @@ int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, */ #define BREAK_MATH (0x0000000d | (BRK_MEMU << 16)) +#define SIGNALLING_NAN 0x7ff800007ff80000LL + +static inline void fpu_emulator_init_fpu(void) +{ + struct task_struct *t = current; + int i; + + t->thread.fpu.fcr31 = 0; + + for (i = 0; i < 32; i++) + set_fpr64(&t->thread.fpu.fpr[i], 0, SIGNALLING_NAN); +} + #endif /* _ASM_FPU_EMULATOR_H */ |