summaryrefslogtreecommitdiff
path: root/src/jit/codegenarmarch.cpp
diff options
context:
space:
mode:
authorSteve MacLean <sdmaclea@qti.qualcomm.com>2017-05-12 12:44:08 -0400
committerRuss Keldorph <russ.keldorph@microsoft.com>2017-06-01 09:39:20 -0700
commit6179b52eb1d48933675f4bd319448d02c7cef0c4 (patch)
tree3da8a8efcf8fd174e9f8f3e5bc01ad6ca89e7591 /src/jit/codegenarmarch.cpp
parent1d2e6f8b131af5c4f684c35418ee6c14b417b316 (diff)
downloadcoreclr-6179b52eb1d48933675f4bd319448d02c7cef0c4.tar.gz
coreclr-6179b52eb1d48933675f4bd319448d02c7cef0c4.tar.bz2
coreclr-6179b52eb1d48933675f4bd319448d02c7cef0c4.zip
[Arm64] Use half barriers for IL Volatile implementation
Diffstat (limited to 'src/jit/codegenarmarch.cpp')
-rw-r--r--src/jit/codegenarmarch.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/jit/codegenarmarch.cpp b/src/jit/codegenarmarch.cpp
index e8391d1512..911f07e2cc 100644
--- a/src/jit/codegenarmarch.cpp
+++ b/src/jit/codegenarmarch.cpp
@@ -1343,8 +1343,13 @@ void CodeGen::genCodeForIndir(GenTreeIndir* tree)
if (tree->gtFlags & GTF_IND_VOLATILE)
{
+#ifdef _TARGET_ARM64_
+ // issue a INS_BARRIER_LD after a volatile LdInd operation
+ instGen_MemoryBarrier(INS_BARRIER_LD);
+#else
// issue a full memory barrier after a volatile LdInd operation
instGen_MemoryBarrier();
+#endif // _TARGET_ARM64_
}
}
@@ -1370,7 +1375,7 @@ void CodeGen::genCodeForCpBlk(GenTreeBlk* cpBlkNode)
if (cpBlkNode->gtFlags & GTF_BLK_VOLATILE)
{
- // issue a full memory barrier before & after a volatile CpBlkUnroll operation
+ // issue a full memory barrier before a volatile CpBlk operation
instGen_MemoryBarrier();
}
@@ -1378,8 +1383,13 @@ void CodeGen::genCodeForCpBlk(GenTreeBlk* cpBlkNode)
if (cpBlkNode->gtFlags & GTF_BLK_VOLATILE)
{
- // issue a full memory barrier before & after a volatile CpBlkUnroll operation
+#ifdef _TARGET_ARM64_
+ // issue a INS_BARRIER_LD after a volatile CpBlk operation
+ instGen_MemoryBarrier(INS_BARRIER_LD);
+#else
+ // issue a full memory barrier after a volatile CpBlk operation
instGen_MemoryBarrier();
+#endif // _TARGET_ARM64_
}
}