diff --git a/tests/src/JIT/MIPS64/shift01.cs b/tests/src/JIT/MIPS64/shift01.cs new file mode 100644 index 000000000000..ce987816df06 --- /dev/null +++ b/tests/src/JIT/MIPS64/shift01.cs @@ -0,0 +1,51 @@ +// 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. +// + +// Copyright (c) Loongson Technology. All rights reserved. +// + +using System; + +public class Test +{ + public static int Main() + { + int result = 0; + result += Test.AddKeyword("Session", (long)0x1 << 7); + result += Test.AddKeyword("Session", (long)0x1 << 8); + result += Test.AddKeyword("Session", (long)0x1 << 15); + result += Test.AddKeyword("Session", (long)0x1 << 16); + result += Test.AddKeyword("Session", (long)0x1 << 31); + result += Test.AddKeyword("Session", (long)0x1 << 32); + result += Test.AddKeyword("Session", (long)0x1 << 47); + result += Test.AddKeyword("Session", (long)0x1 << 48); + + if (result == 8) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + + public static int AddKeyword(string name, ulong value) + { + + if ((value & (value - 1)) != 0) + { + return 0; + } + else + { + return 1; + } + } + +} + diff --git a/tests/src/JIT/MIPS64/shift01.csproj b/tests/src/JIT/MIPS64/shift01.csproj new file mode 100644 index 000000000000..aede747262bd --- /dev/null +++ b/tests/src/JIT/MIPS64/shift01.csproj @@ -0,0 +1,36 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {B9C2A1E8-B95E-4765-B27D-F127A8E9D6C6} + Exe + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + ..\..\ + + + + + + + + + False + + + + PdbOnly + + + + + + + + + + + diff --git a/tests/src/JIT/MIPS64/uint01.cs b/tests/src/JIT/MIPS64/uint01.cs new file mode 100644 index 000000000000..d2b973960efe --- /dev/null +++ b/tests/src/JIT/MIPS64/uint01.cs @@ -0,0 +1,30 @@ +// 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. +// + +// Copyright (c) Loongson Technology. All rights reserved. +// + +using System; + +public class Test +{ + public static int Main() + { + uint value = 0xF0000000; + + if (value < 0xFFFFFFFF) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} + diff --git a/tests/src/JIT/MIPS64/uint01.csproj b/tests/src/JIT/MIPS64/uint01.csproj new file mode 100644 index 000000000000..af5b6ae4cd4c --- /dev/null +++ b/tests/src/JIT/MIPS64/uint01.csproj @@ -0,0 +1,36 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {B9C2A1E8-B95E-4765-B27D-F127A8E9D6C6} + Exe + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + ..\..\ + + + + + + + + + False + + + + PdbOnly + + + + + + + + + + +