summaryrefslogtreecommitdiff
path: root/src/vm/amd64/unixstubs.cpp
diff options
context:
space:
mode:
authordotnet-bot <dotnet-bot@microsoft.com>2015-01-30 14:14:42 -0800
committerdotnet-bot <dotnet-bot@microsoft.com>2015-01-30 14:14:42 -0800
commitef1e2ab328087c61a6878c1e84f4fc5d710aebce (patch)
treedee1bbb89e9d722e16b0d1485e3cdd1b6c8e2cfa /src/vm/amd64/unixstubs.cpp
downloadcoreclr-ef1e2ab328087c61a6878c1e84f4fc5d710aebce.tar.gz
coreclr-ef1e2ab328087c61a6878c1e84f4fc5d710aebce.tar.bz2
coreclr-ef1e2ab328087c61a6878c1e84f4fc5d710aebce.zip
Initial commit to populate CoreCLR repo
[tfs-changeset: 1407945]
Diffstat (limited to 'src/vm/amd64/unixstubs.cpp')
-rw-r--r--src/vm/amd64/unixstubs.cpp158
1 files changed, 158 insertions, 0 deletions
diff --git a/src/vm/amd64/unixstubs.cpp b/src/vm/amd64/unixstubs.cpp
new file mode 100644
index 0000000000..2615bdb715
--- /dev/null
+++ b/src/vm/amd64/unixstubs.cpp
@@ -0,0 +1,158 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+#include "common.h"
+
+extern "C"
+{
+ void RedirectForThrowControl()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void ErectWriteBarrier_ASM(Object** dst, Object* ref)
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void ExternalMethodFixupPatchLabel()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void ExternalMethodFixupStub()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void GenericPInvokeCalliHelper()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void NakedThrowHelper()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void PInvokeStubForHost()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void PInvokeStubForHostInner(DWORD dwStackSize, LPVOID pStackFrame, LPVOID pTarget)
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void SinglecastDelegateInvokeStub()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void TheUMEntryPrestub()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void UMThunkStub()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void VarargPInvokeStub()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void STDCALL UM2MThunk_WrapperHelper(void *pThunkArgs,
+ int argLen,
+ void *pAddr,
+ UMEntryThunk *pEntryThunk,
+ Thread *pThread)
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void VarargPInvokeStub_RetBuffArg()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void VirtualMethodFixupPatchLabel()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void VirtualMethodFixupStub()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ DWORD getcpuid(DWORD arg, unsigned char result[16])
+ {
+ DWORD eax;
+ __asm(" xor %%ecx, %%ecx\n" \
+ " cpuid\n" \
+ " mov %%eax, 0(%[result])\n" \
+ " mov %%ebx, 4(%[result])\n" \
+ " mov %%ecx, 8(%[result])\n" \
+ " mov %%edx, 12(%[result])\n" \
+ : "=a"(eax) /*output in eax*/\
+ : "a"(arg), [result]"r"(result) /*inputs - arg in eax, result in any register*/\
+ : "eax", "rbx", "ecx", "edx" /* registers that are clobbered*/
+ );
+ return eax;
+ }
+
+ DWORD getextcpuid(DWORD arg1, DWORD arg2, unsigned char result[16])
+ {
+ DWORD eax;
+ __asm(" cpuid\n" \
+ " mov %%eax, 0(%[result])\n" \
+ " mov %%ebx, 4(%[result])\n" \
+ " mov %%ecx, 8(%[result])\n" \
+ " mov %%edx, 12(%[result])\n" \
+ : "=a"(eax) /*output in eax*/\
+ : "c"(arg1), "a"(arg2), [result]"r"(result) /*inputs - arg1 in ecx, arg2 in eax, result in any register*/\
+ : "eax", "rbx", "ecx", "edx" /* registers that are clobbered*/
+ );
+ return eax;
+ }
+
+ void STDCALL JIT_MemCpy(void *dest, const void *src, SIZE_T count)
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void STDCALL JIT_MemCpy_End()
+ {
+ }
+
+ void STDCALL JIT_MemSet(void *dest, int c, SIZE_T count)
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+
+ void STDCALL JIT_MemSet_End()
+ {
+ }
+
+ void STDCALL JIT_ProfilerEnterLeaveTailcallStub(UINT_PTR ProfilerHandle)
+ {
+ }
+
+#ifdef FEATURE_PREJIT
+ void StubDispatchFixupStub()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+#endif
+
+ void StubDispatchFixupPatchLabel()
+ {
+ PORTABILITY_ASSERT("Implement for PAL");
+ }
+};