From 61af16d6193c91a766d952ec8213ed0dbae9a234 Mon Sep 17 00:00:00 2001 From: eschnett Date: Mon, 6 Feb 2012 16:58:41 +0000 Subject: Make macro arguments safe git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/Vectors/trunk@50 105869f7-3296-0410-a4ea-f4349344b45a --- src/vectors-8-SSE2.h | 12 ++++++++++-- 1 file 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) { \ -- cgit v1.2.3