diff --git a/src/coreclr/nativeaot/Runtime/StackFrameIterator.cpp b/src/coreclr/nativeaot/Runtime/StackFrameIterator.cpp index 117c31fb99a99..43a888e2b272b 100644 --- a/src/coreclr/nativeaot/Runtime/StackFrameIterator.cpp +++ b/src/coreclr/nativeaot/Runtime/StackFrameIterator.cpp @@ -37,46 +37,28 @@ #if !defined(USE_PORTABLE_HELPERS) // @TODO: these are (currently) only implemented in assembly helpers #if defined(FEATURE_DYNAMIC_CODE) -EXTERN_C void * RhpUniversalTransition(); -GPTR_IMPL_INIT(PTR_VOID, g_RhpUniversalTransitionAddr, (void**)&RhpUniversalTransition); - -EXTERN_C PTR_VOID PointerToReturnFromUniversalTransition; -GVAL_IMPL_INIT(PTR_VOID, g_ReturnFromUniversalTransitionAddr, PointerToReturnFromUniversalTransition); - -EXTERN_C PTR_VOID PointerToReturnFromUniversalTransition_DebugStepTailCall; -GVAL_IMPL_INIT(PTR_VOID, g_ReturnFromUniversalTransition_DebugStepTailCallAddr, PointerToReturnFromUniversalTransition_DebugStepTailCall); +EXTERN_C CODE_LOCATION ReturnFromUniversalTransition; +EXTERN_C CODE_LOCATION ReturnFromUniversalTransition_DebugStepTailCall; #endif #ifdef TARGET_X86 -EXTERN_C void * PointerToRhpCallFunclet2; -GVAL_IMPL_INIT(PTR_VOID, g_RhpCallFunclet2Addr, PointerToRhpCallFunclet2); +EXTERN_C CODE_LOCATION RhpCallFunclet2; #endif -EXTERN_C void * PointerToRhpCallCatchFunclet2; -GVAL_IMPL_INIT(PTR_VOID, g_RhpCallCatchFunclet2Addr, PointerToRhpCallCatchFunclet2); -EXTERN_C void * PointerToRhpCallFinallyFunclet2; -GVAL_IMPL_INIT(PTR_VOID, g_RhpCallFinallyFunclet2Addr, PointerToRhpCallFinallyFunclet2); -EXTERN_C void * PointerToRhpCallFilterFunclet2; -GVAL_IMPL_INIT(PTR_VOID, g_RhpCallFilterFunclet2Addr, PointerToRhpCallFilterFunclet2); -EXTERN_C void * PointerToRhpThrowEx2; -GVAL_IMPL_INIT(PTR_VOID, g_RhpThrowEx2Addr, PointerToRhpThrowEx2); -EXTERN_C void * PointerToRhpThrowHwEx2; -GVAL_IMPL_INIT(PTR_VOID, g_RhpThrowHwEx2Addr, PointerToRhpThrowHwEx2); -EXTERN_C void * PointerToRhpRethrow2; -GVAL_IMPL_INIT(PTR_VOID, g_RhpRethrow2Addr, PointerToRhpRethrow2); +EXTERN_C CODE_LOCATION RhpCallCatchFunclet2; +EXTERN_C CODE_LOCATION RhpCallFinallyFunclet2; +EXTERN_C CODE_LOCATION RhpCallFilterFunclet2; +EXTERN_C CODE_LOCATION RhpThrowEx2; +EXTERN_C CODE_LOCATION RhpThrowHwEx2; +EXTERN_C CODE_LOCATION RhpRethrow2; #endif // !defined(USE_PORTABLE_HELPERS) // Addresses of functions in the DAC won't match their runtime counterparts so we // assign them to globals. However it is more performant in the runtime to compare // against immediates than to fetch the global. This macro hides the difference. -// -// We use a special code path for the return address from thunks as -// having the return address public confuses today DIA stackwalker. Before we can -// ingest the updated DIA, we're instead exposing a global void * variable -// holding the return address. #ifdef DACCESS_COMPILE #define EQUALS_RETURN_ADDRESS(x, func_name) ((x) == g_ ## func_name ## Addr) #else -#define EQUALS_RETURN_ADDRESS(x, func_name) (((x)) == (PointerTo ## func_name)) +#define EQUALS_RETURN_ADDRESS(x, func_name) ((x) == &func_name) #endif #ifdef DACCESS_COMPILE diff --git a/src/coreclr/nativeaot/Runtime/amd64/AsmMacros.inc b/src/coreclr/nativeaot/Runtime/amd64/AsmMacros.inc index 492b0e7554239..33089b6643d38 100644 --- a/src/coreclr/nativeaot/Runtime/amd64/AsmMacros.inc +++ b/src/coreclr/nativeaot/Runtime/amd64/AsmMacros.inc @@ -214,24 +214,6 @@ Name label proc PUBLIC Name endm -EXPORT_POINTER_TO_ADDRESS macro Name - - local AddressToExport - -AddressToExport label proc - - .const - - align 8 - -Name dq offset AddressToExport - - public Name - - .code - - endm - _tls_array equ 58h ;; offsetof(TEB, ThreadLocalStoragePointer) ;; diff --git a/src/coreclr/nativeaot/Runtime/amd64/ExceptionHandling.S b/src/coreclr/nativeaot/Runtime/amd64/ExceptionHandling.S index e84d1ea3ef9ce..c5ce852e46fd0 100644 --- a/src/coreclr/nativeaot/Runtime/amd64/ExceptionHandling.S +++ b/src/coreclr/nativeaot/Runtime/amd64/ExceptionHandling.S @@ -70,7 +70,7 @@ NESTED_ENTRY RhpThrowHwEx, _TEXT, NoHandler // rsi contains the address of the ExInfo call EXTERNAL_C_FUNC(RhThrowHwEx) - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowHwEx2 +ALTERNATE_ENTRY RhpThrowHwEx2 // no return int 3 @@ -151,7 +151,7 @@ NESTED_ENTRY RhpThrowEx, _TEXT, NoHandler // rsi contains the address of the ExInfo call EXTERNAL_C_FUNC(RhThrowEx) - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowEx2 +ALTERNATE_ENTRY RhpThrowEx2 // no return int 3 @@ -222,7 +222,7 @@ NESTED_ENTRY RhpRethrow, _TEXT, NoHandler // rsi contains the address of the new ExInfo call EXTERNAL_C_FUNC(RhRethrow) - EXPORT_POINTER_TO_ADDRESS PointerToRhpRethrow2 +ALTERNATE_ENTRY RhpRethrow2 // no return int 3 @@ -334,7 +334,7 @@ NESTED_ENTRY RhpCallCatchFunclet, _TEXT, NoHandler mov rsi, [rsp + locArg0] // rsi <- exception object call qword ptr [rsp + locArg1] // call handler funclet - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallCatchFunclet2 +ALTERNATE_ENTRY RhpCallCatchFunclet2 mov rdx, [rsp + locArg2] // rdx <- dispatch context @@ -473,7 +473,7 @@ NESTED_ENTRY RhpCallFinallyFunclet, _TEXT, NoHandler mov rdi, [rsi + OFFSETOF__REGDISPLAY__SP] // rdi <- establisher frame call qword ptr [rsp + locArg0] // handler funclet address - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFinallyFunclet2 +ALTERNATE_ENTRY RhpCallFinallyFunclet2 mov rsi, [rsp + locArg1] // rsi <- regdisplay @@ -523,7 +523,7 @@ NESTED_ENTRY RhpCallFilterFunclet, _TEXT, NoHandler mov rdi, [rdx + OFFSETOF__REGDISPLAY__SP] // rdi <- establisher frame call rax - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFilterFunclet2 +ALTERNATE_ENTRY RhpCallFilterFunclet2 // RAX contains the result of the filter execution diff --git a/src/coreclr/nativeaot/Runtime/amd64/ExceptionHandling.asm b/src/coreclr/nativeaot/Runtime/amd64/ExceptionHandling.asm index ad681151a3d6d..86c3f408665b6 100644 --- a/src/coreclr/nativeaot/Runtime/amd64/ExceptionHandling.asm +++ b/src/coreclr/nativeaot/Runtime/amd64/ExceptionHandling.asm @@ -92,7 +92,7 @@ NESTED_ENTRY RhpThrowHwEx, _TEXT ;; rdx contains the address of the ExInfo call RhThrowHwEx - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowHwEx2 +ALTERNATE_ENTRY RhpThrowHwEx2 ;; no return int 3 @@ -184,7 +184,7 @@ NESTED_ENTRY RhpThrowEx, _TEXT ;; rdx contains the address of the ExInfo call RhThrowEx - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowEx2 +ALTERNATE_ENTRY RhpThrowEx2 ;; no return int 3 @@ -269,7 +269,7 @@ NESTED_ENTRY RhpRethrow, _TEXT ;; rdx contains the address of the new ExInfo call RhRethrow - EXPORT_POINTER_TO_ADDRESS PointerToRhpRethrow2 +ALTERNATE_ENTRY RhpRethrow2 ;; no return int 3 @@ -428,7 +428,7 @@ endif mov rdx, [rsp + rsp_offsetof_arguments + 0h] ;; rdx <- exception object call qword ptr [rsp + rsp_offsetof_arguments + 8h] ;; call handler funclet - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallCatchFunclet2 +ALTERNATE_ENTRY RhpCallCatchFunclet2 mov r8, [rsp + rsp_offsetof_arguments + 10h] ;; r8 <- dispatch context @@ -601,7 +601,7 @@ endif mov rcx, [rdx + OFFSETOF__REGDISPLAY__SP] ;; rcx <- establisher frame call qword ptr [rsp + rsp_offsetof_arguments + 0h] ;; handler funclet address - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFinallyFunclet2 +ALTERNATE_ENTRY RhpCallFinallyFunclet2 mov rdx, [rsp + rsp_offsetof_arguments + 8h] ;; rdx <- regdisplay @@ -666,7 +666,7 @@ NESTED_ENTRY RhpCallFilterFunclet, _TEXT mov rcx, [r8 + OFFSETOF__REGDISPLAY__SP] ;; rcx <- establisher frame call rax - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFilterFunclet2 +ALTERNATE_ENTRY RhpCallFilterFunclet2 ;; RAX contains the result of the filter execution diff --git a/src/coreclr/nativeaot/Runtime/amd64/UniversalTransition.S b/src/coreclr/nativeaot/Runtime/amd64/UniversalTransition.S index d5a1cf34df31c..493270a1052a0 100644 --- a/src/coreclr/nativeaot/Runtime/amd64/UniversalTransition.S +++ b/src/coreclr/nativeaot/Runtime/amd64/UniversalTransition.S @@ -124,7 +124,7 @@ NESTED_ENTRY Rhp\FunctionName, _TEXT, NoHandler lea rdi, [rsp + DISTANCE_FROM_CHILDSP_TO_RETURN_BLOCK] call r10 - EXPORT_POINTER_TO_ADDRESS PointerToReturnFrom\FunctionName +ALTERNATE_ENTRY ReturnFrom\FunctionName // restore fp argument registers movdqa xmm0, [rsp + DISTANCE_FROM_CHILDSP_TO_FP_REGS + 0x00] diff --git a/src/coreclr/nativeaot/Runtime/amd64/UniversalTransition.asm b/src/coreclr/nativeaot/Runtime/amd64/UniversalTransition.asm index 676ebe396c7e6..9ed827048c20f 100644 --- a/src/coreclr/nativeaot/Runtime/amd64/UniversalTransition.asm +++ b/src/coreclr/nativeaot/Runtime/amd64/UniversalTransition.asm @@ -126,7 +126,7 @@ endif ; TRASH_SAVED_ARGUMENT_REGISTERS lea rcx, [rsp + DISTANCE_FROM_CHILDSP_TO_RETURN_BLOCK] call r10 - EXPORT_POINTER_TO_ADDRESS PointerToReturnFrom&FunctionName +ALTERNATE_ENTRY ReturnFrom&FunctionName ; We cannot make the label public as that tricks DIA stackwalker into thinking ; it's the beginning of a method. For this reason we export the address diff --git a/src/coreclr/nativeaot/Runtime/arm/ExceptionHandling.S b/src/coreclr/nativeaot/Runtime/arm/ExceptionHandling.S index 9d30102dc900e..9be4b24b7a230 100644 --- a/src/coreclr/nativeaot/Runtime/arm/ExceptionHandling.S +++ b/src/coreclr/nativeaot/Runtime/arm/ExceptionHandling.S @@ -71,7 +71,7 @@ NESTED_ENTRY RhpThrowHwEx, _TEXT, NoHandler // r1 contains the address of the ExInfo bl C_FUNC(RhThrowHwEx) - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowHwEx2 +GLOBAL_LABEL RhpThrowHwEx2 // no return EMIT_BREAKPOINT @@ -176,7 +176,7 @@ LOCAL_LABEL(NotHiJacked): // r1 contains the address of the new ExInfo bl C_FUNC(RhThrowEx) - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowEx2 +GLOBAL_LABEL RhpThrowEx2 // no return EMIT_BREAKPOINT @@ -237,7 +237,7 @@ NESTED_ENTRY RhpRethrow, _TEXT, NoHandler // r1 contains the address of the new ExInfo blx C_FUNC(RhRethrow) - EXPORT_POINTER_TO_ADDRESS PointerToRhpRethrow2 +GLOBAL_LABEL RhpRethrow2 // no return EMIT_BREAKPOINT @@ -320,7 +320,7 @@ LOCAL_LABEL(ClearSuccess_Catch): // r0 <- exception object blx r3 // call handler funclet - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallCatchFunclet2 +GLOBAL_LABEL RhpCallCatchFunclet2 str r0, [sp, #rsp_offset_r0] // Save the result @@ -421,7 +421,7 @@ LOCAL_LABEL(ClearSuccess): blx r2 // handler funclet address - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFinallyFunclet2 +GLOBAL_LABEL RhpCallFinallyFunclet2 ldr r1, [sp, #rsp_offset_r1] // reload REGDISPLAY pointer @@ -497,7 +497,7 @@ NESTED_ENTRY RhpCallFilterFunclet, _TEXT, NoHandler // r1 = establisher frame blx r12 - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFilterFunclet2 +GLOBAL_LABEL RhpCallFilterFunclet2 // R0 contains the result of the filter execution diff --git a/src/coreclr/nativeaot/Runtime/arm/UniversalTransition.S b/src/coreclr/nativeaot/Runtime/arm/UniversalTransition.S index 5db9aa8847d08..6eb4eaa1b1b6a 100644 --- a/src/coreclr/nativeaot/Runtime/arm/UniversalTransition.S +++ b/src/coreclr/nativeaot/Runtime/arm/UniversalTransition.S @@ -123,7 +123,7 @@ NESTED_ENTRY Rhp\FunctionName, _TEXT, NoHandler add r0, sp, #DISTANCE_FROM_CHILDSP_TO_RETURN_BLOCK // First parameter to target function is a pointer to the return block blx r12 - EXPORT_POINTER_TO_ADDRESS PointerToReturnFrom\FunctionName +GLOBAL_LABEL ReturnFrom\FunctionName // We cannot make the label public as that tricks DIA stackwalker into thinking // it's the beginning of a method. For this reason we export an auxiliary variable diff --git a/src/coreclr/nativeaot/Runtime/arm64/AsmMacros.h b/src/coreclr/nativeaot/Runtime/arm64/AsmMacros.h index 22f1d28d20366..94a559df719e0 100644 --- a/src/coreclr/nativeaot/Runtime/arm64/AsmMacros.h +++ b/src/coreclr/nativeaot/Runtime/arm64/AsmMacros.h @@ -173,25 +173,6 @@ MovInstr SETS "movk" ldr w$RegNum, [x$RegNum, $Name] MEND - -;; ----------------------------------------------------------------------------- -;; -;; Macro to export a pointer to an address inside a stub as a 64-bit variable -;; - MACRO - EXPORT_POINTER_TO_ADDRESS $Name - LCLS CodeLbl -CodeLbl SETS "$Name":CC:"Lbl" -$CodeLbl - AREA | .rdata | , ALIGN = 8, DATA, READONLY -$Name - DCQ $CodeLbl - EXPORT $Name - TEXTAREA - ROUT - - MEND - ;; ----------------------------------------------------------------------------- ;; ;; Macro for indicating an alternate entry point into a function. diff --git a/src/coreclr/nativeaot/Runtime/arm64/ExceptionHandling.S b/src/coreclr/nativeaot/Runtime/arm64/ExceptionHandling.S index 570c9742a49f4..0f7e1b7e31aec 100644 --- a/src/coreclr/nativeaot/Runtime/arm64/ExceptionHandling.S +++ b/src/coreclr/nativeaot/Runtime/arm64/ExceptionHandling.S @@ -245,7 +245,7 @@ // x1: ExInfo* bl C_FUNC(RhThrowHwEx) - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowHwEx2 + ALTERNATE_ENTRY RhpThrowHwEx2 // no return EMIT_BREAKPOINT @@ -332,7 +332,7 @@ LOCAL_LABEL(NotHijacked): // x1: ExInfo* bl C_FUNC(RhThrowEx) - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowEx2 + ALTERNATE_ENTRY RhpThrowEx2 // no return EMIT_BREAKPOINT @@ -377,7 +377,7 @@ LOCAL_LABEL(NotHijacked): // x1 contains the address of the new ExInfo bl C_FUNC(RhRethrow) - EXPORT_POINTER_TO_ADDRESS PointerToRhpRethrow2 + ALTERNATE_ENTRY RhpRethrow2 // no return EMIT_BREAKPOINT @@ -452,7 +452,7 @@ LOCAL_LABEL(ClearSuccess_Catch): // x0 still contains the exception object blr x1 - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallCatchFunclet2 +ALTERNATE_ENTRY RhpCallCatchFunclet2 // x0 contains resume IP @@ -586,7 +586,7 @@ LOCAL_LABEL(ClearSuccess): // blr x0 - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFinallyFunclet2 +ALTERNATE_ENTRY RhpCallFinallyFunclet2 ldr x1, [sp, #rsp_offset_x1] // reload REGDISPLAY pointer @@ -650,7 +650,7 @@ LOCAL_LABEL(SetSuccess): // x0 still contains the exception object blr x1 - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFilterFunclet2 +ALTERNATE_ENTRY RhpCallFilterFunclet2 ldp d8, d9, [sp, #0x00] ldp d10, d11, [sp, #0x10] diff --git a/src/coreclr/nativeaot/Runtime/arm64/ExceptionHandling.asm b/src/coreclr/nativeaot/Runtime/arm64/ExceptionHandling.asm index df09f061b1271..3c2437fb91350 100644 --- a/src/coreclr/nativeaot/Runtime/arm64/ExceptionHandling.asm +++ b/src/coreclr/nativeaot/Runtime/arm64/ExceptionHandling.asm @@ -243,7 +243,7 @@ ;; x1: ExInfo* bl RhThrowHwEx - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowHwEx2 + ALTERNATE_ENTRY RhpThrowHwEx2 ;; no return EMIT_BREAKPOINT @@ -333,7 +333,7 @@ NotHijacked ;; x1: ExInfo* bl RhThrowEx - EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowEx2 + ALTERNATE_ENTRY RhpThrowEx2 ;; no return EMIT_BREAKPOINT @@ -379,7 +379,7 @@ NotHijacked ;; x1 contains the address of the new ExInfo bl RhRethrow - EXPORT_POINTER_TO_ADDRESS PointerToRhpRethrow2 + ALTERNATE_ENTRY RhpRethrow2 ;; no return EMIT_BREAKPOINT @@ -446,7 +446,7 @@ ClearSuccess_Catch ;; x0 still contains the exception object blr x1 - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallCatchFunclet2 + ALTERNATE_ENTRY RhpCallCatchFunclet2 ;; x0 contains resume IP @@ -551,7 +551,7 @@ ClearSuccess ;; blr x0 - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFinallyFunclet2 + ALTERNATE_ENTRY RhpCallFinallyFunclet2 ldr x1, [sp, #rsp_offset_x1] ;; reload REGDISPLAY pointer @@ -612,7 +612,7 @@ SetSuccess ;; x0 still contains the exception object blr x1 - EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFilterFunclet2 + ALTERNATE_ENTRY RhpCallFilterFunclet2 ldp d8, d9, [sp, #0x00] ldp d10, d11, [sp, #0x10] diff --git a/src/coreclr/nativeaot/Runtime/arm64/UniversalTransition.S b/src/coreclr/nativeaot/Runtime/arm64/UniversalTransition.S index 8274b6b1110a6..9aa069f003340 100644 --- a/src/coreclr/nativeaot/Runtime/arm64/UniversalTransition.S +++ b/src/coreclr/nativeaot/Runtime/arm64/UniversalTransition.S @@ -132,7 +132,7 @@ // We cannot make the label public as that tricks DIA stackwalker into thinking // it's the beginning of a method. For this reason we export an auxiliary variable // holding the address instead. - EXPORT_POINTER_TO_ADDRESS PointerToReturnFrom\FunctionName +ALTERNATE_ENTRY ReturnFrom\FunctionName // Move the result (the target address) to x12 so it doesn't get overridden when we restore the // argument registers. diff --git a/src/coreclr/nativeaot/Runtime/arm64/UniversalTransition.asm b/src/coreclr/nativeaot/Runtime/arm64/UniversalTransition.asm index 2e23ea4302a4f..36a9928940511 100644 --- a/src/coreclr/nativeaot/Runtime/arm64/UniversalTransition.asm +++ b/src/coreclr/nativeaot/Runtime/arm64/UniversalTransition.asm @@ -123,7 +123,7 @@ ;; We cannot make the label public as that tricks DIA stackwalker into thinking ;; it's the beginning of a method. For this reason we export an auxiliary variable ;; holding the address instead. - EXPORT_POINTER_TO_ADDRESS PointerToReturnFrom$FunctionName + ALTERNATE_ENTRY ReturnFrom$FunctionName ;; Move the result (the target address) to x12 so it doesn't get overridden when we restore the ;; argument registers. diff --git a/src/coreclr/nativeaot/Runtime/i386/AsmMacros.inc b/src/coreclr/nativeaot/Runtime/i386/AsmMacros.inc index eeac6c0fb385b..b7f6554993cd1 100644 --- a/src/coreclr/nativeaot/Runtime/i386/AsmMacros.inc +++ b/src/coreclr/nativeaot/Runtime/i386/AsmMacros.inc @@ -32,24 +32,6 @@ decoratedName label proc PUBLIC decoratedName endm -EXPORT_POINTER_TO_ADDRESS macro Name - - local AddressToExport - -AddressToExport label proc - - .const - - align 4 - -Name dd offset AddressToExport - - public Name - - .code - - endm - __tls_array equ 2Ch ;; offsetof(TEB, ThreadLocalStoragePointer) ;; diff --git a/src/coreclr/nativeaot/Runtime/i386/ExceptionHandling.asm b/src/coreclr/nativeaot/Runtime/i386/ExceptionHandling.asm index 9e701b650317e..127c1b617b8f8 100644 --- a/src/coreclr/nativeaot/Runtime/i386/ExceptionHandling.asm +++ b/src/coreclr/nativeaot/Runtime/i386/ExceptionHandling.asm @@ -74,7 +74,7 @@ FASTCALL_FUNC RhpThrowHwEx, 0 ;; edx contains the address of the ExInfo call RhThrowHwEx - EXPORT_POINTER_TO_ADDRESS _PointerToRhpThrowHwEx2 +ALTERNATE_ENTRY RhpThrowHwEx2 ;; no return int 3 @@ -151,7 +151,7 @@ FASTCALL_FUNC RhpThrowEx, 0 ;; edx contains the address of the ExInfo call RhThrowEx - EXPORT_POINTER_TO_ADDRESS _PointerToRhpThrowEx2 +ALTERNATE_ENTRY RhpThrowEx2 ;; no return int 3 @@ -221,7 +221,7 @@ FASTCALL_FUNC RhpRethrow, 0 ;; edx contains the address of the new ExInfo call RhRethrow - EXPORT_POINTER_TO_ADDRESS _PointerToRhpRethrow2 +ALTERNATE_ENTRY _RhpRethrow2 ;; no return int 3 @@ -315,7 +315,7 @@ FASTCALL_FUNC RhpCallCatchFunclet, 0 ;; EAX: funclet EBP call RhpCallFunclet - EXPORT_POINTER_TO_ADDRESS _PointerToRhpCallCatchFunclet2 +ALTERNATE_ENTRY RhpCallCatchFunclet2 ;; eax: resume IP mov [esp + esp_offsetof_ResumeIP], eax ;; save for later @@ -411,7 +411,7 @@ FASTCALL_FUNC RhpCallFinallyFunclet, 0 ;; EAX: funclet EBP call RhpCallFunclet - EXPORT_POINTER_TO_ADDRESS _PointerToRhpCallFinallyFunclet2 +ALTERNATE_ENTRY RhpCallFinallyFunclet2 pop edx ;; restore REGDISPLAY* @@ -465,7 +465,7 @@ FASTCALL_FUNC RhpCallFilterFunclet, 0 call RhpCallFunclet - EXPORT_POINTER_TO_ADDRESS _PointerToRhpCallFilterFunclet2 +ALTERNATE_ENTRY RhpCallFilterFunclet2 ;; EAX contains the result of the filter execution mov edx, [ebp + 8] diff --git a/src/coreclr/nativeaot/Runtime/i386/UniversalTransition.asm b/src/coreclr/nativeaot/Runtime/i386/UniversalTransition.asm index 488a5b9d18355..d204066863184 100644 --- a/src/coreclr/nativeaot/Runtime/i386/UniversalTransition.asm +++ b/src/coreclr/nativeaot/Runtime/i386/UniversalTransition.asm @@ -74,7 +74,7 @@ ALTERNATE_ENTRY Rhp&FunctionName&@0 lea ecx, [ebp-10h] ; Get pointer to edx value pushed above call eax - EXPORT_POINTER_TO_ADDRESS _PointerToReturnFrom&FunctionName +ALTERNATE_ENTRY ReturnFrom&FunctionName ; We cannot make the label public as that tricks DIA stackwalker into thinking ; it's the beginning of a method. For this reason we export an auxiliary variable diff --git a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc index 05786d0fe470e..f8ec8f5037b1b 100644 --- a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc +++ b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc @@ -230,21 +230,6 @@ C_FUNC(\Name): .endm -.macro EXPORT_POINTER_TO_ADDRESS Name - -// NOTE: The label is intentionally left as 2 - otherwise on OSX 0b or 1b will be incorrectly interpreted as binary integers - -2: - - .data - .align 8 -C_FUNC(\Name): - .quad 2b - .global C_FUNC(\Name) - .text - -.endm - // // CONSTANTS -- INTEGER // diff --git a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc index 0c5fe62c5b199..245ef76d772f3 100644 --- a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc +++ b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc @@ -211,19 +211,6 @@ C_FUNC(\Name): movt \DestReg, #((\Constant) >> 16) .endm -.macro EXPORT_POINTER_TO_ADDRESS Name - -1: - - .data - .align 4 -C_FUNC(\Name): - .word 1b - .global C_FUNC(\Name) - .text - -.endm - // // Macro used from unmanaged helpers called from managed code where the helper does not transition immediately // into pre-emptive mode but may cause a GC and thus requires the stack is crawlable. This is typically the diff --git a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm64.inc b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm64.inc index 8361b06fe6975..2663406dd23fc 100644 --- a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm64.inc +++ b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm64.inc @@ -298,22 +298,6 @@ C_FUNC(\Name): 0: .endm - -.macro EXPORT_POINTER_TO_ADDRESS Name - -1: - - .data - .align 8 -C_FUNC(\Name): - .quad 1b - .global C_FUNC(\Name) -#if !defined(__APPLE__) - .hidden C_FUNC(\Name) -#endif - .text -.endm - // Note: these must match the defs in PInvokeTransitionFrameFlags PTFF_SAVE_SP = 0x00000400 PTFF_SAVE_X0 = 0x00000800