__x__=memory-ordering, and __y__=memory-ordering.
*/
-#define _ATOMIC_LOAD_( __a__, __x__ ) \
- ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
- __typeof__((__a__)->__f__) __r__ = (__typeof__((__a__)->__f__))model_read_action((void *)__p__, __x__); \
- __r__; })
-
-#define _ATOMIC_STORE_( __a__, __m__, __x__ ) \
- ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
- __typeof__(__m__) __v__ = (__m__); \
- model_write_action((void *) __p__, __x__, (uint64_t) __v__); \
- __v__; })
-
-
-#define _ATOMIC_INIT_( __a__, __m__ ) \
- ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
- __typeof__(__m__) __v__ = (__m__); \
- model_init_action((void *) __p__, (uint64_t) __v__); \
- __v__; })
-
-#define _ATOMIC_MODIFY_( __a__, __o__, __m__, __x__ ) \
- ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
- __typeof__((__a__)->__f__) __old__=(__typeof__((__a__)->__f__)) model_rmwr_action((void *)__p__, __x__); \
- __typeof__(__m__) __v__ = (__m__); \
- __typeof__((__a__)->__f__) __copy__= __old__; \
- __copy__ __o__ __v__; \
- model_rmw_action((void *)__p__, __x__, (uint64_t) __copy__); \
- __old__; })
-
-#define _ATOMIC_CMPSWP_( __a__, __e__, __m__, __x__ ) \
- ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
- __typeof__(__e__) __q__ = (__e__); \
- __typeof__(__m__) __v__ = (__m__); \
- bool __r__; \
- __typeof__((__a__)->__f__) __t__=(__typeof__((__a__)->__f__)) model_rmwr_action((void *)__p__, __x__);\
- if (__t__ == * __q__ ) { \
- model_rmw_action((void *)__p__, __x__, (uint64_t) __v__); __r__ = true; } \
- else { model_rmwc_action((void *)__p__, __x__); *__q__ = __t__; __r__ = false;} \
- __r__; })
+#define _ATOMIC_LOAD_( __a__, __x__ ) \
+ ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
+ __typeof__((__a__)->__f__) __r__ = (__typeof__((__a__)->__f__))model_read_action((void *)__p__, __x__); \
+ __r__; })
+
+#define _ATOMIC_STORE_( __a__, __m__, __x__ ) \
+ ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
+ __typeof__(__m__) __v__ = (__m__); \
+ model_write_action((void *) __p__, __x__, (uint64_t) __v__); \
+ __v__; })
+
+
+#define _ATOMIC_INIT_( __a__, __m__ ) \
+ ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
+ __typeof__(__m__) __v__ = (__m__); \
+ model_init_action((void *) __p__, (uint64_t) __v__); \
+ __v__; })
+
+#define _ATOMIC_MODIFY_( __a__, __o__, __m__, __x__ ) \
+ ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
+ __typeof__((__a__)->__f__) __old__=(__typeof__((__a__)->__f__)) model_rmwr_action((void *)__p__, __x__); \
+ __typeof__(__m__) __v__ = (__m__); \
+ __typeof__((__a__)->__f__) __copy__= __old__; \
+ __copy__ __o__ __v__; \
+ model_rmw_action((void *)__p__, __x__, (uint64_t) __copy__); \
+ __old__; })
+
+#define _ATOMIC_CMPSWP_( __a__, __e__, __m__, __x__ ) \
+ ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__); \
+ __typeof__(__e__) __q__ = (__e__); \
+ __typeof__(__m__) __v__ = (__m__); \
+ bool __r__; \
+ __typeof__((__a__)->__f__) __t__=(__typeof__((__a__)->__f__)) model_rmwr_action((void *)__p__, __x__); \
+ if (__t__ == * __q__ ) { \
+ model_rmw_action((void *)__p__, __x__, (uint64_t) __v__); __r__ = true; } \
+ else { model_rmwc_action((void *)__p__, __x__); *__q__ = __t__; __r__ = false;} \
+ __r__; })
//TODO
-#define _ATOMIC_FENCE_( __a__, __x__ ) \
+#define _ATOMIC_FENCE_( __a__, __x__ ) \
({ ;})