@@ -344,6 +344,33 @@ template <class T, int N> struct ImplDec {
344344// processed.
345345constexpr float FPDELTA = 0 .5f ;
346346
347+ template <class T , int N> struct ImplLoad {
348+ static constexpr AtomicOp atomic_op = AtomicOp::load;
349+ static constexpr int n_args = 0 ;
350+
351+ static T init (int i, const Config &cfg) { return (T)(i + FPDELTA); }
352+
353+ static T gold (int i, const Config &cfg) {
354+ T gold = init (i, cfg);
355+ return gold;
356+ }
357+ };
358+
359+ template <class T , int N> struct ImplStore {
360+ static constexpr AtomicOp atomic_op = AtomicOp::store;
361+ static constexpr int n_args = 1 ;
362+ static constexpr T base = (T)(2 + FPDELTA);
363+
364+ static T init (int i, const Config &cfg) { return 0 ; }
365+
366+ static T gold (int i, const Config &cfg) {
367+ T gold = is_updated (i, N, cfg) ? base : init (i, cfg);
368+ return gold;
369+ }
370+
371+ static T arg0 (int i) { return base; }
372+ };
373+
347374template <class T , int N, class C , C Op> struct ImplAdd {
348375 static constexpr C atomic_op = Op;
349376 static constexpr int n_args = 1 ;
@@ -576,6 +603,13 @@ int main(void) {
576603 passed &= test<float , 8 , ImplLSCFcmpwr>(q, cfg);
577604#endif // USE_DWORD_ATOMICS
578605#endif // CMPXCHG_TEST
606+
607+ #ifndef USE_DWORD_ATOMICS
608+ // Check load/store operations
609+ passed &= test_int_types<8 , ImplLoad>(q, cfg);
610+ passed &= test_int_types<8 , ImplStore>(q, cfg);
611+ passed &= test<float , 8 , ImplStore>(q, cfg);
612+ #endif // USE_DWORD_ATOMICS
579613 // TODO: check double other vector lengths in LSC mode.
580614
581615 std::cout << (passed ? " Passed\n " : " FAILED\n " );
0 commit comments