[MIPS] FPU hazard handling

Move FPU hazard handling to hazards.h and provide proper support for
MIPSR2 processors

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Chris Dearman
2007-05-08 16:09:13 +01:00
committed by Ralf Baechle
parent d725cf3818
commit 0b6249567b
2 changed files with 35 additions and 20 deletions

View File

@@ -178,4 +178,36 @@ ASMMACRO(back_to_back_c0_hazard,
#endif
/* FPU hazards */
#if defined(CONFIG_CPU_SB1)
ASMMACRO(enable_fpu_hazard,
.set push;
.set mips64;
.set noreorder;
_ssnop;
bnezl $0,.+4;
_ssnop
.set pop
)
ASMMACRO(disable_fpu_hazard,
)
#elif defined(CONFIG_CPU_MIPSR2)
ASMMACRO(enable_fpu_hazard,
_ehb
)
ASMMACRO(disable_fpu_hazard,
_ehb
)
#else
ASMMACRO(enable_fpu_hazard,
nop; nop; nop; nop
)
ASMMACRO(disable_fpu_hazard,
_ehb
)
#endif
#endif /* _ASM_HAZARDS_H */