svn commit: r221889 - head/sys/ia64/include
Marcel Moolenaar
marcel at FreeBSD.org
Sat May 14 14:36:08 UTC 2011
Author: marcel
Date: Sat May 14 14:36:08 2011
New Revision: 221889
URL: http://svn.freebsd.org/changeset/base/221889
Log:
Turn ia64_srlz() and ia64_srlz_i() into defines so that the code is
still correct when inlining is disabled.
Modified:
head/sys/ia64/include/ia64_cpu.h
Modified: head/sys/ia64/include/ia64_cpu.h
==============================================================================
--- head/sys/ia64/include/ia64_cpu.h Sat May 14 14:25:15 2011 (r221888)
+++ head/sys/ia64/include/ia64_cpu.h Sat May 14 14:36:08 2011 (r221889)
@@ -508,17 +508,14 @@ ia64_enable_highfp(void)
__asm __volatile("rsm psr.dfh;; srlz.d");
}
-static __inline void
-ia64_srlz_d(void)
-{
- __asm __volatile("srlz.d");
-}
-
-static __inline void
-ia64_srlz_i(void)
-{
- __asm __volatile("srlz.i;;");
-}
+/*
+ * Avoid inline functions for the following so that they still work
+ * correctly when inlining is not enabled (e.g. -O0). Function calls
+ * need data serialization after setting psr, which results in a
+ * hazard.
+ */
+#define ia64_srlz_d() __asm __volatile("srlz.d")
+#define ia64_srlz_i() __asm __volatile("srlz.i;;")
#endif /* !LOCORE */
More information about the svn-src-all
mailing list