From: simonmar Date: Fri, 18 Nov 2005 15:13:46 +0000 (+0000) Subject: [project @ 2005-11-18 15:13:46 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~39 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=cbd29e0a23bb8e15033edae123d6c8fbe9740c97;p=ghc-hetmet.git [project @ 2005-11-18 15:13:46 by simonmar] Add wcStore(), a write-combining store if supported (I tried using it in the update code and only succeeded in making things slower, but it might come in handy in the future) --- diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index 9977d57..a63b7ec 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -367,6 +367,24 @@ INLINE_HEADER StgInt64 PK_Int64(W_ p_src[]) #endif /* ----------------------------------------------------------------------------- + Write-combining store + -------------------------------------------------------------------------- */ + +INLINE_HEADER void +wcStore (StgPtr p, StgWord w) +{ +#ifdef x86_64_HOST_ARCH + __asm__( + "movnti\t%1, %0" + : "=m" (*p) + : "r" (w) + ); +#else + *p = w; +#endif +} + +/* ----------------------------------------------------------------------------- Integer multiply with overflow -------------------------------------------------------------------------- */