From 03bd0ea9e6d59172124dd26a5a139d1f95d9d4c0 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Thu, 9 Mar 2017 23:35:04 -0500 Subject: [PATCH] [arm64] Fix the saving/restoring of fp regs in exception filters, we were saving/restoring them from the incorrect position in MonoContext.fregs. (#4499) --- mono/mini/exceptions-arm64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mono/mini/exceptions-arm64.c b/mono/mini/exceptions-arm64.c index 211c2eee77c..9bc79372897 100644 --- a/mono/mini/exceptions-arm64.c +++ b/mono/mini/exceptions-arm64.c @@ -123,7 +123,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) labels [0] = code; arm_cbzx (code, ARMREG_IP0, 0); for (i = 0; i < num_fregs; ++i) - arm_ldrfpx (code, ARMREG_D8 + i, ARMREG_R0, MONO_STRUCT_OFFSET (MonoContext, fregs) + (i * 8)); + arm_ldrfpx (code, ARMREG_D8 + i, ARMREG_R0, MONO_STRUCT_OFFSET (MonoContext, fregs) + ((i + 8) * 8)); mono_arm_patch (labels [0], code, MONO_R_ARM64_CBZ); /* Load fp */ arm_ldrx (code, ARMREG_FP, ARMREG_R0, MONO_STRUCT_OFFSET (MonoContext, regs) + (ARMREG_FP * 8)); -- 2.25.1