[Pixman] [PATCH 4/5] vmx: fix unused var warnings

Oded Gabbay oded.gabbay at gmail.com
Tue Jun 16 08:28:01 PDT 2015


Signed-off-by: Oded Gabbay <oded.gabbay at gmail.com>
---
 pixman/pixman-vmx.c | 90 +++++++++++++++++++++++++++++++++++------------------
 1 file changed, 59 insertions(+), 31 deletions(-)

diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c
index de3e787..80dd868 100644
--- a/pixman/pixman-vmx.c
+++ b/pixman/pixman-vmx.c
@@ -175,6 +175,10 @@ do {                                                \
     v ## mask = (typeof(v ## mask))           \
     vec_perm (tmp1, tmp2, mask ## _mask);       \
 } while (0);
+
+#define DECLARE_SRC_MASK_VAR vector unsigned char src_mask;
+#define DECLARE_MASK_MASK_VAR vector unsigned char mask_mask;
+
 #else
 
 /* Now the COMPUTE_SHIFT_{MASK, MASKS, MASKC} below are just no-op.
@@ -197,6 +201,9 @@ do {                                                \
     v ## dest = *((typeof(v ## dest)*)dest);              \
     v ## mask = *((typeof(v ## mask)*)mask);
 
+#define DECLARE_SRC_MASK_VAR
+#define DECLARE_MASK_MASK_VAR
+
 #endif /* _LITTLE_ENDIAN */
 
 #define LOAD_VECTORSM(dest, source, mask)				\
@@ -214,7 +221,7 @@ vmx_combine_over_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -264,7 +271,8 @@ vmx_combine_over_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -335,7 +343,7 @@ vmx_combine_over_reverse_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -383,7 +391,8 @@ vmx_combine_over_reverse_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -451,7 +460,7 @@ vmx_combine_in_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -496,7 +505,8 @@ vmx_combine_in_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -561,7 +571,7 @@ vmx_combine_in_reverse_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -608,7 +618,8 @@ vmx_combine_in_reverse_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -675,7 +686,7 @@ vmx_combine_out_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -722,7 +733,8 @@ vmx_combine_out_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -787,7 +799,7 @@ vmx_combine_out_reverse_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -835,7 +847,8 @@ vmx_combine_out_reverse_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -902,7 +915,7 @@ vmx_combine_atop_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -954,7 +967,8 @@ vmx_combine_atop_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1030,7 +1044,7 @@ vmx_combine_atop_reverse_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1082,7 +1096,8 @@ vmx_combine_atop_reverse_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1158,7 +1173,7 @@ vmx_combine_xor_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1210,7 +1225,8 @@ vmx_combine_xor_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1286,7 +1302,7 @@ vmx_combine_add_u_no_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc;
-    vector unsigned char src_mask;
+    DECLARE_SRC_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1332,7 +1348,8 @@ vmx_combine_add_u_mask (uint32_t *      dest,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1400,7 +1417,8 @@ vmx_combine_src_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1450,7 +1468,8 @@ vmx_combine_over_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1508,7 +1527,8 @@ vmx_combine_over_reverse_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1564,7 +1584,8 @@ vmx_combine_in_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char src_mask, mask_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1618,7 +1639,8 @@ vmx_combine_in_reverse_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char mask_mask, src_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1673,7 +1695,8 @@ vmx_combine_out_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char mask_mask, src_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1730,7 +1753,8 @@ vmx_combine_out_reverse_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char mask_mask, src_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1787,7 +1811,8 @@ vmx_combine_atop_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask, vsrca;
-    vector unsigned char mask_mask, src_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1853,7 +1878,8 @@ vmx_combine_atop_reverse_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char mask_mask, src_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1916,7 +1942,8 @@ vmx_combine_xor_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char mask_mask, src_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
@@ -1979,7 +2006,8 @@ vmx_combine_add_ca (pixman_implementation_t *imp,
 {
     int i;
     vector unsigned int vdest, vsrc, vmask;
-    vector unsigned char mask_mask, src_mask;
+    DECLARE_SRC_MASK_VAR
+    DECLARE_MASK_MASK_VAR
 
     while (width && ((uintptr_t)dest & 15))
     {
-- 
2.4.3



More information about the Pixman mailing list