From baf3d3152668c79a00bcbf27407fcfe288aad58d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 7 Apr 2022 23:31:03 +0300 Subject: [PATCH] ws --- ir-test.php | 26 +++++++++++++------------- tests/x86_64/add_001.irt | 2 +- tests/x86_64/add_002.irt | 2 +- tests/x86_64/add_003.irt | 2 +- tests/x86_64/add_004.irt | 2 +- tests/x86_64/add_005.irt | 2 +- tests/x86_64/add_006.irt | 2 +- tests/x86_64/add_007.irt | 2 +- tests/x86_64/add_008.irt | 2 +- tests/x86_64/sub_001.irt | 2 +- tests/x86_64/sub_002.irt | 2 +- tests/x86_64/sub_003.irt | 2 +- tests/x86_64/sub_004.irt | 2 +- tests/x86_64/sub_005.irt | 2 +- tests/x86_64/sub_006.irt | 2 +- tests/x86_64/sub_007.irt | 2 +- tests/x86_64/sub_008.irt | 2 +- 17 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ir-test.php b/ir-test.php index 3e9db86..2477e9a 100644 --- a/ir-test.php +++ b/ir-test.php @@ -63,19 +63,19 @@ function run_test($test, $name, $code, $expect, $args) { } function find_tests_in_dir($dir, &$tests) { - $d = opendir($dir); - if ($d !== false) { - while (($name = readdir($d)) !== false) { - if ($name === '.' || $name === '..') continue; - $fn = "$dir/$name"; - if (is_dir($fn)) { - find_tests_in_dir($fn, $tests); - } else if (substr($name, -4) === '.irt') { - $tests[] = $fn; - } - } - closedir($d); - } + $d = opendir($dir); + if ($d !== false) { + while (($name = readdir($d)) !== false) { + if ($name === '.' || $name === '..') continue; + $fn = "$dir/$name"; + if (is_dir($fn)) { + find_tests_in_dir($fn, $tests); + } else if (substr($name, -4) === '.irt') { + $tests[] = $fn; + } + } + closedir($d); + } } function find_tests($dir) { diff --git a/tests/x86_64/add_001.irt b/tests/x86_64/add_001.irt index 60f9834..562b570 100644 --- a/tests/x86_64/add_001.irt +++ b/tests/x86_64/add_001.irt @@ -14,4 +14,4 @@ test: movl %esi, %eax addl %edi, %eax - retq + retq diff --git a/tests/x86_64/add_002.irt b/tests/x86_64/add_002.irt index 0d2a95f..7c410ea 100644 --- a/tests/x86_64/add_002.irt +++ b/tests/x86_64/add_002.irt @@ -14,4 +14,4 @@ test: movl %edi, %eax addl $0x11, %eax - retq + retq diff --git a/tests/x86_64/add_003.irt b/tests/x86_64/add_003.irt index e4f2daf..fed0621 100644 --- a/tests/x86_64/add_003.irt +++ b/tests/x86_64/add_003.irt @@ -14,4 +14,4 @@ test: movl %esi, %eax addl %edi, %eax - retq + retq diff --git a/tests/x86_64/add_004.irt b/tests/x86_64/add_004.irt index e7047a2..55e9d3d 100644 --- a/tests/x86_64/add_004.irt +++ b/tests/x86_64/add_004.irt @@ -14,4 +14,4 @@ test: movl %edi, %eax addl $0x11, %eax - retq + retq diff --git a/tests/x86_64/add_005.irt b/tests/x86_64/add_005.irt index e1b4db1..1a8bd77 100644 --- a/tests/x86_64/add_005.irt +++ b/tests/x86_64/add_005.irt @@ -13,4 +13,4 @@ --EXPECT-- test: addsd %xmm1, %xmm0 - retq + retq diff --git a/tests/x86_64/add_006.irt b/tests/x86_64/add_006.irt index 9225532..8a7fb0a 100644 --- a/tests/x86_64/add_006.irt +++ b/tests/x86_64/add_006.irt @@ -13,4 +13,4 @@ --EXPECT-- test: addsd %xmm1, %xmm0 - retq + retq diff --git a/tests/x86_64/add_007.irt b/tests/x86_64/add_007.irt index 51f041b..a01ad68 100644 --- a/tests/x86_64/add_007.irt +++ b/tests/x86_64/add_007.irt @@ -13,4 +13,4 @@ --EXPECT-- test: vaddsd %xmm0, %xmm1, %xmm0 - retq + retq diff --git a/tests/x86_64/add_008.irt b/tests/x86_64/add_008.irt index 9b2676c..07790b0 100644 --- a/tests/x86_64/add_008.irt +++ b/tests/x86_64/add_008.irt @@ -13,4 +13,4 @@ --EXPECT-- test: vaddsd %xmm0, %xmm1, %xmm0 - retq + retq diff --git a/tests/x86_64/sub_001.irt b/tests/x86_64/sub_001.irt index f159dce..1352cad 100644 --- a/tests/x86_64/sub_001.irt +++ b/tests/x86_64/sub_001.irt @@ -14,4 +14,4 @@ test: movl %edi, %eax subl %esi, %eax - retq + retq diff --git a/tests/x86_64/sub_002.irt b/tests/x86_64/sub_002.irt index 353df1b..7efffc4 100644 --- a/tests/x86_64/sub_002.irt +++ b/tests/x86_64/sub_002.irt @@ -14,4 +14,4 @@ test: movl %edi, %eax subl $0x11, %eax - retq + retq diff --git a/tests/x86_64/sub_003.irt b/tests/x86_64/sub_003.irt index 13bc659..234d051 100644 --- a/tests/x86_64/sub_003.irt +++ b/tests/x86_64/sub_003.irt @@ -14,4 +14,4 @@ test: movl %esi, %eax subl %edi, %eax - retq + retq diff --git a/tests/x86_64/sub_004.irt b/tests/x86_64/sub_004.irt index 69c4e77..810ec41 100644 --- a/tests/x86_64/sub_004.irt +++ b/tests/x86_64/sub_004.irt @@ -14,4 +14,4 @@ test: movl $0x11, %eax subl %edi, %eax - retq + retq diff --git a/tests/x86_64/sub_005.irt b/tests/x86_64/sub_005.irt index f410c62..60f34fe 100644 --- a/tests/x86_64/sub_005.irt +++ b/tests/x86_64/sub_005.irt @@ -13,4 +13,4 @@ --EXPECT-- test: subsd %xmm1, %xmm0 - retq + retq diff --git a/tests/x86_64/sub_006.irt b/tests/x86_64/sub_006.irt index f5b06c8..756ffba 100644 --- a/tests/x86_64/sub_006.irt +++ b/tests/x86_64/sub_006.irt @@ -14,4 +14,4 @@ test: subsd %xmm0, %xmm1 movapd %xmm1, %xmm0 - retq + retq diff --git a/tests/x86_64/sub_007.irt b/tests/x86_64/sub_007.irt index 133ad6e..36ad987 100644 --- a/tests/x86_64/sub_007.irt +++ b/tests/x86_64/sub_007.irt @@ -13,4 +13,4 @@ --EXPECT-- test: vsubsd %xmm1, %xmm0, %xmm0 - retq + retq diff --git a/tests/x86_64/sub_008.irt b/tests/x86_64/sub_008.irt index 8bb4d19..77b53d1 100644 --- a/tests/x86_64/sub_008.irt +++ b/tests/x86_64/sub_008.irt @@ -13,4 +13,4 @@ --EXPECT-- test: vsubsd %xmm0, %xmm1, %xmm0 - retq + retq