summaryrefslogtreecommitdiff
path: root/lib_mips
diff options
context:
space:
mode:
Diffstat (limited to 'lib_mips')
-rw-r--r--lib_mips/board.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 7f5fa80..12df61f 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -193,6 +193,9 @@ void board_init_f(ulong bootflag)
/* Pointer is writable since we allocated a register for it.
*/
gd = &gd_data;
+ /* compiler optimization barrier needed for GCC >= 3.4 */
+ __asm__ __volatile__("": : :"memory");
+
memset ((void *)gd, 0, sizeof (gd_t));
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {