aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@105869f7-3296-0410-a4ea-f4349344b45a>2012-02-06 16:58:41 +0000
committereschnett <eschnett@105869f7-3296-0410-a4ea-f4349344b45a>2012-02-06 16:58:41 +0000
commit61af16d6193c91a766d952ec8213ed0dbae9a234 (patch)
tree808ed513c6aae535dd8219ec26d4046a0b911494
parent8c458c0b11937927bcb8abe2fc226e7551be5d28 (diff)
Make macro arguments safe
git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/Vectors/trunk@50 105869f7-3296-0410-a4ea-f4349344b45a
-rw-r--r--src/vectors-8-SSE2.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vectors-8-SSE2.h b/src/vectors-8-SSE2.h
index 9856920..e6e7867 100644
--- a/src/vectors-8-SSE2.h
+++ b/src/vectors-8-SSE2.h
@@ -144,8 +144,12 @@
bool const v8stp_lo = (i)>=(imin); \
bool const v8stp_hi = (i)+CCTK_REAL_VEC_SIZE-1<(imax)
#if VECTORISE_STREAMING_STORES && defined(__SSE4A__)
-# define vec8_store_nta_partial(p,x) \
+# define vec8_store_nta_partial(p_,x_) \
({ \
+ CCTK_REAL8& p__=(p_); \
+ CCTK_REAL8& p=p__; \
+ CCTK_REAL8_VEC const x__=(x_); \
+ CCTK_REAL8_VEC const x=x__; \
if (CCTK_BUILTIN_EXPECT(v8stp_lo and v8stp_hi, true)) { \
vec8_store_nta(p,x); \
} else if (v8stp_lo) { \
@@ -155,8 +159,12 @@
} \
})
#else
-# define vec8_store_nta_partial(p,x) \
+# define vec8_store_nta_partial(p_,x_) \
({ \
+ CCTK_REAL8& p__=(p_); \
+ CCTK_REAL8& p=p__; \
+ CCTK_REAL8_VEC const x__=(x_); \
+ CCTK_REAL8_VEC const x=x__; \
if (CCTK_BUILTIN_EXPECT(v8stp_lo and v8stp_hi, true)) { \
vec8_store_nta(p,x); \
} else if (v8stp_lo) { \