From 0e3ecf115370bd27163ce525644b78910ba0f102 Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Thu, 8 Feb 2018 12:26:47 -0500 Subject: [PATCH] Improve diagnostics --- tests/src/JIT/HardwareIntrinsics/Arm64/Simd.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/src/JIT/HardwareIntrinsics/Arm64/Simd.cs b/tests/src/JIT/HardwareIntrinsics/Arm64/Simd.cs index 20f8eb2..114c113 100644 --- a/tests/src/JIT/HardwareIntrinsics/Arm64/Simd.cs +++ b/tests/src/JIT/HardwareIntrinsics/Arm64/Simd.cs @@ -96,6 +96,21 @@ namespace Arm64intrisicsTest testBinOp(testCaseDescription, binOp, check); } + static void dumpVector(String name, TVectorType vector) + where TBaseType : struct, IComparable + where TVectorType : new() + { + var result = writeVector(vector); + + Console.Write(name); + Console.Write(" : { "); + for (int i = 0; i < result.Length; i++) + { + Console.Write($"{result[i]} "); + } + Console.WriteLine("}"); + } + static void testBinOp(String testCaseDescription, Func binOp, Func check) @@ -126,6 +141,9 @@ namespace Arm64intrisicsTest if(!failed) { Console.WriteLine($"testBinOp<{typeof(TBaseType).Name}, {typeof(TVectorType).Name} >{testCaseDescription}: Check Failed"); + dumpVector("vLeft", vLeft); + dumpVector("vRight", vRight); + dumpVector("vResult", vResult); } Console.WriteLine($"check({left[i]}, {right[i]}) : result[{i}] = {result[i]}, expected {expected}"); failed = true; -- 2.7.4