@@ -344,6 +344,33 @@ template <class T, int N> struct ImplDec {
344
344
// processed.
345
345
constexpr float FPDELTA = 0 .5f ;
346
346
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
+
347
374
template <class T , int N, class C , C Op> struct ImplAdd {
348
375
static constexpr C atomic_op = Op;
349
376
static constexpr int n_args = 1 ;
@@ -576,6 +603,13 @@ int main(void) {
576
603
passed &= test<float , 8 , ImplLSCFcmpwr>(q, cfg);
577
604
#endif // USE_DWORD_ATOMICS
578
605
#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
579
613
// TODO: check double other vector lengths in LSC mode.
580
614
581
615
std::cout << (passed ? " Passed\n " : " FAILED\n " );
0 commit comments