Commit cbd29e0a authored by simonmar's avatar simonmar

[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)
parent 6aa27c72
......@@ -366,6 +366,24 @@ INLINE_HEADER StgInt64 PK_Int64(W_ p_src[])
#define __STG_SPLIT_MARKER /* nothing */
#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
-------------------------------------------------------------------------- */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment