summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2016-01-22 17:04:38 -0800
committerBrian Sullivan <briansul@microsoft.com>2016-01-22 17:04:38 -0800
commit6efa6a424f89c64c84e187febecbede717a3618b (patch)
tree7f2b96390864a0e7997c08f21a381f6b7a2f4de3
parente250224b18be293254225a77064185d5f83f03fc (diff)
downloadcoreclr-6efa6a424f89c64c84e187febecbede717a3618b.tar.gz
coreclr-6efa6a424f89c64c84e187febecbede717a3618b.tar.bz2
coreclr-6efa6a424f89c64c84e187febecbede717a3618b.zip
Fix issues on ARM64 with lvOtherArgReg being initialized to REG_STK
-rw-r--r--src/jit/lclvars.cpp12
-rw-r--r--src/jit/regalloc.cpp2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp
index afe8aaf408..e5a9e91639 100644
--- a/src/jit/lclvars.cpp
+++ b/src/jit/lclvars.cpp
@@ -429,6 +429,9 @@ void Compiler::lvaInitThisPtr(InitVarDscInfo * varDscInfo)
noway_assert(varDscInfo->intRegArgNum == 0);
varDsc->lvArgReg = genMapRegArgNumToRegNum(varDscInfo->allocRegArg(TYP_INT), varDsc->TypeGet());
+#if FEATURE_MULTIREG_STRUCT_ARGS
+ varDsc->lvOtherArgReg = REG_NA;
+#endif
varDsc->setPrefReg(varDsc->lvArgReg, this);
varDsc->lvOnFrame = true; // The final home for this incoming register might be our local stack frame
@@ -471,6 +474,9 @@ void Compiler::lvaInitRetBuffArg(InitVarDscInfo * varDscInfo)
varDsc->lvSingleDef = 1;
#endif
varDsc->lvArgReg = genMapRegArgNumToRegNum(varDscInfo->allocRegArg(TYP_INT), varDsc->TypeGet());
+#if FEATURE_MULTIREG_STRUCT_ARGS
+ varDsc->lvOtherArgReg = REG_NA;
+#endif
varDsc->setPrefReg(varDsc->lvArgReg, this);
varDsc->lvOnFrame = true; // The final home for this incoming register might be our local stack frame
@@ -971,6 +977,9 @@ void Compiler::lvaInitGenericsCtxt(InitVarDscInfo * varDscInfo)
varDsc->lvIsRegArg = 1;
varDsc->lvArgReg = genMapRegArgNumToRegNum(varDscInfo->regArgNum(TYP_INT), varDsc->TypeGet());
+#if FEATURE_MULTIREG_STRUCT_ARGS
+ varDsc->lvOtherArgReg = REG_NA;
+#endif
varDsc->setPrefReg(varDsc->lvArgReg, this);
varDsc->lvOnFrame = true; // The final home for this incoming register might be our local stack frame
@@ -1026,6 +1035,9 @@ void Compiler::lvaInitVarArgsHandle(InitVarDscInfo * varDscInfo)
varDsc->lvIsRegArg = 1;
varDsc->lvArgReg = genMapRegArgNumToRegNum(varArgHndArgNum, TYP_I_IMPL);
+#if FEATURE_MULTIREG_STRUCT_ARGS
+ varDsc->lvOtherArgReg = REG_NA;
+#endif
varDsc->setPrefReg(varDsc->lvArgReg, this);
varDsc->lvOnFrame = true; // The final home for this incoming register might be our local stack frame
#ifdef _TARGET_ARM_
diff --git a/src/jit/regalloc.cpp b/src/jit/regalloc.cpp
index 78ca194ff3..a29ae9149c 100644
--- a/src/jit/regalloc.cpp
+++ b/src/jit/regalloc.cpp
@@ -678,7 +678,7 @@ regNumber Compiler::raUpdateRegStateForArg(RegState *regState, LclVarDsc *ar
#if FEATURE_MULTIREG_STRUCT_ARGS
#ifdef _TARGET_ARM64_
- if (argDsc->lvOtherArgReg != REG_NA)
+ if ((argDsc->lvOtherArgReg != REG_STK) && (argDsc->lvOtherArgReg != REG_NA))
{
regNumber secondArgReg = argDsc->lvOtherArgReg;