From dc03be9d676e0d8d8df6831005f5738675936e4b Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 14 May 2011 14:36:08 +0000 Subject: [PATCH] Turn ia64_srlz() and ia64_srlz_i() into defines so that the code is still correct when inlining is disabled. --- sys/ia64/include/ia64_cpu.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sys/ia64/include/ia64_cpu.h b/sys/ia64/include/ia64_cpu.h index 92614fce628..bb8284d7ad9 100644 --- a/sys/ia64/include/ia64_cpu.h +++ b/sys/ia64/include/ia64_cpu.h @@ -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 */