/* Data dependence does not imply read ordering. */
#define AO_NO_DD_ORDERING
+#ifdef AO_ICE9A1_LLSC_WAR
+ /* ICE9 rev A1 chip (used in very few systems) is reported to */
+ /* have a low-frequency bug that causes LL to fail. */
+ /* To workaround, just issue the second 'LL'. */
+# define AO_MIPS_LL_FIX(args_str) \
+ " ll " args_str "\n"
+#else
+# define AO_MIPS_LL_FIX(args_str) ""
+#endif
+
AO_INLINE void
AO_nop_full(void)
{
" .set noreorder\n"
" .set nomacro\n"
"1: ll %0, %2\n"
+ AO_MIPS_LL_FIX("%0, %2")
" addu %1, %0, %3\n"
" sc %1, %2\n"
" beqz %1, 1b\n"
" .set noreorder\n"
" .set nomacro\n"
"1: ll %0, %2\n"
+ AO_MIPS_LL_FIX("%0, %2")
" move %1, %3\n"
" sc %1, %2\n"
" beqz %1, 1b\n"
" .set noreorder \n"
" .set nomacro \n"
"1: ll %0, %1 \n"
+ AO_MIPS_LL_FIX("%0, %1")
" bne %0, %4, 2f \n"
" move %0, %3 \n"
" sc %0, %1 \n"
" .set noreorder\n"
" .set nomacro\n"
"1: ll %0, %2\n"
+ AO_MIPS_LL_FIX("%0, %2")
" bne %0, %4, 2f\n"
" move %1, %3\n"
" sc %1, %2\n"