diff options
Diffstat (limited to 'arch/mips/include/asm/fpu_emulator.h')
-rw-r--r-- | arch/mips/include/asm/fpu_emulator.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/include/asm/fpu_emulator.h b/arch/mips/include/asm/fpu_emulator.h index 355dc25172e7..c05369e0b8d6 100644 --- a/arch/mips/include/asm/fpu_emulator.h +++ b/arch/mips/include/asm/fpu_emulator.h | |||
@@ -63,6 +63,8 @@ do { \ | |||
63 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, | 63 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, |
64 | struct mips_fpu_struct *ctx, int has_fpu, | 64 | struct mips_fpu_struct *ctx, int has_fpu, |
65 | void *__user *fault_addr); | 65 | void *__user *fault_addr); |
66 | void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr, | ||
67 | struct task_struct *tsk); | ||
66 | int process_fpemu_return(int sig, void __user *fault_addr, | 68 | int process_fpemu_return(int sig, void __user *fault_addr, |
67 | unsigned long fcr31); | 69 | unsigned long fcr31); |
68 | int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, | 70 | int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, |
@@ -81,4 +83,15 @@ static inline void fpu_emulator_init_fpu(void) | |||
81 | set_fpr64(&t->thread.fpu.fpr[i], 0, SIGNALLING_NAN); | 83 | set_fpr64(&t->thread.fpu.fpr[i], 0, SIGNALLING_NAN); |
82 | } | 84 | } |
83 | 85 | ||
86 | /* | ||
87 | * Mask the FCSR Cause bits according to the Enable bits, observing | ||
88 | * that Unimplemented is always enabled. | ||
89 | */ | ||
90 | static inline unsigned long mask_fcr31_x(unsigned long fcr31) | ||
91 | { | ||
92 | return fcr31 & (FPU_CSR_UNI_X | | ||
93 | ((fcr31 & FPU_CSR_ALL_E) << | ||
94 | (ffs(FPU_CSR_ALL_X) - ffs(FPU_CSR_ALL_E)))); | ||
95 | } | ||
96 | |||
84 | #endif /* _ASM_FPU_EMULATOR_H */ | 97 | #endif /* _ASM_FPU_EMULATOR_H */ |