Allow larger than 0x1000 bytes allocation in genStackPointerConstantAdjustment()...
authorEgor Chesakov <Egor.Chesakov@microsoft.com>
Tue, 9 Feb 2021 03:03:56 +0000 (19:03 -0800)
committerGitHub <noreply@github.com>
Tue, 9 Feb 2021 03:03:56 +0000 (19:03 -0800)
commitbf9f899a998eba28f84c77e0c4996d1c22d94b0f
tree41fc85a38f9765761012b86ddd874565926c8d59
parentaecd60a71384749ed244a9651a7969d23a1278a3
Allow larger than 0x1000 bytes allocation in genStackPointerConstantAdjustment() (#47862)

* In AOT scenarios the VM reports to the JIT the minimal supported page size in src/coreclr/vm/jitinterface.cpp

* Have genStackPointerConstantAdjustment accept regTmp argument on Arm32 and Arm64

The temporary register is going to be used when sub sp,sp,#spDelta can not be encoded.
For example, this happens when spDelta corresponds to OsPageSize and the
OsPageSize is larger than 0x1000 bytes.

The following code needs to be generated in such cases

mov regTmp,#spDelta
sub sp,sp,regTmp

* Use genInstrWithConstant(INS_sub) and rsGetRsvdReg() as temporary register to encode amount of sp adjustment in src/coreclr/jit/codegenarm64.cpp

* Update comment to reflect that REG_NA can be passed for regTmp in genStackPointerConstantAdjustment in src/coreclr/jit/codegenarmarch.cpp
src/coreclr/jit/codegen.h
src/coreclr/jit/codegenarm.cpp
src/coreclr/jit/codegenarm64.cpp
src/coreclr/jit/codegenarmarch.cpp
src/coreclr/vm/jitinterface.cpp