File tree Expand file tree Collapse file tree
src/coreclr/nativeaot/Runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
223223
224224list (APPEND RUNTIME_SOURCES_ARCH_ASM
225225 ${RUNTIME_DIR} /${ARCH_SOURCES_DIR} /AllocFast.${ASM_SUFFIX}
226+ ${ARCH_SOURCES_DIR} /DispatchResolve.${ASM_SUFFIX}
226227 ${ARCH_SOURCES_DIR} /ExceptionHandling.${ASM_SUFFIX}
227228 ${ARCH_SOURCES_DIR} /GcProbe.${ASM_SUFFIX}
228229 ${ARCH_SOURCES_DIR} /MiscStubs.${ASM_SUFFIX}
@@ -233,14 +234,6 @@ list(APPEND RUNTIME_SOURCES_ARCH_ASM
233234 ${RUNTIME_DIR} /${ARCH_SOURCES_DIR} /WriteBarriers.${ASM_SUFFIX}
234235)
235236
236- if (CLR_CMAKE_TARGET_WIN32)
237- if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64)
238- list (APPEND RUNTIME_SOURCES_ARCH_ASM
239- ${ARCH_SOURCES_DIR} /DispatchResolve.${ASM_SUFFIX}
240- )
241- endif ()
242- endif ()
243-
244237# Add architecture specific folder for looking up headers.
245238convert_to_absolute_path (ARCH_SOURCES_DIR ${ARCH_SOURCES_DIR} )
246239include_directories (${ARCH_SOURCES_DIR} )
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+
4+ .intel_syntax noprefix
5+ #include <unixasmmacros. inc >
6+
7+ LEAF_ENTRY RhpResolveInterfaceMethodFast , _TEXT
8+
9+ // Load the MethodTable from the object instance in rdi .
10+ // Trigger an AV if we're dispatching on a null this.
11+ // The exception handling infrastructure is aware of the fact th at this is the first
12+ // instruction of RhpResolveInterfaceMethodFast and uses it to translate an AV here
13+ // to a NullReferenceException at the callsite.
14+ mov r10 , [ rdi ]
15+
16+ // r11 currently contains the indirection cell address.
17+ lea r10 , [ C_VAR(RhpCidResolve) ]
18+ jmp C_FUNC(RhpUniversalTransitionTailCall)
19+
20+ LEAF_END RhpResolveInterfaceMethodFast , _TEXT
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+
4+ .syntax unified
5+ .thumb
6+
7+ #include <unixasmmacros. inc >
8+
9+ LEAF_ENTRY RhpResolveInterfaceMethodFast , _TEXT
10+
11+ // r12 contains the indirection cell address.
12+ // Store it in the red zone for the universal transition thunk.
13+ str r12 , [ sp , # - 8 ]
14+ PREPARE_EXTERNAL_VAR RhpCidResolve , r12
15+ str r12 , [ sp , # - 4 ]
16+
17+ b C_FUNC(RhpUniversalTransitionTailCall)
18+
19+ LEAF_END RhpResolveInterfaceMethodFast , _TEXT
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+
4+ #include <unixasmmacros. inc >
5+
6+ LEAF_ENTRY RhpResolveInterfaceMethodFast , _TEXT
7+
8+ // Load the MethodTable from the object instance in x0.
9+ // Trigger an AV if we're dispatching on a null this.
10+ // The exception handling infrastructure is aware of the fact th at this is the first
11+ // instruction of RhpResolveInterfaceMethodFast and uses it to translate an AV here
12+ // to a NullReferenceException at the callsite.
13+ ldr x12 , [ x0 ]
14+
15+ // x11 currently contains the indirection cell address.
16+ PREPARE_EXTERNAL_VAR RhpCidResolve , xip0
17+ mov xip1 , x11
18+ b C_FUNC(RhpUniversalTransitionTailCall)
19+
20+ LEAF_END RhpResolveInterfaceMethodFast , _TEXT
Original file line number Diff line number Diff line change 1+ ;; Licensed to the .NET Foundation under one or more agreements.
2+ ;; The .NET Foundation licenses this file to you under the MIT license.
3+
4+ . 586
5+ .model fl at
6+ option casemap:none
7+ .code
8+
9+ include AsmMacros. inc
10+
11+ EXTERN RhpCidResolve : PROC
12+ EXTERN _RhpUniversalTransitionTailCall@ 0 : PROC
13+
14+ FASTCALL_FUNC RhpResolveInterfaceMethodFast , 0
15+ ALTERNATE_ENTRY _RhpResolveInterfaceMethodFast
16+
17+ ;; Trigger an AV if we're dispatching on a null this.
18+ ;; The exception handling infrastructure is aware of the fact that this is the first
19+ ;; instruction of RhpResolveInterfaceMethodFast and uses it to translate an AV here
20+ ;; to a NullReferenceException at the callsite.
21+ cmp dword ptr [ ecx ], ecx
22+
23+ ;; eax currently contains the indirection cell address.
24+ ;; Setup call to Universal Transition thunk
25+ push ebp
26+ mov ebp , esp
27+ push eax
28+ lea eax , [ RhpCidResolve ]
29+ push eax
30+
31+ jmp _RhpUniversalTransitionTailCall@ 0
32+
33+ FASTCALL_ENDFUNC
34+
35+ end
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+
4+ #include <unixasmmacros.inc>
5+
6+ LEAF_ENTRY RhpResolveInterfaceMethodFast, _TEXT
7+
8+ // Load the MethodTable from the object instance in a0.
9+ // Trigger an AV if we're dispatching on a null this.
10+ // The exception handling infrastructure is aware of the fact that this is the first
11+ // instruction of RhpResolveInterfaceMethodFast and uses it to translate an AV here
12+ // to a NullReferenceException at the callsite.
13+ ld.d $zero, $a0, 0
14+
15+ // $t8 currently contains the indirection cell address.
16+ // Calling convention of the universal thunk is:
17+ // $t7: target address for the thunk to call
18+ // $t8: parameter of the thunk's target
19+ PREPARE_EXTERNAL_VAR RhpCidResolve, $t7
20+ b C_FUNC(RhpUniversalTransitionTailCall)
21+
22+ LEAF_END RhpResolveInterfaceMethodFast, _TEXT
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+
4+ #include <unixasmmacros.inc>
5+
6+ LEAF_ENTRY RhpResolveInterfaceMethodFast, _TEXT
7+
8+ // Load the MethodTable from the object instance in a0 .
9+ // Trigger an AV if we're dispatching on a null this.
10+ // The exception handling infrastructure is aware of the fact that this is the first
11+ // instruction of RhpResolveInterfaceMethodFast and uses it to translate an AV here
12+ // to a NullReferenceException at the callsite.
13+ ld zero, 0 (a0 )
14+
15+ // t5 currently contains the indirection cell address.
16+ // Calling convention of the universal thunk is:
17+ // t0: target address for the thunk to call
18+ // t1: parameter of the thunk's target
19+ PREPARE_EXTERNAL_VAR RhpCidResolve, t0
20+ mv t1, t5
21+ tail C_FUNC(RhpUniversalTransitionTailCall)
22+
23+ LEAF_END RhpResolveInterfaceMethodFast, _TEXT
You can’t perform that action at this time.
0 commit comments