diff --git a/neon2rvv.h b/neon2rvv.h index 48a481d5..89c4030e 100644 --- a/neon2rvv.h +++ b/neon2rvv.h @@ -13254,9 +13254,9 @@ FORCE_INLINE float32x4_t vld1q_dup_f32(const float32_t *a) { return vdupq_n_f32( // FORCE_INLINE poly16x8_t vld1q_dup_p16(poly16_t const * ptr); -// FORCE_INLINE float64x1_t vld1_dup_f64(float64_t const * ptr); +FORCE_INLINE float64x1_t vld1_dup_f64(float64_t const *a) { return vdup_n_f64(a[0]); } -// FORCE_INLINE float64x2_t vld1q_dup_f64(float64_t const * ptr); +FORCE_INLINE float64x2_t vld1q_dup_f64(float64_t const *a) { return vdupq_n_f64(a[0]); } FORCE_INLINE uint8x16_t vld1q_dup_u8(const uint8_t *a) { return vdupq_n_u8(a[0]); } diff --git a/tests/impl.cpp b/tests/impl.cpp index 4b4f9319..964381d5 100644 --- a/tests/impl.cpp +++ b/tests/impl.cpp @@ -43751,9 +43751,25 @@ result_t test_vld1_dup_p16(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { retu result_t test_vld1q_dup_p16(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; } -result_t test_vld1_dup_f64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; } +result_t test_vld1_dup_f64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { +#ifdef ENABLE_TEST_ALL + const double *_a = (const double *)impl.test_cases_float_pointer1; + float64x1_t c = vld1_dup_f64(_a); + return validate_double(c, _a[0]); +#else + return TEST_UNIMPL; +#endif // ENABLE_TEST_ALL +} -result_t test_vld1q_dup_f64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; } +result_t test_vld1q_dup_f64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { +#ifdef ENABLE_TEST_ALL + const double *_a = (const double *)impl.test_cases_float_pointer1; + float64x2_t c = vld1q_dup_f64(_a); + return validate_double(c, _a[0], _a[0]); +#else + return TEST_UNIMPL; +#endif // ENABLE_TEST_ALL +} result_t test_vld1q_dup_u8(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { #ifdef ENABLE_TEST_ALL diff --git a/tests/impl.h b/tests/impl.h index 52cef98d..bd6eb561 100644 --- a/tests/impl.h +++ b/tests/impl.h @@ -2662,8 +2662,8 @@ _(vld1q_dup_u32) \ /*_(vld1q_dup_p8) */ \ /*_(vld1q_dup_p16) */ \ - /*_(vld1_dup_f64) */ \ - /*_(vld1q_dup_f64) */ \ + _(vld1_dup_f64) \ + _(vld1q_dup_f64) \ /*_(vld1q_dup_p64) */ \ _(vld1q_dup_s64) \ _(vld1q_dup_u64) \