From 2e78b87b05c5cc8c913c391a1aa53781a0560337 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sat, 25 May 2019 09:19:03 -0700 Subject: [PATCH] Make sure all of the calculations of enregistered return types match correctly. (dotnet/coreclr#24771) * Make sure all of the calculations of enregistered return types match correctly. * Revert "Disable ARM64 IDispatch tests (dotnet/coreclr#24770)" This reverts commit dotnet/coreclr@852f40d5f1a3cff4d381c2de2d2a86fe8b1f29b4. Commit migrated from https://github.com/dotnet/coreclr/commit/83309575a1552e39fe505cbd883391f3dcbea8b4 --- src/coreclr/src/vm/arm/asmconstants.h | 3 +++ src/coreclr/src/vm/arm/asmhelpers.asm | 4 ++-- src/coreclr/src/vm/arm64/asmconstants.h | 3 +++ src/coreclr/src/vm/arm64/asmhelpers.asm | 5 ++--- src/coreclr/tests/issues.targets | 6 ------ 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/coreclr/src/vm/arm/asmconstants.h b/src/coreclr/src/vm/arm/asmconstants.h index ed57b89..54cf47e 100644 --- a/src/coreclr/src/vm/arm/asmconstants.h +++ b/src/coreclr/src/vm/arm/asmconstants.h @@ -124,6 +124,9 @@ ASMCONSTANTS_C_ASSERT(SIZEOF__ArgumentRegisters == sizeof(ArgumentRegisters)) #define SIZEOF__FloatArgumentRegisters 0x40 ASMCONSTANTS_C_ASSERT(SIZEOF__FloatArgumentRegisters == sizeof(FloatArgumentRegisters)) +#define ASM_ENREGISTERED_RETURNTYPE_MAXSIZE 0x20 +ASMCONSTANTS_C_ASSERT(ASM_ENREGISTERED_RETURNTYPE_MAXSIZE == ENREGISTERED_RETURNTYPE_MAXSIZE) + #define UMEntryThunk__m_pUMThunkMarshInfo 0x0C ASMCONSTANTS_C_ASSERT(UMEntryThunk__m_pUMThunkMarshInfo == offsetof(UMEntryThunk, m_pUMThunkMarshInfo)) diff --git a/src/coreclr/src/vm/arm/asmhelpers.asm b/src/coreclr/src/vm/arm/asmhelpers.asm index e49910d..35c8986 100644 --- a/src/coreclr/src/vm/arm/asmhelpers.asm +++ b/src/coreclr/src/vm/arm/asmhelpers.asm @@ -709,7 +709,7 @@ LsetFP8 ; NESTED_ENTRY GenericComPlusCallStub - PROLOG_WITH_TRANSITION_BLOCK 0x20 + PROLOG_WITH_TRANSITION_BLOCK ASM_ENREGISTERED_RETURNTYPE_MAXSIZE add r0, sp, #__PWTB_TransitionBlock ; pTransitionBlock mov r1, r12 ; pMethodDesc @@ -723,7 +723,7 @@ LsetFP8 ; r0 = fpRetSize ; return value is stored before float argument registers - add r1, sp, #(__PWTB_FloatArgumentRegisters - 0x20) + add r1, sp, #(__PWTB_FloatArgumentRegisters - ASM_ENREGISTERED_RETURNTYPE_MAXSIZE) bl setStubReturnValue EPILOG_WITH_TRANSITION_BLOCK_RETURN diff --git a/src/coreclr/src/vm/arm64/asmconstants.h b/src/coreclr/src/vm/arm64/asmconstants.h index 8c99ed8..258fe6d 100644 --- a/src/coreclr/src/vm/arm64/asmconstants.h +++ b/src/coreclr/src/vm/arm64/asmconstants.h @@ -54,6 +54,9 @@ ASMCONSTANTS_C_ASSERT(SIZEOF__ArgumentRegisters == sizeof(ArgumentRegisters)) #define SIZEOF__FloatArgumentRegisters 0x80 ASMCONSTANTS_C_ASSERT(SIZEOF__FloatArgumentRegisters == sizeof(FloatArgumentRegisters)) +#define ASM_ENREGISTERED_RETURNTYPE_MAXSIZE 0x40 +ASMCONSTANTS_C_ASSERT(ASM_ENREGISTERED_RETURNTYPE_MAXSIZE == ENREGISTERED_RETURNTYPE_MAXSIZE) + #define CallDescrData__pSrc 0x00 #define CallDescrData__numStackSlots 0x08 #define CallDescrData__pArgumentRegisters 0x10 diff --git a/src/coreclr/src/vm/arm64/asmhelpers.asm b/src/coreclr/src/vm/arm64/asmhelpers.asm index 01b49db..c9700db 100644 --- a/src/coreclr/src/vm/arm64/asmhelpers.asm +++ b/src/coreclr/src/vm/arm64/asmhelpers.asm @@ -706,7 +706,7 @@ NoFloatingPointRetVal ; NESTED_ENTRY GenericComPlusCallStub - PROLOG_WITH_TRANSITION_BLOCK 0x20 + PROLOG_WITH_TRANSITION_BLOCK ASM_ENREGISTERED_RETURNTYPE_MAXSIZE add x0, sp, #__PWTB_TransitionBlock ; pTransitionBlock mov x1, x12 ; pMethodDesc @@ -721,8 +721,7 @@ NoFloatingPointRetVal ; x0 = fpRetSize ; The return value is stored before float argument registers - ; The maximum size of a return value is 0x40 (HVA of 4x16) - add x1, sp, #(__PWTB_FloatArgumentRegisters - 0x40) + add x1, sp, #(__PWTB_FloatArgumentRegisters - ASM_ENREGISTERED_RETURNTYPE_MAXSIZE) bl setStubReturnValue EPILOG_WITH_TRANSITION_BLOCK_RETURN diff --git a/src/coreclr/tests/issues.targets b/src/coreclr/tests/issues.targets index 51c3321..f7c055e 100644 --- a/src/coreclr/tests/issues.targets +++ b/src/coreclr/tests/issues.targets @@ -345,12 +345,6 @@ - - TBD - - - TBD - 15016 -- 2.7.4