Fix ARM32 secure delegate bug (#13922)
authorJan Vorlicek <janvorli@microsoft.com>
Wed, 13 Sep 2017 00:30:55 +0000 (02:30 +0200)
committerJan Kotas <jkotas@microsoft.com>
Wed, 13 Sep 2017 00:30:55 +0000 (17:30 -0700)
commit1ac52ef489061d2ed870f6d1380336f079b71295
tree165f519d3010b89964252a7a00524fbaf70cc0f7
parentb400f1a28ca7ff228afdcb5fa8990d3951503395
Fix ARM32 secure delegate bug (#13922)

This change fixes a bug that causes crashes when secure delegate is
invoked on ARM32 with legacy codegen. Register R4 was loaded with
indirection slot address and immediatelly marked as trashed, so the JIT
compiler reused it before the call that was supposed to have that value
in R4.
The fix was to move the reg trashing after the call.
There was also an incorrect marking of that address as EA_PTRSIZE
while it should be EA_BYREF, so I've fixed that too.
src/jit/codegenlegacy.cpp