diff options
author | Konstantin Baladurin <k.baladurin@partner.samsung.com> | 2018-05-03 22:57:26 +0300 |
---|---|---|
committer | 이형주/Tizen Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com> | 2018-07-06 09:22:08 +0900 |
commit | 085dc2aec408c22e48ec5fff46b42429accf8a6f (patch) | |
tree | 3bb6281936d819c06ed74bd6398fde8d406ef66b | |
parent | d1363fe34d1ae89b7ade1c6a142e2bcfcabc249d (diff) | |
download | coreclr-085dc2aec408c22e48ec5fff46b42429accf8a6f.tar.gz coreclr-085dc2aec408c22e48ec5fff46b42429accf8a6f.tar.bz2 coreclr-085dc2aec408c22e48ec5fff46b42429accf8a6f.zip |
[Linux/x86] Fix tests in case of 4-byte alignment for 64-bit types (#17829)
JIT/Directed/RVAInit/nested
JIT/Directed/RVAInit/simple
JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b103058/b103058
-rw-r--r-- | tests/src/JIT/Directed/RVAInit/nested.il | 4 | ||||
-rw-r--r-- | tests/src/JIT/Directed/RVAInit/simple.il | 3 | ||||
-rw-r--r-- | tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b103058/b103058.cs | 15 |
3 files changed, 17 insertions, 5 deletions
diff --git a/tests/src/JIT/Directed/RVAInit/nested.il b/tests/src/JIT/Directed/RVAInit/nested.il index fbe537ac2d..9b52721392 100644 --- a/tests/src/JIT/Directed/RVAInit/nested.il +++ b/tests/src/JIT/Directed/RVAInit/nested.il @@ -35,6 +35,7 @@ .field public int64 _long .field public unsigned int64 _ulong .field public float32 _float + .field public unsigned int32 _pad .field public float64 _double } // end of class Internal @@ -42,6 +43,7 @@ extends [mscorlib]System.ValueType { .field public unsigned int8 _byte + .field public unsigned int32 _pad .field public valuetype Internal intern .field public int8 _sbyte .field public int16 _short @@ -251,4 +253,4 @@ 66 45 13 02 66 45 13 02 66 45 13 02 00 00 00 00 66 45 13 02 00 00 00 00 83 00 8C 42 00 00 00 00 E3 A5 9B C4 20 00 54 40 6F 00 39 30 22 C8 00 00 - )
\ No newline at end of file + ) diff --git a/tests/src/JIT/Directed/RVAInit/simple.il b/tests/src/JIT/Directed/RVAInit/simple.il index 83b5490744..f35856fa6b 100644 --- a/tests/src/JIT/Directed/RVAInit/simple.il +++ b/tests/src/JIT/Directed/RVAInit/simple.il @@ -24,6 +24,7 @@ .field public int64 _long .field public unsigned int64 _ulong .field public float32 _float + .field public unsigned int32 _pad .field public float64 _double .field public static valuetype Test static_test at D_1 .method private hidebysig static char hex(unsigned int8 v) cil managed @@ -235,4 +236,4 @@ .data D_1 = bytearray( DE 6F 39 30 22 C8 00 00 66 45 13 02 66 45 13 02 66 45 13 02 00 00 00 00 66 45 13 02 00 00 00 00 83 00 8C 42 00 00 00 00 E3 A5 9B C4 20 00 54 40 - )
\ No newline at end of file + ) diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b103058/b103058.cs b/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b103058/b103058.cs index 0d56c46ccc..c9639cc96e 100644 --- a/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b103058/b103058.cs +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b103058/b103058.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Runtime.InteropServices; internal struct VT { @@ -20,13 +21,21 @@ internal unsafe class test private static unsafe bool CheckDoubleAlignment1(VT* p) { Console.WriteLine("Address {0}", (IntPtr)p); - if ((int)(long)p % sizeof(double) != 0) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || (RuntimeInformation.ProcessArchitecture != Architecture.X86)) { - Console.WriteLine("not double aligned"); - return false; + if ((int)(long)p % sizeof(double) != 0) + { + Console.WriteLine("not double aligned"); + return false; + } + else + { + return true; + } } else { + // Current JIT implementation doesn't use double alignment stack optimization for Linux/x86 return true; } } |