loop because, e.g., the compiler might decide to unroll the
loop when passed a constant, etc.
br.ret.sptk.many rp
END(ia64_switch_mode_virt)
+GLOBAL_ENTRY(ia64_delay_loop)
+ .prologue
+{ nop 0 // work around GAS unwind info generation bug...
+ .save ar.lc,r2
+ mov r2=ar.lc
+ .body
+ ;;
+ mov ar.lc=r32
+}
+ ;;
+ // force loop to be 32-byte aligned (GAS bug means we cannot use .align
+ // inside function body without corrupting unwind info).
+{ nop 0 }
+1: br.cloop.sptk.few 1b
+ ;;
+ mov ar.lc=r2
+ br.ret.sptk.many rp
+END(ia64_delay_loop)
+
#ifdef CONFIG_IA64_BRL_EMU
/*
return result;
}
+extern void ia64_delay_loop (unsigned long loops);
+
static __inline__ void
__delay (unsigned long loops)
{
- if (loops < 1)
+ if (unlikely(loops < 1))
return;
- while (loops--)
- barrier();
+ ia64_delay_loop (loops - 1);
}
static __inline__ void