diff options
author | Andrea Canciani <ranma42@gmail.com> | 2013-09-26 09:16:41 +0200 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2013-10-09 14:23:11 +0200 |
commit | 31ac784f3427a189e34ef6fdc937441b613407b9 (patch) | |
tree | 873e5df84b51e4a560fd2ea9a6c947735b55fa60 | |
parent | c89f4c826695dbb5df0817d84f845dbd3e28b7a7 (diff) |
Fix build on MSVC
After a4c79d695d52c94647b1aff78548e5892d616b70 the MMX and SSE2 code
has some declarations after the beginning of a block, which is not
allowed by MSVC.
Fixes multiple errors like:
pixman-mmx.c(3625) : error C2275: '__m64' : illegal use of this type
as an expression
pixman-sse2.c(5708) : error C2275: '__m128i' : illegal use of this
type as an expression
-rw-r--r-- | pixman/pixman-mmx.c | 2 | ||||
-rw-r--r-- | pixman/pixman-sse2.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c index a0f59ef1..f9a92ce0 100644 --- a/pixman/pixman-mmx.c +++ b/pixman/pixman-mmx.c @@ -3579,7 +3579,6 @@ do { \ __m64 b_lo = _mm_mullo_pi16 (_mm_unpacklo_pi8 (b, mm_zero), mm_wb); \ __m64 hi = _mm_add_pi16 (t_hi, b_hi); \ __m64 lo = _mm_add_pi16 (t_lo, b_lo); \ - vx += unit_x; \ /* calculate horizontal weights */ \ __m64 mm_wh = _mm_add_pi16 (mm_addc7, _mm_xor_si64 (mm_xorc7, \ _mm_srli_pi16 (mm_x, \ @@ -3587,6 +3586,7 @@ do { \ /* horizontal interpolation */ \ __m64 p = _mm_unpacklo_pi16 (lo, hi); \ __m64 q = _mm_unpackhi_pi16 (lo, hi); \ + vx += unit_x; \ lo = _mm_madd_pi16 (p, mm_wh); \ hi = _mm_madd_pi16 (q, mm_wh); \ mm_x = _mm_add_pi16 (mm_x, mm_ux); \ diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c index 42c72093..2ab26903 100644 --- a/pixman/pixman-sse2.c +++ b/pixman/pixman-sse2.c @@ -5626,10 +5626,10 @@ do { \ #define BILINEAR_INTERPOLATE_ONE_PIXEL_HELPER(pix, phase) \ do { \ __m128i xmm_wh, xmm_a, xmm_b; \ - (void)xmm_ux4; /* suppress warning: unused variable 'xmm_ux4' */ \ /* fetch 2x2 pixel block into sse2 registers */ \ __m128i tltr = _mm_loadl_epi64 ((__m128i *)&src_top[vx >> 16]); \ __m128i blbr = _mm_loadl_epi64 ((__m128i *)&src_bottom[vx >> 16]); \ + (void)xmm_ux4; /* suppress warning: unused variable 'xmm_ux4' */ \ vx += unit_x; \ /* vertical interpolation */ \ xmm_a = _mm_mullo_epi16 (_mm_unpacklo_epi8 (tltr, xmm_zero), xmm_wt); \ |