Fix the scratch register used for arm64 stack probing (dotnet/coreclr#22313)
authorBruce Forstall <brucefo@microsoft.com>
Sat, 2 Feb 2019 00:09:10 +0000 (16:09 -0800)
committerGitHub <noreply@github.com>
Sat, 2 Feb 2019 00:09:10 +0000 (16:09 -0800)
commit58efad1c00b2b9fbc8ad336a5bafce77151fca96
tree2af1c14656cbd7ef25bbd1ba56df6020ab9c6018
parentfbe51a0f9756a9d2c043d051549ff2c8185ec3b3
Fix the scratch register used for arm64 stack probing (dotnet/coreclr#22313)

* Fix the scratch register used for arm64 stack probing

In some circumstances, genFnProlog might pick a callee-saved
register to be the initReg. This doesn't work for stack probing
since we might need a scratch register before we save the
callee-save regs. So, always use R9 (REG_SCRATCH) instead.

Fixes dotnet/coreclr#22284

* Formatting

Commit migrated from https://github.com/dotnet/coreclr/commit/53e367b7f9a2ca799e0510f9420567848e7c0e8b
src/coreclr/src/jit/codegencommon.cpp