summaryrefslogtreecommitdiff
path: root/arch/mips/cpu/mips64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/cpu/mips64')
-rw-r--r--arch/mips/cpu/mips64/start.S7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/cpu/mips64/start.S b/arch/mips/cpu/mips64/start.S
index 4112de7026..2b8d531e73 100644
--- a/arch/mips/cpu/mips64/start.S
+++ b/arch/mips/cpu/mips64/start.S
@@ -108,7 +108,12 @@ reset:
mtc0 t0, CP0_CONFIG
#endif
- /* Initialize $gp */
+ /*
+ * Initialize $gp, force 8 byte alignment of bal instruction to forbid
+ * the compiler to put nop's between bal and _gp. This is required to
+ * keep _gp and ra aligned to 8 byte.
+ */
+ .align 3
bal 1f
nop
.dword _gp