Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/mips/cfe_prestart.S')
-rw-r--r--libgloss/mips/cfe_prestart.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/libgloss/mips/cfe_prestart.S b/libgloss/mips/cfe_prestart.S
index 4a1db5392..8548c1e47 100644
--- a/libgloss/mips/cfe_prestart.S
+++ b/libgloss/mips/cfe_prestart.S
@@ -64,3 +64,23 @@ _prestart:
jr v0
nop
.end _prestart
+
+
+/* Avoid worst-case execution hazards. This is targetted at the SB-1
+ pipe, and is much worse than it needs to be (not even counting
+ the subroutine call and return). */
+ .globl hardware_hazard_hook
+ .ent hardware_hazard_hook
+hardware_hazard_hook:
+ .set push
+ .set mips32
+ .set noreorder
+ ssnop
+ ssnop
+ ssnop
+ bnel $0, $0, .+4
+ ssnop
+ j ra
+ nop
+ .set pop
+ .end hardware_hazard_hook