Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Bred <bredpetr@gmail.com>2017-06-22 17:31:14 +0300
committerJan Kotas <jkotas@microsoft.com>2017-06-22 17:31:14 +0300
commit9660ccd8800ffafd960e87b4e48f8154a8e11282 (patch)
tree0ea129ac4614a81972e535ec8132f51aabe8b457
parentcd2c26981a64d8695e0cff26bea3b8ccbd312e67 (diff)
Add more informative logs for arm (#3949)
Signed-off-by: Petr Bred <bredpetr@gmail.com>
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMDebug.cs32
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunGenericHelperNode.cs4
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunHelperNode.cs22
-rw-r--r--src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj1
-rw-r--r--src/Native/Runtime/arm/AllocFast.S38
-rw-r--r--src/Native/Runtime/arm/CallDescrWorker.S17
-rw-r--r--src/Native/Runtime/arm/ExceptionHandling.S29
-rw-r--r--src/Native/Runtime/arm/InteropThunksHelpers.S20
-rw-r--r--src/Native/Runtime/arm/PInvoke.S17
-rw-r--r--src/Native/Runtime/arm/UniversalTransition.S23
-rw-r--r--src/Native/Runtime/rhassert.cpp7
-rw-r--r--src/Native/Runtime/unix/PalRedhawkInline.h2
-rw-r--r--src/Native/Runtime/unix/unixasmmacrosarm.inc9
-rw-r--r--src/System.Private.Jit/src/Internal/Runtime/JitSupport/JitNodeFactory.cs1
-rw-r--r--src/System.Private.Jit/src/System.Private.Jit.csproj1
15 files changed, 181 insertions, 42 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMDebug.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMDebug.cs
new file mode 100644
index 000000000..0a1cd0639
--- /dev/null
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMDebug.cs
@@ -0,0 +1,32 @@
+// 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.
+
+using System;
+using ILCompiler.DependencyAnalysis.ARM;
+
+namespace ILCompiler.DependencyAnalysis
+{
+ public static class ARMDebug
+ {
+ public static void EmitNYIAssert(NodeFactory factory, ref ARMEmitter encoder, string message,
+ [System.Runtime.CompilerServices.CallerFilePath] string sourceFilePath = null,
+ [System.Runtime.CompilerServices.CallerMemberName] string memberName = null,
+ [System.Runtime.CompilerServices.CallerLineNumber] int sourceLineNumber = 0)
+ {
+ ISymbolNode NYI_Assert = factory.ExternSymbol("NYI_Assert");
+ String CallInfoPrefix = " " + sourceFilePath + "(" + sourceLineNumber.ToString() + "): method " + memberName + ": ";
+ ISymbolNode messageSymbol = factory.ConstantUtf8String(CallInfoPrefix + message);
+ encoder.EmitMOV(encoder.TargetRegister.Arg0, messageSymbol);
+ encoder.EmitJMP(NYI_Assert);
+ }
+
+ public static void EmitHelperNYIAssert(NodeFactory factory, ref ARMEmitter encoder, ReadyToRunHelperId hId,
+ [System.Runtime.CompilerServices.CallerFilePath] string sourceFilePath = null,
+ [System.Runtime.CompilerServices.CallerMemberName] string memberName = null,
+ [System.Runtime.CompilerServices.CallerLineNumber] int sourceLineNumber = 0)
+ {
+ EmitNYIAssert(factory, ref encoder, hId.ToString() + " is not implemented", sourceFilePath, memberName, sourceLineNumber);
+ }
+ }
+}
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunGenericHelperNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunGenericHelperNode.cs
index 68e8862d1..4f51d1d82 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunGenericHelperNode.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunGenericHelperNode.cs
@@ -13,10 +13,10 @@ using Debug = System.Diagnostics.Debug;
namespace ILCompiler.DependencyAnalysis
{
partial class ReadyToRunGenericHelperNode
- {
+ {
protected sealed override void EmitCode(NodeFactory factory, ref ARMEmitter encoder, bool relocsOnly)
{
- encoder.EmitJMP(factory.ExternSymbol("NYI_Assert"));
+ ARMDebug.EmitNYIAssert(factory, ref encoder, "EmitCode is not implemented");
}
}
}
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 f8159da29..c19fc7b10 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunHelperNode.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunHelperNode.cs
@@ -18,77 +18,75 @@ namespace ILCompiler.DependencyAnalysis
{
protected override void EmitCode(NodeFactory factory, ref ARMEmitter encoder, bool relocsOnly)
{
- ISymbolNode NYI_Assert = factory.ExternSymbol("NYI_Assert");
-
switch (Id)
{
case ReadyToRunHelperId.NewHelper:
{
TypeDesc target = (TypeDesc)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.NewHelper);
}
break;
case ReadyToRunHelperId.VirtualCall:
{
MethodDesc targetMethod = (MethodDesc)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.VirtualCall);
}
break;
case ReadyToRunHelperId.IsInstanceOf:
{
TypeDesc target = (TypeDesc)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.IsInstanceOf);
}
break;
case ReadyToRunHelperId.CastClass:
{
TypeDesc target = (TypeDesc)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.CastClass);
}
break;
case ReadyToRunHelperId.NewArr1:
{
TypeDesc target = (TypeDesc)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.NewArr1);
}
break;
case ReadyToRunHelperId.GetNonGCStaticBase:
{
MetadataType target = (MetadataType)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.GetNonGCStaticBase);
}
break;
case ReadyToRunHelperId.GetThreadStaticBase:
{
MetadataType target = (MetadataType)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.GetThreadStaticBase);
}
break;
case ReadyToRunHelperId.GetGCStaticBase:
{
MetadataType target = (MetadataType)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.GetGCStaticBase);
}
break;
case ReadyToRunHelperId.DelegateCtor:
{
DelegateCreationInfo target = (DelegateCreationInfo)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.DelegateCtor);
}
break;
case ReadyToRunHelperId.ResolveVirtualFunction:
{
MethodDesc targetMethod = (MethodDesc)Target;
- encoder.EmitJMP(NYI_Assert);
+ ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.ResolveVirtualFunction);
}
break;
diff --git a/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj b/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj
index 64116506b..98dca3d11 100644
--- a/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj
+++ b/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj
@@ -278,6 +278,7 @@
<Compile Include="Compiler\DependencyAnalysis\Target_ARM\ARMJumpStubNode.cs" />
<Compile Include="Compiler\DependencyAnalysis\Target_ARM\ARMReadyToRunHelperNode.cs" />
<Compile Include="Compiler\DependencyAnalysis\Target_ARM\ARMReadyToRunGenericHelperNode.cs" />
+ <Compile Include="Compiler\DependencyAnalysis\Target_ARM\ARMDebug.cs" />
<Compile Include="Compiler\ExportedMethodsRootProvider.cs" />
<Compile Include="Compiler\IRootingServiceProvider.cs" />
<Compile Include="Compiler\JitHelper.cs" />
diff --git a/src/Native/Runtime/arm/AllocFast.S b/src/Native/Runtime/arm/AllocFast.S
index e24c65785..90104ab60 100644
--- a/src/Native/Runtime/arm/AllocFast.S
+++ b/src/Native/Runtime/arm/AllocFast.S
@@ -7,6 +7,26 @@
.syntax unified
.thumb
+#ifdef _DEBUG
+.rodata
+AssertMsg: .asciz "__FILE__:%s: %s is not implemented\n"
+FileName: .asciz "AllocFast.S"
+RhpNewFastName: .asciz "RhpNewFast"
+RhpNewFinalizableName: .asciz "RhpNewFinalizable"
+RhpNewObjectName: .asciz "RhpNewObject"
+RhpNewArrayName: .asciz "RhpNewArray"
+RhpNewArrayRareName: .asciz "RhpNewArrayRare"
+RhpNewFastAlign8Name: .asciz "RhpNewFastAlign8"
+RhpNewFinalizableAlign8Name: .asciz "RhpNewFinalizableAlign8"
+RhpNewFastMisalignName: .asciz "RhpNewFastMisalign"
+RhpNewArrayAlign8Name: .asciz "RhpNewArrayAlign8"
+
+.text
+.macro GEN_ASSERT_FUNC func
+ GEN_ASSERT AssertMsg, FileName, \func
+.endm
+#endif
+
// TODO: Implement Arm support
// Allocate non-array, non-finalizable object. If the allocation doesn't fit into the current thread's
@@ -14,7 +34,7 @@
// r0 == EEType
LEAF_ENTRY RhpNewFast, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpNewFastName
#endif
LEAF_END RhpNewFast, _TEXT
@@ -22,7 +42,7 @@
// r0 == EEType
LEAF_ENTRY RhpNewFinalizable, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpNewFinalizableName
#endif
LEAF_END RhpNewFinalizable, _TEXT
@@ -31,7 +51,7 @@
// r1 == alloc flags
NESTED_ENTRY RhpNewObject, _TEXT, NoHandler
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpNewObjectName
#endif
NESTED_END RhpNewObject, _TEXT
@@ -40,7 +60,7 @@
// r1 == element count
LEAF_ENTRY RhpNewArray, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpNewArrayName
#endif
LEAF_END RhpNewArray, _TEXT
@@ -51,7 +71,7 @@
// r3 == Thread
NESTED_ENTRY RhpNewArrayRare, _TEXT, NoHandler
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpNewArrayRareName
#endif
NESTED_END RhpNewArrayRare, _TEXT
@@ -59,7 +79,7 @@
// r0 == EEType
LEAF_ENTRY RhpNewFastAlign8, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpNewFastAlign8Name
#endif
LEAF_END RhpNewFastAlign8, _TEXT
@@ -67,7 +87,7 @@
// r0 == EEType
LEAF_ENTRY RhpNewFinalizableAlign8, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpNewFinalizableAlign8Name
#endif
LEAF_END RhpNewFinalizableAlign8, _TEXT
@@ -76,7 +96,7 @@
// r0 == EEType
LEAF_ENTRY RhpNewFastMisalign, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpNewFastMisalignName
#endif
LEAF_END RhpNewFastMisalign, _TEXT
@@ -85,6 +105,6 @@
// r1 == element count
NESTED_ENTRY RhpNewArrayAlign8, _TEXT, NoHandler
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpNewArrayAlign8Name
#endif
NESTED_END RhpNewArrayAlign8, _TEXT
diff --git a/src/Native/Runtime/arm/CallDescrWorker.S b/src/Native/Runtime/arm/CallDescrWorker.S
index 77017f4f8..26768253d 100644
--- a/src/Native/Runtime/arm/CallDescrWorker.S
+++ b/src/Native/Runtime/arm/CallDescrWorker.S
@@ -7,6 +7,19 @@
.syntax unified
.thumb
+#ifdef _DEBUG
+.rodata
+AssertMsg: .asciz "__FILE__:%s: %s is not implemented\n"
+FileName: .asciz "CallDescrWorker.S"
+RhCallDescrWorkerName: .asciz "RhCallDescrWorker"
+PointerToReturnFromCallDescrThunkName: .asciz "PointerToReturnFromCallDescrThunk"
+
+.text
+.macro GEN_ASSERT_FUNC func
+ GEN_ASSERT AssertMsg, FileName, \func
+.endm
+#endif
+
// TODO: Implement Arm support
NESTED_ENTRY RhCallDescrWorker, _TEXT, NoHandler
@@ -15,7 +28,7 @@ LOCAL_LABEL(ReturnFromCallDescrThunk):
// UNIXTODO: Implement this function
// int 3
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhCallDescrWorkerName
#endif
NESTED_END RhCallDescrWorker, _TEXT
@@ -27,6 +40,6 @@ NESTED_END RhCallDescrWorker, _TEXT
LEAF_ENTRY PointerToReturnFromCallDescrThunk, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC PointerToReturnFromCallDescrThunk
#endif
LEAF_END PointerToReturnFromCallDescrThunk, _TEXT
diff --git a/src/Native/Runtime/arm/ExceptionHandling.S b/src/Native/Runtime/arm/ExceptionHandling.S
index 88894270c..813d4ac5e 100644
--- a/src/Native/Runtime/arm/ExceptionHandling.S
+++ b/src/Native/Runtime/arm/ExceptionHandling.S
@@ -7,6 +7,23 @@
.syntax unified
.thumb
+#ifdef _DEBUG
+.rodata
+AssertMsg: .asciz "__FILE__:%s: %s is not implemented\n"
+FileName: .asciz "ExceptionHandling.S"
+RhpThrowHwExName: .asciz "RhpThrowHwEx"
+RhpThrowExName: .asciz "RhpThrowEx"
+RhpRethrowName: .asciz "RhpRethrow"
+RhpCallCatchFuncletName: .asciz "RhpCallCatchFunclet"
+RhpCallFinallyFuncletName: .asciz "RhpCallFinallyFunclet"
+RhpCallFilterFuncletName: .asciz "RhpCallFilterFunclet"
+
+.text
+.macro GEN_ASSERT_FUNC func
+ GEN_ASSERT AssertMsg, FileName, \func
+.endm
+#endif
+
// TODO: Implement Arm support
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -24,7 +41,7 @@ NESTED_ENTRY RhpThrowHwEx, _TEXT, NoHandler
ALTERNATE_ENTRY RhpThrowHwEx2
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpThrowHwExName
#endif
EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowHwEx2
@@ -49,7 +66,7 @@ NESTED_ENTRY RhpThrowEx, _TEXT, NoHandler
ALTERNATE_ENTRY RhpThrowEx2
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpThrowExName
#endif
EXPORT_POINTER_TO_ADDRESS PointerToRhpThrowEx2
@@ -76,7 +93,7 @@ NESTED_ENTRY RhpRethrow, _TEXT, NoHandler
ALTERNATE_ENTRY RhpRethrow2
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpRethrowName
#endif
EXPORT_POINTER_TO_ADDRESS PointerToRhpRethrow2
@@ -114,7 +131,7 @@ ALTERNATE_ENTRY RhpCallCatchFunclet2
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpCallCatchFuncletName
#endif
EXPORT_POINTER_TO_ADDRESS PointerToRhpCallCatchFunclet2
@@ -136,7 +153,7 @@ NESTED_ENTRY RhpCallFinallyFunclet, _TEXT, NoHandler
ALTERNATE_ENTRY RhpCallFinallyFunclet2
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpCallFinallyFuncletName
#endif
EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFinallyFunclet2
@@ -159,7 +176,7 @@ NESTED_ENTRY RhpCallFilterFunclet, _TEXT, NoHandler
ALTERNATE_ENTRY RhpCallFilterFunclet2
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpCallFilterFuncletName
#endif
EXPORT_POINTER_TO_ADDRESS PointerToRhpCallFilterFunclet2
diff --git a/src/Native/Runtime/arm/InteropThunksHelpers.S b/src/Native/Runtime/arm/InteropThunksHelpers.S
index 15749ba55..4fdcdddb9 100644
--- a/src/Native/Runtime/arm/InteropThunksHelpers.S
+++ b/src/Native/Runtime/arm/InteropThunksHelpers.S
@@ -7,6 +7,20 @@
.syntax unified
.thumb
+#ifdef _DEBUG
+.rodata
+AssertMsg: .asciz "__FILE__:%s: %s is not implemented\n"
+FileName: .asciz "InteropThunksHelpers.S"
+RhCommonStubName: .asciz "RhCommonStub"
+RhGetCommonStubAddressName: .asciz "RhGetCommonStubAddress"
+RhGetCurrentThunkContextName: .asciz "RhGetCurrentThunkContext"
+
+.text
+.macro GEN_ASSERT_FUNC func
+ GEN_ASSERT AssertMsg, FileName, \func
+.endm
+#endif
+
// TODO: Implement Arm support
//
@@ -14,7 +28,7 @@
//
NESTED_ENTRY RhCommonStub, _TEXT, NoHandler
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhCommonStubName
#endif
NESTED_END RhCommonStub, _TEXT
@@ -23,7 +37,7 @@ NESTED_END RhCommonStub, _TEXT
//
LEAF_ENTRY RhGetCommonStubAddress, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhGetCommonStubAddressName
#endif
LEAF_END RhGetCommonStubAddress, _TEXT
@@ -32,6 +46,6 @@ LEAF_END RhGetCommonStubAddress, _TEXT
//
LEAF_ENTRY RhGetCurrentThunkContext, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhGetCurrentThunkContextName
#endif
LEAF_END RhGetCurrentThunkContext, _TEXT
diff --git a/src/Native/Runtime/arm/PInvoke.S b/src/Native/Runtime/arm/PInvoke.S
index 3407952e3..df6e3ba59 100644
--- a/src/Native/Runtime/arm/PInvoke.S
+++ b/src/Native/Runtime/arm/PInvoke.S
@@ -7,6 +7,19 @@
.syntax unified
.thumb
+#ifdef _DEBUG
+.rodata
+AssertMsg: .asciz "__FILE__:%s: %s is not implemented\n"
+FileName: .asciz "PInvoke.S"
+RhpPInvokeName: .asciz "RhpPInvoke"
+RhpPInvokeReturnName: .asciz "RhpPInvokeReturn"
+
+.text
+.macro GEN_ASSERT_FUNC func
+ GEN_ASSERT AssertMsg, FileName, \func
+.endm
+#endif
+
// TODO: Implement Arm support
//
@@ -14,7 +27,7 @@
//
NESTED_ENTRY RhpPInvoke, _TEXT, NoHandler
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpPInvokeName
#endif
NESTED_END RhpPInvoke, _TEXT
@@ -23,6 +36,6 @@ NESTED_END RhpPInvoke, _TEXT
//
LEAF_ENTRY RhpPInvokeReturn, _TEXT
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpPInvokeReturnName
#endif
LEAF_END RhpPInvokeReturn, _TEXT
diff --git a/src/Native/Runtime/arm/UniversalTransition.S b/src/Native/Runtime/arm/UniversalTransition.S
index feaace2eb..9de96abe2 100644
--- a/src/Native/Runtime/arm/UniversalTransition.S
+++ b/src/Native/Runtime/arm/UniversalTransition.S
@@ -7,6 +7,21 @@
.syntax unified
.thumb
+#ifdef _DEBUG
+.rodata
+AssertMsg: .asciz "__FILE__:%s: %s is not implemented\n"
+FileName: .asciz "UniversalTransition.S"
+RhpUniversalTransitionName: .asciz "RhpUniversalTransition"
+PointerToReturnFromUniversalTransitionName: .asciz "PointerToReturnFromUniversalTransition"
+RhpUniversalTransition_DebugStepTailCallName: .asciz "RhpUniversalTransition_DebugStepTailCall"
+PointerToReturnFromUniversalTransition_DebugStepTailCallName: .asciz "PointerToReturnFromUniversalTransition_DebugStepTailCall"
+
+.text
+.macro GEN_ASSERT_FUNC func
+ GEN_ASSERT AssertMsg, FileName, \func
+.endm
+#endif
+
// TODO: Implement Arm support
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -54,7 +69,7 @@ NESTED_ENTRY RhpUniversalTransition, _TEXT, NoHandler
LOCAL_LABEL(ReturnFromUniversalTransition):
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpUniversalTransitionName
#endif
NESTED_END RhpUniversalTransition
@@ -62,7 +77,7 @@ NESTED_END RhpUniversalTransition
NESTED_ENTRY PointerToReturnFromUniversalTransition, _TEXT, NoHandler
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC PointerToReturnFromUniversalTransitionName
#endif
NESTED_END PointerToReturnFromUniversalTransition
@@ -73,7 +88,7 @@ NESTED_ENTRY RhpUniversalTransition_DebugStepTailCall, _TEXT, NoHandler
LOCAL_LABEL(ReturnFromUniversalTransition_DebugStepTailCall):
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC RhpUniversalTransition_DebugStepTailCallName
#endif
NESTED_END RhpUniversalTransition_DebugStepTailCall
@@ -81,7 +96,7 @@ NESTED_END RhpUniversalTransition_DebugStepTailCall
NESTED_ENTRY PointerToReturnFromUniversalTransition_DebugStepTailCall, _TEXT, NoHandler
#ifdef _DEBUG
- bl C_FUNC(NYI_Assert)
+ GEN_ASSERT_FUNC PointerToReturnFromUniversalTransition_DebugStepTailCallName
#endif
NESTED_END PointerToReturnFromUniversalTransition_DebugStepTailCall
diff --git a/src/Native/Runtime/rhassert.cpp b/src/Native/Runtime/rhassert.cpp
index 04fa1ac97..1290b88d0 100644
--- a/src/Native/Runtime/rhassert.cpp
+++ b/src/Native/Runtime/rhassert.cpp
@@ -95,10 +95,15 @@ void Assert(const char * expr, const char * file, UInt32 line_num, const char *
#endif //!DACCESS_COMPILE
}
-extern "C" void NYI_Assert()
+extern "C" void NYI_Assert(const char *message, ...)
{
#if !defined(DACCESS_COMPILE)
+ va_list args;
+ va_start(args, message);
+ vprintf(message, args);
+ va_end(args);
ASSERT_UNCONDITIONALLY("NYI");
#endif
}
+
#endif // _DEBUG
diff --git a/src/Native/Runtime/unix/PalRedhawkInline.h b/src/Native/Runtime/unix/PalRedhawkInline.h
index 2700a8734..e46d9ce87 100644
--- a/src/Native/Runtime/unix/PalRedhawkInline.h
+++ b/src/Native/Runtime/unix/PalRedhawkInline.h
@@ -90,7 +90,7 @@ FORCEINLINE void PalMemoryBarrier()
__sync_synchronize();
}
-#define PalDebugBreak() __builtin_trap()
+#define PalDebugBreak() abort()
FORCEINLINE Int32 PalGetLastError()
{
diff --git a/src/Native/Runtime/unix/unixasmmacrosarm.inc b/src/Native/Runtime/unix/unixasmmacrosarm.inc
index 01015431b..01b20bc2f 100644
--- a/src/Native/Runtime/unix/unixasmmacrosarm.inc
+++ b/src/Native/Runtime/unix/unixasmmacrosarm.inc
@@ -161,3 +161,12 @@ C_FUNC(\Name):
.text
.endm
+
+#ifdef _DEBUG
+.macro GEN_ASSERT message, fileName, funcName
+ ldr r0, =\message
+ ldr r1, =\fileName
+ ldr r2, =\funcName
+ bl C_FUNC(NYI_Assert)
+.endm
+#endif
diff --git a/src/System.Private.Jit/src/Internal/Runtime/JitSupport/JitNodeFactory.cs b/src/System.Private.Jit/src/Internal/Runtime/JitSupport/JitNodeFactory.cs
index 01615055d..989efecdf 100644
--- a/src/System.Private.Jit/src/Internal/Runtime/JitSupport/JitNodeFactory.cs
+++ b/src/System.Private.Jit/src/Internal/Runtime/JitSupport/JitNodeFactory.cs
@@ -111,6 +111,7 @@ namespace ILCompiler.DependencyAnalysis
public IMethodNode ShadowConcreteMethod(MethodDesc method, bool isUnboxingStub = false) { throw new NotImplementedException(); }
internal IMethodNode StringAllocator(MethodDesc stringConstructor) { throw new NotImplementedException(); }
public ISymbolNode ExternSymbol(string name) { throw new NotImplementedException(); }
+ public ISymbolNode ConstantUtf8String(string str) { throw new NotImplementedException(); }
public IEETypeNode NecessaryTypeSymbol(TypeDesc type) { return ConstructedTypeSymbol(type); }
internal JitInterfaceDispatchCellNode InterfaceDispatchCell(MethodDesc method) { throw new NotImplementedException(); }
public ISymbolNode RuntimeMethodHandle(MethodDesc method) { throw new NotImplementedException(); }
diff --git a/src/System.Private.Jit/src/System.Private.Jit.csproj b/src/System.Private.Jit/src/System.Private.Jit.csproj
index 656cfd209..20b57f47d 100644
--- a/src/System.Private.Jit/src/System.Private.Jit.csproj
+++ b/src/System.Private.Jit/src/System.Private.Jit.csproj
@@ -104,6 +104,7 @@
<Compile Include="$(ILCompilerBasePath)\Compiler\DependencyAnalysis\Target_ARM\ARMEmitter.cs" />
<Compile Include="$(ILCompilerBasePath)\Compiler\DependencyAnalysis\Target_ARM\Register.cs" />
<Compile Include="$(ILCompilerBasePath)\Compiler\DependencyAnalysis\Target_ARM\ARMReadyToRunHelperNode.cs" />
+ <Compile Include="$(ILCompilerBasePath)\Compiler\DependencyAnalysis\Target_ARM\ARMDebug.cs" />
<Compile Include="$(ILCompilerBasePath)\Compiler\DependencyAnalysis\AssemblyStubNode.cs" />
<Compile Include="$(ILCompilerBasePath)\Compiler\DependencyAnalysis\HelperEntrypoint.cs" />
<Compile Include="$(ILCompilerBasePath)\Compiler\DependencyAnalysis\INodeWithDebugInfo.cs" />