diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2019-05-14 09:42:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-14 09:42:06 -0700 |
commit | b24cc6e3cb32c212b1c5c32a1f449e2d4ba44e2d (patch) | |
tree | 818d3d8587aaa3d2c444953ef115f8167323d36d /src | |
parent | e3227026f99b149f6f02afef5896306b7cd38270 (diff) | |
download | coreclr-b24cc6e3cb32c212b1c5c32a1f449e2d4ba44e2d.tar.gz coreclr-b24cc6e3cb32c212b1c5c32a1f449e2d4ba44e2d.tar.bz2 coreclr-b24cc6e3cb32c212b1c5c32a1f449e2d4ba44e2d.zip |
Fix more save/restore code for HVAs (#24434)
Fix OnHijackTripThread.
Re-enable the mandelbrot-7 test.
Fix #24224
Diffstat (limited to 'src')
-rw-r--r-- | src/vm/arm64/asmhelpers.S | 12 | ||||
-rw-r--r-- | src/vm/arm64/asmhelpers.asm | 26 | ||||
-rw-r--r-- | src/vm/arm64/cgencpu.h | 10 |
3 files changed, 29 insertions, 19 deletions
diff --git a/src/vm/arm64/asmhelpers.S b/src/vm/arm64/asmhelpers.S index e879201fc7..56ed718708 100644 --- a/src/vm/arm64/asmhelpers.S +++ b/src/vm/arm64/asmhelpers.S @@ -855,7 +855,7 @@ NESTED_END UMThunkStub, _TEXT // ------------------------------------------------------------------ // Hijack function for functions which return a scalar type or a struct (value type) NESTED_ENTRY OnHijackTripThread, _TEXT, NoHandler - PROLOG_SAVE_REG_PAIR_INDEXED fp, lr, -144 + PROLOG_SAVE_REG_PAIR_INDEXED fp, lr, -176 // Spill callee saved registers PROLOG_SAVE_REG_PAIR x19, x20, 16 PROLOG_SAVE_REG_PAIR x21, x22, 32 @@ -867,8 +867,8 @@ NESTED_ENTRY OnHijackTripThread, _TEXT, NoHandler stp x0, x1, [sp, #96] // save any FP/HFA return value(s) - stp d0, d1, [sp, #112] - stp d2, d3, [sp, #128] + stp q0, q1, [sp, #112] + stp q2, q3, [sp, #144] mov x0, sp bl OnHijackWorker @@ -877,15 +877,15 @@ NESTED_ENTRY OnHijackTripThread, _TEXT, NoHandler ldp x0, x1, [sp, #96] // restore any FP/HFA return value(s) - ldp d0, d1, [sp, #112] - ldp d2, d3, [sp, #128] + ldp q0, q1, [sp, #112] + ldp q2, q3, [sp, #144] EPILOG_RESTORE_REG_PAIR x19, x20, 16 EPILOG_RESTORE_REG_PAIR x21, x22, 32 EPILOG_RESTORE_REG_PAIR x23, x24, 48 EPILOG_RESTORE_REG_PAIR x25, x26, 64 EPILOG_RESTORE_REG_PAIR x27, x28, 80 - EPILOG_RESTORE_REG_PAIR_INDEXED fp, lr, 144 + EPILOG_RESTORE_REG_PAIR_INDEXED fp, lr, 176 EPILOG_RETURN NESTED_END OnHijackTripThread, _TEXT diff --git a/src/vm/arm64/asmhelpers.asm b/src/vm/arm64/asmhelpers.asm index 71e53d3d09..400423b90a 100644 --- a/src/vm/arm64/asmhelpers.asm +++ b/src/vm/arm64/asmhelpers.asm @@ -652,6 +652,7 @@ LNoFloatRetVal ret LNoDoubleRetVal + ;; Float HFA return case cmp w0, #16 bne LNoFloatHFARetVal ldp s0, s1, [x1] @@ -659,6 +660,7 @@ LNoDoubleRetVal ret LNoFloatHFARetVal + ;;Double HFA return case cmp w0, #32 bne LNoDoubleHFARetVal ldp d0, d1, [x1] @@ -666,6 +668,14 @@ LNoFloatHFARetVal ret LNoDoubleHFARetVal + ;;Vector HVA return case + cmp w3, #64 + bne LNoVectorHVARetVal + ldp q0, q1, [x1] + ldp q2, q3, [x1, #32] + ret +LNoVectorHVARetVal + EMIT_BREAKPOINT ; Unreachable NoFloatingPointRetVal @@ -1045,7 +1055,7 @@ UMThunkStub_DoTrapReturningThreads ; ------------------------------------------------------------------ ; Hijack function for functions which return a scalar type or a struct (value type) NESTED_ENTRY OnHijackTripThread - PROLOG_SAVE_REG_PAIR fp, lr, #-144! + PROLOG_SAVE_REG_PAIR fp, lr, #-176! ; Spill callee saved registers PROLOG_SAVE_REG_PAIR x19, x20, #16 PROLOG_SAVE_REG_PAIR x21, x22, #32 @@ -1056,9 +1066,9 @@ UMThunkStub_DoTrapReturningThreads ; save any integral return value(s) stp x0, x1, [sp, #96] - ; save any FP/HFA return value(s) - stp d0, d1, [sp, #112] - stp d2, d3, [sp, #128] + ; save any FP/HFA/HVA return value(s) + stp q0, q1, [sp, #112] + stp q2, q3, [sp, #144] mov x0, sp bl OnHijackWorker @@ -1066,16 +1076,16 @@ UMThunkStub_DoTrapReturningThreads ; restore any integral return value(s) ldp x0, x1, [sp, #96] - ; restore any FP/HFA return value(s) - ldp d0, d1, [sp, #112] - ldp d2, d3, [sp, #128] + ; restore any FP/HFA/HVA return value(s) + ldp q0, q1, [sp, #112] + ldp q2, q3, [sp, #144] EPILOG_RESTORE_REG_PAIR x19, x20, #16 EPILOG_RESTORE_REG_PAIR x21, x22, #32 EPILOG_RESTORE_REG_PAIR x23, x24, #48 EPILOG_RESTORE_REG_PAIR x25, x26, #64 EPILOG_RESTORE_REG_PAIR x27, x28, #80 - EPILOG_RESTORE_REG_PAIR fp, lr, #144! + EPILOG_RESTORE_REG_PAIR fp, lr, #176! EPILOG_RETURN NESTED_END diff --git a/src/vm/arm64/cgencpu.h b/src/vm/arm64/cgencpu.h index a2cac4eb7c..997ad7d60f 100644 --- a/src/vm/arm64/cgencpu.h +++ b/src/vm/arm64/cgencpu.h @@ -532,12 +532,12 @@ struct HijackArgs union { struct { - DWORD64 D0; - DWORD64 D1; - DWORD64 D2; - DWORD64 D3; + NEON128 Q0; + NEON128 Q1; + NEON128 Q2; + NEON128 Q3; }; - size_t FPReturnValue[4]; + NEON128 FPReturnValue[4]; }; }; |