Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions druntime/src/__builtins_msvc.d
Original file line number Diff line number Diff line change
Expand Up @@ -1357,9 +1357,18 @@ version (MSVCIntrinsics)
}
}

version (X86_64_Or_X86)
{
/* prfchw forces prefetchw to be emitted on x86 (which is how MSVC behaves). */
private enum prefetchWriteTarget = "prfchw";
}
else
{
private enum prefetchWriteTarget = "";
}

/* This is trusted so that it's @safe without DIP1000 enabled. */
/* prfchw forces prefetchw to be emitted on x86 (which is how MSVC behaves). */
@llvm_target("prfchw")
@llvm_target(prefetchWriteTarget)
extern(C)
pragma(inline, true)
private void prefetchData(bool write, ubyte level)(scope const(void)* address) @trusted pure nothrow @nogc
Expand Down Expand Up @@ -1528,7 +1537,7 @@ version (MSVCIntrinsics)
}

/* This is trusted so that it's @safe without DIP1000 enabled. */
@safe pure nothrow @nogc unittest
@trusted pure nothrow @nogc unittest
{
static bool test()
{
Expand Down
Loading