From ec0d7d1e0a9a6d35cbd20d7b1e8177f5fa56dd91 Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Wed, 22 Feb 2017 12:01:27 +0300 Subject: [PATCH 1/6] Passing target platform&os to IlcCompiler --- .../DependencyAnalysis/AssemblyStubNode.cs | 1 + .../Target_ARM/TargetRegisterMap.cs | 1 + src/ILCompiler/src/Program.cs | 35 +++++ src/Native/Runtime/unix/PalRedhawkUnix.cpp | 131 +++++++++++------- tests/runtest.sh | 2 +- tests/src/Simple/SimpleTest.targets | 4 + 6 files changed, 123 insertions(+), 51 deletions(-) diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/AssemblyStubNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/AssemblyStubNode.cs index 5f19994583f..dcc44a93748 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/AssemblyStubNode.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/AssemblyStubNode.cs @@ -43,6 +43,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly) return x86Emitter.Builder.ToObjectData(); case TargetArchitecture.ARM: + case TargetArchitecture.ARMEL: ARM.ARMEmitter armEmitter = new ARM.ARMEmitter(factory); EmitCode(factory, ref armEmitter, relocsOnly); armEmitter.Builder.RequireInitialAlignment(factory.Target.MinimumFunctionAlignment); diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs index 93bbdd57e69..a05a6860090 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs @@ -22,6 +22,7 @@ public TargetRegisterMap(TargetOS os) switch (os) { case TargetOS.Windows: + case TargetOS.Linux: Arg0 = Register.R0; Arg1 = Register.R1; Result = Register.R0; diff --git a/src/ILCompiler/src/Program.cs b/src/ILCompiler/src/Program.cs index 385670960a9..ba1958717e5 100644 --- a/src/ILCompiler/src/Program.cs +++ b/src/ILCompiler/src/Program.cs @@ -28,7 +28,9 @@ internal class Program private bool _generateFullDgmlLog; private TargetArchitecture _targetArchitecture; + private string _targetArchitectureStr; private TargetOS _targetOS; + private string _targetOSStr; private OptimizationMode _optimizationMode; private bool _enableDebugInfo; private string _systemModuleName = "System.Private.CoreLib"; @@ -130,6 +132,9 @@ private ArgumentSyntax ParseCommandLine(string[] args) syntax.DefineOptionList("codegenopt", ref _codegenOptions, "Define a codegen option"); syntax.DefineOptionList("rdxml", ref _rdXmlFilePaths, "RD.XML file(s) for compilation"); + syntax.DefineOption("targetarch", ref _targetArchitectureStr, "Target architecture for cross compilation"); + syntax.DefineOption("targetos", ref _targetOSStr, "Target OS for cross compilation"); + syntax.DefineOption("singlemethodtypename", ref _singleMethodTypeName, "Single method compilation: name of the owning type"); syntax.DefineOption("singlemethodname", ref _singleMethodName, "Single method compilation: name of the method"); syntax.DefineOptionList("singlemethodgenericarg", ref _singleMethodGenericArgs, "Single method compilation: generic arguments to the method"); @@ -167,6 +172,36 @@ private int Run(string[] args) if (_outputFilePath == null) throw new CommandLineException("Output filename must be specified (/out )"); + // + // Set target Architecture and OS + // + if (_targetArchitectureStr != null) + { + if (_targetArchitectureStr.Equals("x86")) + _targetArchitecture = TargetArchitecture.X86; + else if (_targetArchitectureStr.Equals("x64")) + _targetArchitecture = TargetArchitecture.X64; + else if (_targetArchitectureStr.Equals("arm")) + _targetArchitecture = TargetArchitecture.ARM; + else if (_targetArchitectureStr.Equals("armel")) + _targetArchitecture = TargetArchitecture.ARMEL; + else if (_targetArchitectureStr.Equals("arm64")) + _targetArchitecture = TargetArchitecture.ARM64; + else + throw new NotImplementedException(); + } + if (_targetOSStr != null) + { + if (_targetOSStr.Equals("windows")) + _targetOS = TargetOS.Windows; + else if (_targetOSStr.Equals("linux")) + _targetOS = TargetOS.Linux; + else if (_targetOSStr.Equals("osx")) + _targetOS = TargetOS.OSX; + else + throw new NotImplementedException(); + } + // // Initialize type system context // diff --git a/src/Native/Runtime/unix/PalRedhawkUnix.cpp b/src/Native/Runtime/unix/PalRedhawkUnix.cpp index 1c2fa1d2b6a..541007100ed 100644 --- a/src/Native/Runtime/unix/PalRedhawkUnix.cpp +++ b/src/Native/Runtime/unix/PalRedhawkUnix.cpp @@ -704,74 +704,100 @@ REDHAWK_PALEXPORT void PalPrintFatalError(const char* message) write(STDERR_FILENO, message, sizeof(message)); } +#ifdef __linux__ +size_t +GetLogicalProcessorCacheSizeFromOS() +{ + size_t cacheSize = 0; + +#ifdef _SC_LEVEL1_DCACHE_SIZE + cacheSize = max(cacheSize, sysconf(_SC_LEVEL1_DCACHE_SIZE)); +#endif +#ifdef _SC_LEVEL2_CACHE_SIZE + cacheSize = max(cacheSize, sysconf(_SC_LEVEL2_CACHE_SIZE)); +#endif +#ifdef _SC_LEVEL3_CACHE_SIZE + cacheSize = max(cacheSize, sysconf(_SC_LEVEL3_CACHE_SIZE)); +#endif +#ifdef _SC_LEVEL4_CACHE_SIZE + cacheSize = max(cacheSize, sysconf(_SC_LEVEL4_CACHE_SIZE)); +#endif + return cacheSize; +} +#endif + bool QueryCacheSize() { bool success = true; g_cbLargestOnDieCache = 0; #ifdef __linux__ - DIR* cpuDir = opendir("/sys/devices/system/cpu"); - if (cpuDir == nullptr) - { - ASSERT_UNCONDITIONALLY("opendir on /sys/devices/system/cpu failed\n"); - return false; - } + g_cbLargestOnDieCache = GetLogicalProcessorCacheSizeFromOS(); - dirent* cpuEntry; - // Process entries starting with "cpu" (cpu0, cpu1, ...) in the directory - while (success && (cpuEntry = readdir(cpuDir)) != nullptr) + if (g_cbLargestOnDieCache == 0) { - if ((strncmp(cpuEntry->d_name, "cpu", 3) == 0) && isdigit(cpuEntry->d_name[3])) + DIR* cpuDir = opendir("/sys/devices/system/cpu"); + if (cpuDir == nullptr) { - char cpuCachePath[64] = "/sys/devices/system/cpu/"; - strcat(cpuCachePath, cpuEntry->d_name); - strcat(cpuCachePath, "/cache"); - DIR* cacheDir = opendir(cpuCachePath); - if (cacheDir == nullptr) - { - success = false; - break; - } - - strcat(cpuCachePath, "/"); - int cpuCacheBasePathLength = strlen(cpuCachePath); + ASSERT_UNCONDITIONALLY("opendir on /sys/devices/system/cpu failed\n"); + return false; + } - dirent* cacheEntry; - // For all entries in the directory - while ((cacheEntry = readdir(cacheDir)) != nullptr) + dirent* cpuEntry; + // Process entries starting with "cpu" (cpu0, cpu1, ...) in the directory + while (success && (cpuEntry = readdir(cpuDir)) != nullptr) + { + if ((strncmp(cpuEntry->d_name, "cpu", 3) == 0) && isdigit(cpuEntry->d_name[3])) { - if (strncmp(cacheEntry->d_name, "index", 5) == 0) + char cpuCachePath[64] = "/sys/devices/system/cpu/"; + strcat(cpuCachePath, cpuEntry->d_name); + strcat(cpuCachePath, "/cache"); + DIR* cacheDir = opendir(cpuCachePath); + if (cacheDir == nullptr) { - cpuCachePath[cpuCacheBasePathLength] = '\0'; - strcat(cpuCachePath, cacheEntry->d_name); - strcat(cpuCachePath, "/size"); + success = false; + break; + } + + strcat(cpuCachePath, "/"); + int cpuCacheBasePathLength = strlen(cpuCachePath); - int fd = open(cpuCachePath, O_RDONLY); - if (fd < 0) + dirent* cacheEntry; + // For all entries in the directory + while ((cacheEntry = readdir(cacheDir)) != nullptr) + { + if (strncmp(cacheEntry->d_name, "index", 5) == 0) { - success = false; - break; + cpuCachePath[cpuCacheBasePathLength] = '\0'; + strcat(cpuCachePath, cacheEntry->d_name); + strcat(cpuCachePath, "/size"); + + int fd = open(cpuCachePath, O_RDONLY); + if (fd < 0) + { + success = false; + break; + } + + char cacheSizeStr[16]; + int bytesRead = read(fd, cacheSizeStr, sizeof(cacheSizeStr) - 1); + cacheSizeStr[bytesRead] = '\0'; + + // Parse the cache size that is formatted as a number followed by the K letter + char* lastChar; + int cacheSize = strtol(cacheSizeStr, &lastChar, 10) * 1024; + ASSERT(*lastChar == 'K'); + g_cbLargestOnDieCache = max(g_cbLargestOnDieCache, cacheSize); + + close(fd); } - - char cacheSizeStr[16]; - int bytesRead = read(fd, cacheSizeStr, sizeof(cacheSizeStr) - 1); - cacheSizeStr[bytesRead] = '\0'; - - // Parse the cache size that is formatted as a number followed by the K letter - char* lastChar; - int cacheSize = strtol(cacheSizeStr, &lastChar, 10) * 1024; - ASSERT(*lastChar == 'K'); - g_cbLargestOnDieCache = max(g_cbLargestOnDieCache, cacheSize); - - close(fd); } - } - closedir(cacheDir); + closedir(cacheDir); + } } + closedir(cpuDir); } - closedir(cpuDir); - #elif HAVE_SYSCTL int64_t g_cbLargestOnDieCache; @@ -791,12 +817,17 @@ bool QueryCacheSize() } } #else -#error Don't know how to get cache size on this platform +#error Do not know how to get cache size on this platform #endif // __linux__ // TODO: implement adjusted cache size g_cbLargestOnDieCacheAdjusted = g_cbLargestOnDieCache; +#ifdef _ARM_ + // TODO Some system on arm32 does not give the info about cache sizes by these methods so we need to find another ways + success = true; +#endif + return success; } diff --git a/tests/runtest.sh b/tests/runtest.sh index d0e94309d0a..db39175b1a9 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -47,7 +47,7 @@ run_test_dir() __extra_args="${__extra_args} /p:IlcMultiModule=true" fi - rm -rf ${__dir_path}/bin ${__dir_path}/obj + rm -rf ${__dir_path}/bin/${CoreRT_BuildArch} ${__dir_path}/obj/${CoreRT_BuildArch} local __msbuild_dir=${CoreRT_TestRoot}/../Tools diff --git a/tests/src/Simple/SimpleTest.targets b/tests/src/Simple/SimpleTest.targets index ba0cd5cdc94..de35dd09293 100644 --- a/tests/src/Simple/SimpleTest.targets +++ b/tests/src/Simple/SimpleTest.targets @@ -40,4 +40,8 @@ + + + + From 010ee8edc436fd30d3a52b6a6d14b0e6cc89f695 Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Wed, 22 Feb 2017 13:16:46 +0300 Subject: [PATCH 2/6] Some fixes added --- .../Target_ARM/TargetRegisterMap.cs | 15 +++----------- src/ILCompiler/src/Program.cs | 20 +++++++++---------- tests/src/Simple/SimpleTest.targets | 2 +- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs index a05a6860090..5e0fde4fa27 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs @@ -19,18 +19,9 @@ public struct TargetRegisterMap public TargetRegisterMap(TargetOS os) { - switch (os) - { - case TargetOS.Windows: - case TargetOS.Linux: - Arg0 = Register.R0; - Arg1 = Register.R1; - Result = Register.R0; - break; - - default: - throw new NotImplementedException(); - } + Arg0 = Register.R0; + Arg1 = Register.R1; + Result = Register.R0; } } } diff --git a/src/ILCompiler/src/Program.cs b/src/ILCompiler/src/Program.cs index ba1958717e5..8869e3d9d07 100644 --- a/src/ILCompiler/src/Program.cs +++ b/src/ILCompiler/src/Program.cs @@ -177,29 +177,29 @@ private int Run(string[] args) // if (_targetArchitectureStr != null) { - if (_targetArchitectureStr.Equals("x86")) + if (_targetArchitectureStr.Equals("x86", StringComparison.OrdinalIgnoreCase)) _targetArchitecture = TargetArchitecture.X86; - else if (_targetArchitectureStr.Equals("x64")) + else if (_targetArchitectureStr.Equals("x64", StringComparison.OrdinalIgnoreCase)) _targetArchitecture = TargetArchitecture.X64; - else if (_targetArchitectureStr.Equals("arm")) + else if (_targetArchitectureStr.Equals("arm", StringComparison.OrdinalIgnoreCase)) _targetArchitecture = TargetArchitecture.ARM; - else if (_targetArchitectureStr.Equals("armel")) + else if (_targetArchitectureStr.Equals("armel", StringComparison.OrdinalIgnoreCase)) _targetArchitecture = TargetArchitecture.ARMEL; - else if (_targetArchitectureStr.Equals("arm64")) + else if (_targetArchitectureStr.Equals("arm64", StringComparison.OrdinalIgnoreCase)) _targetArchitecture = TargetArchitecture.ARM64; else - throw new NotImplementedException(); + throw new CommandLineException("Target architecture is not supported"); } if (_targetOSStr != null) { - if (_targetOSStr.Equals("windows")) + if (_targetOSStr.Equals("windows", StringComparison.OrdinalIgnoreCase)) _targetOS = TargetOS.Windows; - else if (_targetOSStr.Equals("linux")) + else if (_targetOSStr.Equals("linux", StringComparison.OrdinalIgnoreCase)) _targetOS = TargetOS.Linux; - else if (_targetOSStr.Equals("osx")) + else if (_targetOSStr.Equals("osx", StringComparison.OrdinalIgnoreCase)) _targetOS = TargetOS.OSX; else - throw new NotImplementedException(); + throw new CommandLineException("Target OS is not supported"); } // diff --git a/tests/src/Simple/SimpleTest.targets b/tests/src/Simple/SimpleTest.targets index de35dd09293..6168776ed43 100644 --- a/tests/src/Simple/SimpleTest.targets +++ b/tests/src/Simple/SimpleTest.targets @@ -41,7 +41,7 @@ - + From 4dacc6daebafcd690034f55b72d7d5c82064d624 Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Mon, 27 Feb 2017 14:10:29 +0300 Subject: [PATCH 3/6] Provided runtime assert instead of compile-time --- .../Target_ARM/ARMReadyToRunHelperNode.cs | 83 ++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunHelperNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunHelperNode.cs index afdf9bdeb20..c8a21f2fe69 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunHelperNode.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunHelperNode.cs @@ -11,12 +11,91 @@ namespace ILCompiler.DependencyAnalysis { - // ARM specific portions of ReadyToRunHelperNode + /// + /// ARM specific portions of ReadyToRunHelperNode + /// partial class ReadyToRunHelperNode { + private ExternSymbolNode NYI_Assert; protected override void EmitCode(NodeFactory factory, ref ARMEmitter encoder, bool relocsOnly) { - throw new NotImplementedException(); + NYI_Assert = new ExternSymbolNode("NYI_Assert"); + + switch (Id) + { + case ReadyToRunHelperId.NewHelper: + { + TypeDesc target = (TypeDesc)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + case ReadyToRunHelperId.VirtualCall: + { + MethodDesc targetMethod = (MethodDesc)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + case ReadyToRunHelperId.IsInstanceOf: + { + TypeDesc target = (TypeDesc)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + case ReadyToRunHelperId.CastClass: + { + TypeDesc target = (TypeDesc)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + case ReadyToRunHelperId.NewArr1: + { + TypeDesc target = (TypeDesc)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + case ReadyToRunHelperId.GetNonGCStaticBase: + { + MetadataType target = (MetadataType)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + case ReadyToRunHelperId.GetThreadStaticBase: + { + MetadataType target = (MetadataType)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + case ReadyToRunHelperId.GetGCStaticBase: + { + MetadataType target = (MetadataType)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + case ReadyToRunHelperId.DelegateCtor: + { + DelegateCreationInfo target = (DelegateCreationInfo)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + case ReadyToRunHelperId.ResolveVirtualFunction: + { + MethodDesc targetMethod = (MethodDesc)Target; + encoder.EmitJMP(NYI_Assert); + } + break; + + default: + throw new NotImplementedException(); + } } } } From eaafff68c063102ad23b0d73345e33a375d6220e Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Mon, 27 Feb 2017 15:01:31 +0300 Subject: [PATCH 4/6] Deleted /sys/devices/system/cpu/cache parsing --- src/Native/Runtime/unix/PalRedhawkUnix.cpp | 65 +--------------------- 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/src/Native/Runtime/unix/PalRedhawkUnix.cpp b/src/Native/Runtime/unix/PalRedhawkUnix.cpp index 541007100ed..f5d9f681bbf 100644 --- a/src/Native/Runtime/unix/PalRedhawkUnix.cpp +++ b/src/Native/Runtime/unix/PalRedhawkUnix.cpp @@ -732,72 +732,9 @@ bool QueryCacheSize() g_cbLargestOnDieCache = 0; #ifdef __linux__ - g_cbLargestOnDieCache = GetLogicalProcessorCacheSizeFromOS(); - - if (g_cbLargestOnDieCache == 0) - { - DIR* cpuDir = opendir("/sys/devices/system/cpu"); - if (cpuDir == nullptr) - { - ASSERT_UNCONDITIONALLY("opendir on /sys/devices/system/cpu failed\n"); - return false; - } - - dirent* cpuEntry; - // Process entries starting with "cpu" (cpu0, cpu1, ...) in the directory - while (success && (cpuEntry = readdir(cpuDir)) != nullptr) - { - if ((strncmp(cpuEntry->d_name, "cpu", 3) == 0) && isdigit(cpuEntry->d_name[3])) - { - char cpuCachePath[64] = "/sys/devices/system/cpu/"; - strcat(cpuCachePath, cpuEntry->d_name); - strcat(cpuCachePath, "/cache"); - DIR* cacheDir = opendir(cpuCachePath); - if (cacheDir == nullptr) - { - success = false; - break; - } - - strcat(cpuCachePath, "/"); - int cpuCacheBasePathLength = strlen(cpuCachePath); - dirent* cacheEntry; - // For all entries in the directory - while ((cacheEntry = readdir(cacheDir)) != nullptr) - { - if (strncmp(cacheEntry->d_name, "index", 5) == 0) - { - cpuCachePath[cpuCacheBasePathLength] = '\0'; - strcat(cpuCachePath, cacheEntry->d_name); - strcat(cpuCachePath, "/size"); - - int fd = open(cpuCachePath, O_RDONLY); - if (fd < 0) - { - success = false; - break; - } - - char cacheSizeStr[16]; - int bytesRead = read(fd, cacheSizeStr, sizeof(cacheSizeStr) - 1); - cacheSizeStr[bytesRead] = '\0'; - - // Parse the cache size that is formatted as a number followed by the K letter - char* lastChar; - int cacheSize = strtol(cacheSizeStr, &lastChar, 10) * 1024; - ASSERT(*lastChar == 'K'); - g_cbLargestOnDieCache = max(g_cbLargestOnDieCache, cacheSize); - - close(fd); - } - } + g_cbLargestOnDieCache = GetLogicalProcessorCacheSizeFromOS(); - closedir(cacheDir); - } - } - closedir(cpuDir); - } #elif HAVE_SYSCTL int64_t g_cbLargestOnDieCache; From 57a3c9cb11e12100f8d7ed55e0e24b24a7c0ac4c Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Mon, 27 Feb 2017 15:43:22 +0300 Subject: [PATCH 5/6] Additional to deleting /sys/devices/system/cpu/cache parsing --- src/Native/Runtime/unix/PalRedhawkUnix.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Native/Runtime/unix/PalRedhawkUnix.cpp b/src/Native/Runtime/unix/PalRedhawkUnix.cpp index f5d9f681bbf..22d59579f71 100644 --- a/src/Native/Runtime/unix/PalRedhawkUnix.cpp +++ b/src/Native/Runtime/unix/PalRedhawkUnix.cpp @@ -734,6 +734,11 @@ bool QueryCacheSize() #ifdef __linux__ g_cbLargestOnDieCache = GetLogicalProcessorCacheSizeFromOS(); +#ifndef _ARM_ + // TODO Some systems on arm does not give the info about cache sizes by this method so we need to find another way + if (g_cbLargestOnDieCache == 0) + success = false; +#endif #elif HAVE_SYSCTL @@ -760,11 +765,6 @@ bool QueryCacheSize() // TODO: implement adjusted cache size g_cbLargestOnDieCacheAdjusted = g_cbLargestOnDieCache; -#ifdef _ARM_ - // TODO Some system on arm32 does not give the info about cache sizes by these methods so we need to find another ways - success = true; -#endif - return success; } From 87f8c2ef73c36eedff4d4822715971ef9e9d74a0 Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Mon, 27 Feb 2017 16:34:37 +0300 Subject: [PATCH 6/6] Added empty version of InteropThunksHelpers for arm --- src/Native/Runtime/arm/InteropThunksHelpers.S | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/Native/Runtime/arm/InteropThunksHelpers.S diff --git a/src/Native/Runtime/arm/InteropThunksHelpers.S b/src/Native/Runtime/arm/InteropThunksHelpers.S new file mode 100644 index 00000000000..109718d38ba --- /dev/null +++ b/src/Native/Runtime/arm/InteropThunksHelpers.S @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#include + +.syntax unified +.thumb + +// TODO: Implement Arm support + +// +// InteropNative_CommonStub +// +NESTED_ENTRY InteropNative_CommonStub, _TEXT, NoHandler +#ifdef _DEBUG + bl C_FUNC(NYI_Assert) +#endif +NESTED_END InteropNative_CommonStub, _TEXT + +// +// IntPtr InteropNative_GetCommonStubAddress() +// +LEAF_ENTRY InteropNative_GetCommonStubAddress, _TEXT +#ifdef _DEBUG + bl C_FUNC(NYI_Assert) +#endif +LEAF_END InteropNative_GetCommonStubAddress, _TEXT + +// +// IntPtr InteropNative_GetCurrentThunkContext() +// +LEAF_ENTRY InteropNative_GetCurrentThunkContext, _TEXT +#ifdef _DEBUG + bl C_FUNC(NYI_Assert) +#endif +LEAF_END InteropNative_GetCurrentThunkContext, _TEXT