diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2014-12-16 10:26:00 +0100 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2014-12-16 10:26:00 +0100 |
commit | f20536724d4cc8432d5b804082415c8391f88f9b (patch) | |
tree | 170a405bc9244e0ec5464e9e6b3eb50dcafa895c /ref_vqshl.c | |
parent | 464d02e432a0fe5fb0afec8459631b4467b706f3 (diff) | |
download | platform_external_arm-neon-tests-f20536724d4cc8432d5b804082415c8391f88f9b.tar.gz platform_external_arm-neon-tests-f20536724d4cc8432d5b804082415c8391f88f9b.tar.bz2 platform_external_arm-neon-tests-f20536724d4cc8432d5b804082415c8391f88f9b.zip |
Rename helper macros:
TEST_VLOAD into VLOAD
TEST_VDUP into VDUP
Diffstat (limited to 'ref_vqshl.c')
-rw-r--r-- | ref_vqshl.c | 186 |
1 files changed, 93 insertions, 93 deletions
diff --git a/ref_vqshl.c b/ref_vqshl.c index 203b837..84ca9a0 100644 --- a/ref_vqshl.c +++ b/ref_vqshl.c @@ -68,49 +68,49 @@ FNNAME (INSN) clean_results (); /* Fill input vector with 0, to check saturation on limits */ - TEST_VDUP(vector, , int, s, 8, 8, 0); - TEST_VDUP(vector, , int, s, 16, 4, 0); - TEST_VDUP(vector, , int, s, 32, 2, 0); - TEST_VDUP(vector, , int, s, 64, 1, 0); - TEST_VDUP(vector, , uint, u, 8, 8, 0); - TEST_VDUP(vector, , uint, u, 16, 4, 0); - TEST_VDUP(vector, , uint, u, 32, 2, 0); - TEST_VDUP(vector, , uint, u, 64, 1, 0); - TEST_VDUP(vector, q, int, s, 8, 16, 0); - TEST_VDUP(vector, q, int, s, 16, 8, 0); - TEST_VDUP(vector, q, int, s, 32, 4, 0); - TEST_VDUP(vector, q, int, s, 64, 2, 0); - TEST_VDUP(vector, q, uint, u, 8, 16, 0); - TEST_VDUP(vector, q, uint, u, 16, 8, 0); - TEST_VDUP(vector, q, uint, u, 32, 4, 0); - TEST_VDUP(vector, q, uint, u, 64, 2, 0); + VDUP(vector, , int, s, 8, 8, 0); + VDUP(vector, , int, s, 16, 4, 0); + VDUP(vector, , int, s, 32, 2, 0); + VDUP(vector, , int, s, 64, 1, 0); + VDUP(vector, , uint, u, 8, 8, 0); + VDUP(vector, , uint, u, 16, 4, 0); + VDUP(vector, , uint, u, 32, 2, 0); + VDUP(vector, , uint, u, 64, 1, 0); + VDUP(vector, q, int, s, 8, 16, 0); + VDUP(vector, q, int, s, 16, 8, 0); + VDUP(vector, q, int, s, 32, 4, 0); + VDUP(vector, q, int, s, 64, 2, 0); + VDUP(vector, q, uint, u, 8, 16, 0); + VDUP(vector, q, uint, u, 16, 8, 0); + VDUP(vector, q, uint, u, 32, 4, 0); + VDUP(vector, q, uint, u, 64, 2, 0); /* Choose init value arbitrarily, will be used as shift amount */ /* Use values equal or one-less-than the type width to check behaviour on limits */ /* Shift all lanes by 7 ... */ - TEST_VDUP(vector_shift, , int, s, 8, 8, 7); + VDUP(vector_shift, , int, s, 8, 8, 7); /* except: lane 0 (by 6), lane 1 (by 8) and lane 2 (by 9) */ TEST_VSET_LANE(vector_shift, , int, s, 8, 8, 0, 6); TEST_VSET_LANE(vector_shift, , int, s, 8, 8, 1, 8); TEST_VSET_LANE(vector_shift, , int, s, 8, 8, 2, 9); - TEST_VDUP(vector_shift, , int, s, 16, 4, 15); + VDUP(vector_shift, , int, s, 16, 4, 15); TEST_VSET_LANE(vector_shift, , int, s, 16, 4, 0, 14); TEST_VSET_LANE(vector_shift, , int, s, 16, 4, 1, 16); TEST_VSET_LANE(vector_shift, , int, s, 16, 4, 2, 17); - TEST_VDUP(vector_shift, , int, s, 32, 2, 31); + VDUP(vector_shift, , int, s, 32, 2, 31); TEST_VSET_LANE(vector_shift, , int, s, 32, 2, 1, 30); - TEST_VDUP(vector_shift, , int, s, 64, 1, 63); + VDUP(vector_shift, , int, s, 64, 1, 63); - TEST_VDUP(vector_shift, q, int, s, 8, 16, 8); - TEST_VDUP(vector_shift, q, int, s, 16, 8, 16); - TEST_VDUP(vector_shift, q, int, s, 32, 4, 32); + VDUP(vector_shift, q, int, s, 8, 16, 8); + VDUP(vector_shift, q, int, s, 16, 8, 16); + VDUP(vector_shift, q, int, s, 32, 4, 32); TEST_VSET_LANE(vector_shift, q, int, s, 32, 4, 1, 33); - TEST_VDUP(vector_shift, q, int, s, 64, 2, 64); + VDUP(vector_shift, q, int, s, 64, 2, 64); TEST_VSET_LANE(vector_shift, q, int, s, 64, 2, 1, 62); fprintf(ref_file, "\n%s cumulative saturation output:\n", @@ -120,14 +120,14 @@ FNNAME (INSN) /* Use negative shift amounts */ - TEST_VDUP(vector_shift, , int, s, 8, 8, -1); - TEST_VDUP(vector_shift, , int, s, 16, 4, -2); - TEST_VDUP(vector_shift, , int, s, 32, 2, -3); - TEST_VDUP(vector_shift, , int, s, 64, 1, -4); - TEST_VDUP(vector_shift, q, int, s, 8, 16, -7); - TEST_VDUP(vector_shift, q, int, s, 16, 8, -11); - TEST_VDUP(vector_shift, q, int, s, 32, 4, -13); - TEST_VDUP(vector_shift, q, int, s, 64, 2, -20); + VDUP(vector_shift, , int, s, 8, 8, -1); + VDUP(vector_shift, , int, s, 16, 4, -2); + VDUP(vector_shift, , int, s, 32, 2, -3); + VDUP(vector_shift, , int, s, 64, 1, -4); + VDUP(vector_shift, q, int, s, 8, 16, -7); + VDUP(vector_shift, q, int, s, 16, 8, -11); + VDUP(vector_shift, q, int, s, 32, 4, -13); + VDUP(vector_shift, q, int, s, 64, 2, -20); fprintf(ref_file, "\n%s cumulative saturation output:\n", TEST_MSG " (input 0 and negative shift amount)"); @@ -135,31 +135,31 @@ FNNAME (INSN) dump_results_hex2 (TEST_MSG, " (input 0 and negative shift amount)"); /* Test again, with predefined input values */ - TEST_MACRO_ALL_VARIANTS_2_5(TEST_VLOAD, vector, buffer); + TEST_MACRO_ALL_VARIANTS_2_5(VLOAD, vector, buffer); /* Choose init value arbitrarily, will be used as shift amount */ - TEST_VDUP(vector_shift, , int, s, 8, 8, 1); - TEST_VDUP(vector_shift, , int, s, 16, 4, 3); - TEST_VDUP(vector_shift, , int, s, 32, 2, 8); - TEST_VDUP(vector_shift, , int, s, 64, 1, -3); - TEST_VDUP(vector_shift, q, int, s, 8, 16, 10); - TEST_VDUP(vector_shift, q, int, s, 16, 8, 12); - TEST_VDUP(vector_shift, q, int, s, 32, 4, 32); - TEST_VDUP(vector_shift, q, int, s, 64, 2, 63); + VDUP(vector_shift, , int, s, 8, 8, 1); + VDUP(vector_shift, , int, s, 16, 4, 3); + VDUP(vector_shift, , int, s, 32, 2, 8); + VDUP(vector_shift, , int, s, 64, 1, -3); + VDUP(vector_shift, q, int, s, 8, 16, 10); + VDUP(vector_shift, q, int, s, 16, 8, 12); + VDUP(vector_shift, q, int, s, 32, 4, 32); + VDUP(vector_shift, q, int, s, 64, 2, 63); fprintf(ref_file, "\n%s cumulative saturation output:\n", TEST_MSG); TEST_MACRO_ALL_VARIANTS_1_5(TEST_VQSHL, int); dump_results_hex (TEST_MSG); /* Use negative shift amounts */ - TEST_VDUP(vector_shift, , int, s, 8, 8, -1); - TEST_VDUP(vector_shift, , int, s, 16, 4, -2); - TEST_VDUP(vector_shift, , int, s, 32, 2, -3); - TEST_VDUP(vector_shift, , int, s, 64, 1, -4); - TEST_VDUP(vector_shift, q, int, s, 8, 16, -7); - TEST_VDUP(vector_shift, q, int, s, 16, 8, -11); - TEST_VDUP(vector_shift, q, int, s, 32, 4, -13); - TEST_VDUP(vector_shift, q, int, s, 64, 2, -20); + VDUP(vector_shift, , int, s, 8, 8, -1); + VDUP(vector_shift, , int, s, 16, 4, -2); + VDUP(vector_shift, , int, s, 32, 2, -3); + VDUP(vector_shift, , int, s, 64, 1, -4); + VDUP(vector_shift, q, int, s, 8, 16, -7); + VDUP(vector_shift, q, int, s, 16, 8, -11); + VDUP(vector_shift, q, int, s, 32, 4, -13); + VDUP(vector_shift, q, int, s, 64, 2, -20); fprintf(ref_file, "\n%s cumulative saturation output:\n", TEST_MSG " (negative shift amount)"); @@ -167,14 +167,14 @@ FNNAME (INSN) dump_results_hex2 (TEST_MSG, " (negative shift amount)"); /* Use large shift amounts */ - TEST_VDUP(vector_shift, , int, s, 8, 8, 8); - TEST_VDUP(vector_shift, , int, s, 16, 4, 16); - TEST_VDUP(vector_shift, , int, s, 32, 2, 32); - TEST_VDUP(vector_shift, , int, s, 64, 1, 64); - TEST_VDUP(vector_shift, q, int, s, 8, 16, 8); - TEST_VDUP(vector_shift, q, int, s, 16, 8, 16); - TEST_VDUP(vector_shift, q, int, s, 32, 4, 32); - TEST_VDUP(vector_shift, q, int, s, 64, 2, 64); + VDUP(vector_shift, , int, s, 8, 8, 8); + VDUP(vector_shift, , int, s, 16, 4, 16); + VDUP(vector_shift, , int, s, 32, 2, 32); + VDUP(vector_shift, , int, s, 64, 1, 64); + VDUP(vector_shift, q, int, s, 8, 16, 8); + VDUP(vector_shift, q, int, s, 16, 8, 16); + VDUP(vector_shift, q, int, s, 32, 4, 32); + VDUP(vector_shift, q, int, s, 64, 2, 64); fprintf(ref_file, "\n%s cumulative saturation output:\n", TEST_MSG " (large shift amount, negative input)"); @@ -182,32 +182,32 @@ FNNAME (INSN) dump_results_hex2 (TEST_MSG, " (large shift amount, negative input)"); /* Fill input vector with max value, to check saturation on limits */ - TEST_VDUP(vector, , int, s, 8, 8, 0x7F); - TEST_VDUP(vector, , int, s, 16, 4, 0x7FFF); - TEST_VDUP(vector, , int, s, 32, 2, 0x7FFFFFFF); - TEST_VDUP(vector, , int, s, 64, 1, 0x7FFFFFFFFFFFFFFFLL); - TEST_VDUP(vector, , uint, u, 8, 8, 0xFF); - TEST_VDUP(vector, , uint, u, 16, 4, 0xFFFF); - TEST_VDUP(vector, , uint, u, 32, 2, 0xFFFFFFFF); - TEST_VDUP(vector, , uint, u, 64, 1, 0xFFFFFFFFFFFFFFFFULL); - TEST_VDUP(vector, q, int, s, 8, 16, 0x7F); - TEST_VDUP(vector, q, int, s, 16, 8, 0x7FFF); - TEST_VDUP(vector, q, int, s, 32, 4, 0x7FFFFFFF); - TEST_VDUP(vector, q, int, s, 64, 2, 0x7FFFFFFFFFFFFFFFLL); - TEST_VDUP(vector, q, uint, u, 8, 16, 0xFF); - TEST_VDUP(vector, q, uint, u, 16, 8, 0xFFFF); - TEST_VDUP(vector, q, uint, u, 32, 4, 0xFFFFFFFF); - TEST_VDUP(vector, q, uint, u, 64, 2, 0xFFFFFFFFFFFFFFFFULL); + VDUP(vector, , int, s, 8, 8, 0x7F); + VDUP(vector, , int, s, 16, 4, 0x7FFF); + VDUP(vector, , int, s, 32, 2, 0x7FFFFFFF); + VDUP(vector, , int, s, 64, 1, 0x7FFFFFFFFFFFFFFFLL); + VDUP(vector, , uint, u, 8, 8, 0xFF); + VDUP(vector, , uint, u, 16, 4, 0xFFFF); + VDUP(vector, , uint, u, 32, 2, 0xFFFFFFFF); + VDUP(vector, , uint, u, 64, 1, 0xFFFFFFFFFFFFFFFFULL); + VDUP(vector, q, int, s, 8, 16, 0x7F); + VDUP(vector, q, int, s, 16, 8, 0x7FFF); + VDUP(vector, q, int, s, 32, 4, 0x7FFFFFFF); + VDUP(vector, q, int, s, 64, 2, 0x7FFFFFFFFFFFFFFFLL); + VDUP(vector, q, uint, u, 8, 16, 0xFF); + VDUP(vector, q, uint, u, 16, 8, 0xFFFF); + VDUP(vector, q, uint, u, 32, 4, 0xFFFFFFFF); + VDUP(vector, q, uint, u, 64, 2, 0xFFFFFFFFFFFFFFFFULL); /* Shift by -1 */ - TEST_VDUP(vector_shift, , int, s, 8, 8, -1); - TEST_VDUP(vector_shift, , int, s, 16, 4, -1); - TEST_VDUP(vector_shift, , int, s, 32, 2, -1); - TEST_VDUP(vector_shift, , int, s, 64, 1, -1); - TEST_VDUP(vector_shift, q, int, s, 8, 16, -1); - TEST_VDUP(vector_shift, q, int, s, 16, 8, -1); - TEST_VDUP(vector_shift, q, int, s, 32, 4, -1); - TEST_VDUP(vector_shift, q, int, s, 64, 2, -1); + VDUP(vector_shift, , int, s, 8, 8, -1); + VDUP(vector_shift, , int, s, 16, 4, -1); + VDUP(vector_shift, , int, s, 32, 2, -1); + VDUP(vector_shift, , int, s, 64, 1, -1); + VDUP(vector_shift, q, int, s, 8, 16, -1); + VDUP(vector_shift, q, int, s, 16, 8, -1); + VDUP(vector_shift, q, int, s, 32, 4, -1); + VDUP(vector_shift, q, int, s, 64, 2, -1); fprintf(ref_file, "\n%s cumulative saturation output:\n", TEST_MSG " (check cumulative saturation)"); @@ -215,14 +215,14 @@ FNNAME (INSN) dump_results_hex2 (TEST_MSG, " (check cumulative saturation)"); /* Use large shift amounts */ - TEST_VDUP(vector_shift, , int, s, 8, 8, 8); - TEST_VDUP(vector_shift, , int, s, 16, 4, 16); - TEST_VDUP(vector_shift, , int, s, 32, 2, 32); - TEST_VDUP(vector_shift, , int, s, 64, 1, 64); - TEST_VDUP(vector_shift, q, int, s, 8, 16, 8); - TEST_VDUP(vector_shift, q, int, s, 16, 8, 16); - TEST_VDUP(vector_shift, q, int, s, 32, 4, 32); - TEST_VDUP(vector_shift, q, int, s, 64, 2, 64); + VDUP(vector_shift, , int, s, 8, 8, 8); + VDUP(vector_shift, , int, s, 16, 4, 16); + VDUP(vector_shift, , int, s, 32, 2, 32); + VDUP(vector_shift, , int, s, 64, 1, 64); + VDUP(vector_shift, q, int, s, 8, 16, 8); + VDUP(vector_shift, q, int, s, 16, 8, 16); + VDUP(vector_shift, q, int, s, 32, 4, 32); + VDUP(vector_shift, q, int, s, 64, 2, 64); fprintf(ref_file, "\n%s cumulative saturation output:\n", TEST_MSG " (large shift amount, positive input)"); @@ -230,10 +230,10 @@ FNNAME (INSN) dump_results_hex2 (TEST_MSG, " (large shift amount, positive input)"); /* Check 64 bits saturation */ - TEST_VDUP(vector, , int, s, 64, 1, -10); - TEST_VDUP(vector_shift, , int, s, 64, 1, 64); - TEST_VDUP(vector, q, int, s, 64, 2, 10); - TEST_VDUP(vector_shift, q, int, s, 64, 2, 64); + VDUP(vector, , int, s, 64, 1, -10); + VDUP(vector_shift, , int, s, 64, 1, 64); + VDUP(vector, q, int, s, 64, 2, 10); + VDUP(vector_shift, q, int, s, 64, 2, 64); fprintf(ref_file, "\n%s cumulative saturation output:\n", TEST_MSG " (check saturation on 64 bits)"); TEST_MACRO_ALL_VARIANTS_1_5(TEST_VQSHL, int); |