added missing memory barrier to asm statements - BaS crashed with compiler optimizations

This commit is contained in:
Markus Fröschle
2013-12-30 23:59:07 +00:00
parent a8cf67e097
commit f9e0e76188

View File

@@ -43,7 +43,7 @@
#if MACHINE_FIREBEE #if MACHINE_FIREBEE
#define pci_config_wait() wait(40000); /* FireBee USB not properly detected otherwise !?? */ #define pci_config_wait() wait(40000); /* FireBee USB not properly detected otherwise !?? */
#elif MACHINE_M5484LITE #elif MACHINE_M5484LITE
#define pci_config_wait() do { __asm__ __volatile("tpf" :::); } while (0) #define pci_config_wait() do { __asm__ __volatile("tpf" ::: "memory"); } while (0)
#endif #endif
/* /*
@@ -130,7 +130,7 @@ __attribute__((aligned(16))) void chip_errata_135(void)
" tpf.l #0x0\n\t" " tpf.l #0x0\n\t"
" tpf.l #0x0\n\t" " tpf.l #0x0\n\t"
" tpf.l #0x0\n\t" " tpf.l #0x0\n\t"
:::); ::: "memory");
} }