summaryrefslogtreecommitdiff
path: root/src/jit/codegenarmarch.cpp
diff options
context:
space:
mode:
authorSteve MacLean, Qualcomm Datacenter Technologies, Inc <sdmaclea@qti.qualcomm.com>2017-06-05 19:06:40 +0000
committerSteve MacLean, Qualcomm Datacenter Technologies, Inc <sdmaclea@qti.qualcomm.com>2017-06-05 20:31:55 +0000
commitb0455ff26ec87a835ea9ca17fc19170cc995d3c6 (patch)
treec82925b04f736a0e7c9d31442e6d9d30e83748f6 /src/jit/codegenarmarch.cpp
parent69b057f0292628bc0071ed0c8440f496f060813f (diff)
downloadcoreclr-b0455ff26ec87a835ea9ca17fc19170cc995d3c6.tar.gz
coreclr-b0455ff26ec87a835ea9ca17fc19170cc995d3c6.tar.bz2
coreclr-b0455ff26ec87a835ea9ca17fc19170cc995d3c6.zip
[Arm64] Respond to review comments
Diffstat (limited to 'src/jit/codegenarmarch.cpp')
-rw-r--r--src/jit/codegenarmarch.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/jit/codegenarmarch.cpp b/src/jit/codegenarmarch.cpp
index 9b83a653b9..4f032aeaba 100644
--- a/src/jit/codegenarmarch.cpp
+++ b/src/jit/codegenarmarch.cpp
@@ -1339,14 +1339,16 @@ void CodeGen::genCodeForIndir(GenTreeIndir* tree)
emitAttr attr = emitTypeSize(tree);
instruction ins = ins_Load(targetType);
+ assert((attr != EA_1BYTE) || !(tree->gtFlags & GTF_IND_UNALIGNED));
+
genConsumeAddress(tree->Addr());
if (tree->gtFlags & GTF_IND_VOLATILE)
{
#ifdef _TARGET_ARM64_
GenTree* addr = tree->Addr();
- bool useLoadAcquire = (targetReg >= REG_INT_FIRST) && (targetReg <= REG_ZR) && !addr->isContained() &&
- varTypeIsUnsigned(targetType) &&
- ((attr == EA_1BYTE) || !(tree->gtFlags & GTF_IND_UNALIGNED));
+ bool useLoadAcquire = genIsValidIntReg(targetReg) && !addr->isContained() &&
+ (varTypeIsUnsigned(targetType) || varTypeIsI(targetType)) &&
+ !(tree->gtFlags & GTF_IND_UNALIGNED);
if (useLoadAcquire)
{