diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2017-04-04 22:26:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-04 22:26:22 -0700 |
commit | a5fef2172ad19d4c58e67c9e5bee10d247cd8929 (patch) | |
tree | 9865fe1648637f5f8ac2ec3705780736f76dfac3 /src | |
parent | e93e79b3d012bc068c84ee5f65f8e755020d8a9c (diff) | |
parent | dd130b56246b8854fb711bcb32839b398eb240ee (diff) | |
download | coreclr-a5fef2172ad19d4c58e67c9e5bee10d247cd8929.tar.gz coreclr-a5fef2172ad19d4c58e67c9e5bee10d247cd8929.tar.bz2 coreclr-a5fef2172ad19d4c58e67c9e5bee10d247cd8929.zip |
Merge pull request #10303 from hseok-oh/fix_10300
[ARM32/RyuJIT] Fix register allocation for null check in call instruction
Diffstat (limited to 'src')
-rw-r--r-- | src/jit/codegenarm.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/jit/codegenarm.cpp b/src/jit/codegenarm.cpp index 2cbd0c6a92..ca3dce1167 100644 --- a/src/jit/codegenarm.cpp +++ b/src/jit/codegenarm.cpp @@ -2311,8 +2311,13 @@ void CodeGen::genCallInstruction(GenTreeCall* call) // Insert a null check on "this" pointer if asked. if (call->NeedsNullCheck()) { - const regNumber regThis = genGetThisArgReg(call); - const regNumber tmpReg = genRegNumFromMask(call->gtRsvdRegs); + const regNumber regThis = genGetThisArgReg(call); + regMaskTP tempMask = genFindLowestBit(call->gtRsvdRegs); + const regNumber tmpReg = genRegNumFromMask(tempMask); + if (genCountBits(call->gtRsvdRegs) > 1) + { + call->gtRsvdRegs &= ~tempMask; + } getEmitter()->emitIns_R_R_I(INS_ldr, EA_4BYTE, tmpReg, regThis, 0); } |