[arm] one more attempt to fix slotsize issue on llvmonly (#14444)
commitc2118341c634fd845d3ab15304bdf3fa84191841
authorBernhard Urban <lewurm@gmail.com>
Mon, 20 May 2019 10:09:35 +0000 (20 03:09 -0700)
committerZoltan Varga <vargaz@gmail.com>
Mon, 20 May 2019 10:09:35 +0000 (20 03:09 -0700)
treeb9127aa6780ef3be2782270e03d28a78d4c117f7
parent1ecffe9554c23d6def0b39dd9382ae71cd981ac0
[arm] one more attempt to fix slotsize issue on llvmonly (#14444)

* [arm] one more attempt to fix slotsize issue on llvmonly

Regression of https://github.com/mono/mono/pull/12992 & https://github.com/mono/mono/pull/14362

In the end, the actual fix boils down to:
```patch
--- a/mono/mini/mini-arm.c
+++ b/mono/mini/mini-arm.c
@@ -2374,7 +2374,7 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
                                lainfo->nslots = ALIGN_TO (ainfo->struct_size, 8) / 8;
                                lainfo->esize = 8;
                        } else {
-                               lainfo->nslots = ainfo->struct_size / sizeof (target_mgreg_t);
+                               lainfo->nslots = ALIGN_TO (ainfo->struct_size, sizeof (target_mgreg_t)) / sizeof (target_mgreg_t);
                                lainfo->esize = 4;
                        }
                        break;
```

Tested on `xamarin-macios/arm64_32-v3` branch:
* mscorlib
* mini
* dont link
* monotouch tests
* and a modified version of https://github.com/mono/mono/issues/8486#issuecomment-414365860 (added larger structs too)

with each device, Watch Series 3 (`armv7k`) and Watch Series 4 (`arm64_32`).

I hope that is the last iteration on this.

* remove arm64_32_abi
mono/mini/mini-arm.c