From 93f6a6771ba04b217e4c8bbca9196fd16e364479 Mon Sep 17 00:00:00 2001 From: wdenk Date: Thu, 1 Jul 2004 20:28:03 +0000 Subject: * Patches by Richard Woodruff, 10 Jun 2004: - fix problems with examples/stubs.c for GCC >= 3.4 - fix problems with gd initialization * Enable FAT filesystem support for HMI10 board --- lib_nios/board.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib_nios') diff --git a/lib_nios/board.c b/lib_nios/board.c index 30044f7ad..e6cda521e 100644 --- a/lib_nios/board.c +++ b/lib_nios/board.c @@ -117,6 +117,9 @@ void board_init (void) * Nios treats CFG_GBL_DATA_OFFSET as an address. */ gd = (gd_t *)CFG_GBL_DATA_OFFSET; + /* compiler optimization barrier needed for GCC >= 3.4 */ + __asm__ __volatile__("": : :"memory"); + memset( gd, 0, CFG_GBL_DATA_SIZE ); gd->bd = (bd_t *)(gd+1); /* At end of global data */ -- cgit v1.2.3