summaryrefslogtreecommitdiff
path: root/src/vm/arm64
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2018-10-04 10:18:23 +0200
committerGitHub <noreply@github.com>2018-10-04 10:18:23 +0200
commit11832401739148f1f1e9419cb51180ba5263a41b (patch)
tree91e81791918d307b0bc9f8255d022fd2fbfbd970 /src/vm/arm64
parent0068168531e849cbad8388f00f3f23e58d3a01b4 (diff)
downloadcoreclr-11832401739148f1f1e9419cb51180ba5263a41b.tar.gz
coreclr-11832401739148f1f1e9419cb51180ba5263a41b.tar.bz2
coreclr-11832401739148f1f1e9419cb51180ba5263a41b.zip
Remove AppDomain unload (#20250)
* Remove AppDomain unload This change removes all code in AppDomain that's related to AppDomain unloading which is obsolete in CoreCLR. It also removes all calls to the removed methods. In few places, I have made the change simpler by taking into account the fact that there is always just one AppDomain.
Diffstat (limited to 'src/vm/arm64')
-rw-r--r--src/vm/arm64/asmconstants.h2
-rw-r--r--src/vm/arm64/asmhelpers.S113
-rw-r--r--src/vm/arm64/asmhelpers.asm113
3 files changed, 1 insertions, 227 deletions
diff --git a/src/vm/arm64/asmconstants.h b/src/vm/arm64/asmconstants.h
index 262e481b53..7d0a9f734b 100644
--- a/src/vm/arm64/asmconstants.h
+++ b/src/vm/arm64/asmconstants.h
@@ -46,7 +46,7 @@ ASMCONSTANTS_C_ASSERT(Thread__m_pFrame == offsetof(Thread, m_pFrame));
#define Thread_m_fPreemptiveGCDisabled Thread__m_fPreemptiveGCDisabled
#ifndef CROSSGEN_COMPILE
-#define Thread__m_pDomain 0x20
+#define Thread__m_pDomain 0x18
ASMCONSTANTS_C_ASSERT(Thread__m_pDomain == offsetof(Thread, m_pDomain));
#define AppDomain__m_dwId 0x08
diff --git a/src/vm/arm64/asmhelpers.S b/src/vm/arm64/asmhelpers.S
index e138feb402..aa79b4d477 100644
--- a/src/vm/arm64/asmhelpers.S
+++ b/src/vm/arm64/asmhelpers.S
@@ -767,15 +767,6 @@ LOCAL_LABEL(UMThunkStub_HaveThread):
LOCAL_LABEL(UMThunkStub_InCooperativeMode):
ldr x12, [fp, #UMThunkStub_HiddenArg] // x12 = UMEntryThunk*
-
- ldr x0, [x19, #Thread__m_pDomain]
-
- // m_dwDomainId is 4 bytes so using 32-bit variant
- ldr w1, [x12, #UMEntryThunk__m_dwDomainId]
- ldr w0, [x0, #AppDomain__m_dwId]
- cmp w0, w1
- bne LOCAL_LABEL(UMThunkStub_WrongAppDomain)
-
ldr x3, [x12, #UMEntryThunk__m_pUMThunkMarshInfo] // x3 = m_pUMThunkMarshInfo
// m_cbActualArgSize is UINT32 and hence occupies 4 bytes
@@ -846,112 +837,8 @@ LOCAL_LABEL(UMThunkStub_DoTrapReturningThreads):
add sp, sp, #SIZEOF__FloatArgumentRegisters
b LOCAL_LABEL(UMThunkStub_InCooperativeMode)
-LOCAL_LABEL(UMThunkStub_WrongAppDomain):
- // Saving FP Args as this is read by UM2MThunk_WrapperHelper
- sub sp, sp, #SIZEOF__FloatArgumentRegisters
- SAVE_FLOAT_ARGUMENT_REGISTERS sp, 0
-
- // UMEntryThunk* pUMEntry
- ldr x0, [fp, #UMThunkStub_HiddenArg]
-
- // void * pArgs
- add x2, fp, #16
-
- // remaining arguments are unused
- bl C_FUNC(UM2MDoADCallBack)
-
- // restore integral return value
- ldp x0, x1, [fp, #16]
-
- // restore FP or HFA return value
- RESTORE_FLOAT_ARGUMENT_REGISTERS sp, 0
-
- b LOCAL_LABEL(UMThunkStub_PostCall)
-
NESTED_END UMThunkStub, _TEXT
-
-// UM2MThunk_WrapperHelper(void *pThunkArgs, // x0
-// int cbStackArgs, // x1 (unused)
-// void *pAddr, // x2 (unused)
-// UMEntryThunk *pEntryThunk,// x3
-// Thread *pThread) // x4
-
-// pThunkArgs points to the argument registers pushed on the stack by UMThunkStub
-
-NESTED_ENTRY UM2MThunk_WrapperHelper, _TEXT, NoHandler
-
- PROLOG_SAVE_REG_PAIR_INDEXED fp, lr, -32
- PROLOG_SAVE_REG x19, 16
-
-
- // save pThunkArgs in non-volatile reg. It is required after return from call to ILStub
- mov x19, x0
-
- // ARM64TODO - Is this required by ILStub
- mov x12, x3 //// x12 = UMEntryThunk *
-
- //
- // Note that layout of the arguments is given by UMThunkStub frame
- //
- ldr x3, [x3, #UMEntryThunk__m_pUMThunkMarshInfo]
-
- // m_cbActualArgSize is 4-byte field
- ldr w2, [x3, #UMThunkMarshInfo__m_cbActualArgSize]
- cbz w2, LOCAL_LABEL(UM2MThunk_WrapperHelper_RegArgumentsSetup)
-
- // extend to 64- bits
- uxtw x2, w2
-
- // Source pointer. Subtracting 16 bytes due to fp & lr
- add x6, x0, #(UMThunkStub_StackArgs-16)
-
- // move source ptr to end of Stack Args
- add x6, x6, x2
-
- // Count of stack slot pairs to copy (divide by 16)
- lsr x1, x2, #4
-
- // Is there an extra stack slot? (can happen when stack arg bytes not multiple of 16)
- and x2, x2, #8
-
- // If yes then start source pointer from 16 byte aligned stack slot
- add x6, x6, x2
-
- // increment stack slot pair count by 1 if x2 is not zero
- add x1, x1, x2, LSR #3
-
-LOCAL_LABEL(UM2MThunk_WrapperHelper_StackLoop):
- ldp x4, x5, [x6, #-16]!
- stp x4, x5, [sp, #-16]!
- subs x1, x1, #1
- bne LOCAL_LABEL(UM2MThunk_WrapperHelper_StackLoop)
-
-LOCAL_LABEL(UM2MThunk_WrapperHelper_RegArgumentsSetup):
- ldr x16, [x3, #(UMThunkMarshInfo__m_pILStub)]
-
- // reload floating point registers
- RESTORE_FLOAT_ARGUMENT_REGISTERS x0, -1 * (SIZEOF__FloatArgumentRegisters + 16)
-
- // reload argument registers
- RESTORE_ARGUMENT_REGISTERS x0, 0
-
- blr x16
-
- // save integral return value
- stp x0, x1, [x19]
-
- // save FP/HFA return values
- SAVE_FLOAT_ARGUMENT_REGISTERS x19, -1 * (SIZEOF__FloatArgumentRegisters + 16)
-
- EPILOG_STACK_RESTORE
- EPILOG_RESTORE_REG x19, 16
- EPILOG_RESTORE_REG_PAIR_INDEXED fp, lr, 32
- EPILOG_RETURN
-
-NESTED_END UM2MThunk_WrapperHelper, _TEXT
-
-
#ifdef FEATURE_HIJACK
// ------------------------------------------------------------------
// Hijack function for functions which return a scalar type or a struct (value type)
diff --git a/src/vm/arm64/asmhelpers.asm b/src/vm/arm64/asmhelpers.asm
index 7346c468a0..e9edec17e5 100644
--- a/src/vm/arm64/asmhelpers.asm
+++ b/src/vm/arm64/asmhelpers.asm
@@ -27,7 +27,6 @@
IMPORT GetThread
IMPORT CreateThreadBlockThrow
IMPORT UMThunkStubRareDisableWorker
- IMPORT UM2MDoADCallBack
IMPORT GetCurrentSavedRedirectContext
IMPORT LinkFrameAndThrow
IMPORT FixContextHandler
@@ -754,15 +753,6 @@ UMThunkStub_HaveThread
UMThunkStub_InCooperativeMode
ldr x12, [fp, #UMThunkStub_HiddenArg] ; x12 = UMEntryThunk*
-
- ldr x0, [x19, #Thread__m_pDomain]
-
- ; m_dwDomainId is 4 bytes so using 32-bit variant
- ldr w1, [x12, #UMEntryThunk__m_dwDomainId]
- ldr w0, [x0, #AppDomain__m_dwId]
- cmp w0, w1
- bne UMThunkStub_WrongAppDomain
-
ldr x3, [x12, #UMEntryThunk__m_pUMThunkMarshInfo] ; x3 = m_pUMThunkMarshInfo
; m_cbActualArgSize is UINT32 and hence occupies 4 bytes
@@ -833,109 +823,6 @@ UMThunkStub_DoTrapReturningThreads
add sp, sp, #SIZEOF__FloatArgumentRegisters
b UMThunkStub_InCooperativeMode
-UMThunkStub_WrongAppDomain
- ; Saving FP Args as this is read by UM2MThunk_WrapperHelper
- sub sp, sp, #SIZEOF__FloatArgumentRegisters
- SAVE_FLOAT_ARGUMENT_REGISTERS sp, 0
-
- ; UMEntryThunk* pUMEntry
- ldr x0, [fp, #UMThunkStub_HiddenArg]
-
- ; void * pArgs
- add x2, fp, #16
-
- ; remaining arguments are unused
- bl UM2MDoADCallBack
-
- ; restore any integral return value(s)
- ldp x0, x1, [fp, #16]
-
- ; restore any FP or HFA return value(s)
- RESTORE_FLOAT_ARGUMENT_REGISTERS sp, 0
-
- b UMThunkStub_PostCall
-
- NESTED_END
-
-
-; UM2MThunk_WrapperHelper(void *pThunkArgs, // x0
-; int cbStackArgs, // x1 (unused)
-; void *pAddr, // x2 (unused)
-; UMEntryThunk *pEntryThunk, // x3
-; Thread *pThread) // x4
-
-; pThunkArgs points to the argument registers pushed on the stack by UMThunkStub
-
- NESTED_ENTRY UM2MThunk_WrapperHelper
-
- PROLOG_SAVE_REG_PAIR fp, lr, #-32!
- PROLOG_SAVE_REG x19, #16
-
-
- ; save pThunkArgs in non-volatile reg. It is required after return from call to ILStub
- mov x19, x0
-
- ; ARM64TODO - Is this required by ILStub
- mov x12, x3 ; // x12 = UMEntryThunk *
-
- ;
- ; Note that layout of the arguments is given by UMThunkStub frame
- ;
- ldr x3, [x3, #UMEntryThunk__m_pUMThunkMarshInfo]
-
- ; m_cbActualArgSize is 4-byte field
- ldr w2, [x3, #UMThunkMarshInfo__m_cbActualArgSize]
- cbz w2, UM2MThunk_WrapperHelper_RegArgumentsSetup
-
- ; extend to 64- bits
- uxtw x2, w2
-
- ; Source pointer. Subtracting 16 bytes due to fp & lr
- add x6, x0, #(UMThunkStub_StackArgs-16)
-
- ; move source ptr to end of Stack Args
- add x6, x6, x2
-
- ; Count of stack slot pairs to copy (divide by 16)
- lsr x1, x2, #4
-
- ; Is there an extra stack slot? (can happen when stack arg bytes not multiple of 16)
- and x2, x2, #8
-
- ; If yes then start source pointer from 16 byte aligned stack slot
- add x6, x6, x2
-
- ; increment stack slot pair count by 1 if x2 is not zero
- add x1, x1, x2, LSR #3
-
-UM2MThunk_WrapperHelper_StackLoop
- ldp x4, x5, [x6, #-16]!
- stp x4, x5, [sp, #-16]!
- subs x1, x1, #1
- bne UM2MThunk_WrapperHelper_StackLoop
-
-UM2MThunk_WrapperHelper_RegArgumentsSetup
- ldr x16, [x3, #(UMThunkMarshInfo__m_pILStub)]
-
- ; reload floating point registers
- RESTORE_FLOAT_ARGUMENT_REGISTERS x0, -1 * (SIZEOF__FloatArgumentRegisters + 16)
-
- ; reload argument registers
- RESTORE_ARGUMENT_REGISTERS x0, 0
-
- blr x16
-
- ; save any integral return value(s)
- stp x0, x1, [x19]
-
- ; save any FP or HFA return value(s)
- SAVE_FLOAT_ARGUMENT_REGISTERS x19, -1 * (SIZEOF__FloatArgumentRegisters + 16)
-
- EPILOG_STACK_RESTORE
- EPILOG_RESTORE_REG x19, #16
- EPILOG_RESTORE_REG_PAIR fp, lr, #32!
- EPILOG_RETURN
-
NESTED_END
#ifdef FEATURE_HIJACK