Fix missing _SEW_ in vmax_vx There was a similar error from a newer test, prompting re-evaluation of the test it was based on. Macro was missing _SEW_, and was only working for vle8, but this still passed the tests, so looking closer filled in the section that was present in the demo test, but missing in the macro. Change-Id: I50b4ab206f936f4a1c11d201f19edcb8f830744d
diff --git a/tests/vmax_vx_test.cpp b/tests/vmax_vx_test.cpp index 663ed26..67d8c2a 100644 --- a/tests/vmax_vx_test.cpp +++ b/tests/vmax_vx_test.cpp
@@ -40,10 +40,8 @@ int8_t *ptr_vec_2 = reinterpret_cast<int8_t *>(test_vector_2); const int8_t test_val = 8; - // set up values to test up to index of the AVL for (int idx = 0; idx < avl; idx++) { - // restrict values to valid int8_t range - ptr_vec_1[idx] = idx % (INT8_MAX) + (INT8_MIN); + ptr_vec_1[idx] = idx; } __asm__ volatile("vle8.v v8, (%0)" : : "r"(ptr_vec_1)); __asm__ volatile("vmax.vx v16, v8, %[RS1]" ::[RS1] "r"(test_val)); @@ -73,7 +71,10 @@ int##_SEW_##_t *ptr_vec_2 = \ reinterpret_cast<int##_SEW_##_t *>(test_vector_2); \ const int##_SEW_##_t test_val = TEST_VAL; \ - __asm__ volatile("vle8.v v8, (%0)" : : "r"(ptr_vec_1)); \ + for (int idx = 0; idx < avl; idx++) { \ + ptr_vec_1[idx] = idx; \ + } \ + __asm__ volatile("vle" #_SEW_ ".v v8, (%0)" : : "r"(ptr_vec_1)); \ __asm__ volatile("vmax.vx v16, v8, %[RS1]" ::[RS1] "r"(test_val)); \ for (int idx = 0; idx < vl; idx++) { \ ptr_vec_1[idx] = \