[Pcre-svn] [1216] code/trunk/src/pcre2_jit_neon_inc.h: Fix c…

Páxina inicial
Borrar esta mensaxe
Autor: Subversion repository
Data:  
Para: pcre-svn
Asunto: [Pcre-svn] [1216] code/trunk/src/pcre2_jit_neon_inc.h: Fix compiler warning on ARM64 with JIT.
Revision: 1216
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1216
Author:   zherczeg
Date:     2020-01-31 10:09:38 +0000 (Fri, 31 Jan 2020)
Log Message:
-----------
Fix compiler warning on ARM64 with JIT.


Modified Paths:
--------------
    code/trunk/src/pcre2_jit_neon_inc.h


Modified: code/trunk/src/pcre2_jit_neon_inc.h
===================================================================
--- code/trunk/src/pcre2_jit_neon_inc.h    2020-01-28 14:13:06 UTC (rev 1215)
+++ code/trunk/src/pcre2_jit_neon_inc.h    2020-01-31 10:09:38 UTC (rev 1216)
@@ -117,11 +117,16 @@
 # ifdef FFCPS_CHAR1A2A
 cmp1a = VDUPQ(char1a);
 cmp2a = VDUPQ(char2a);
+cmp1b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */
+cmp2b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */
 # else
 PCRE2_UCHAR char1b = ic.c.c2;
 PCRE2_UCHAR char2b = ic.c.c4;
 if (char1a == char1b)
+  {
   cmp1a = VDUPQ(char1a);
+  cmp1b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */
+  }
 else
   {
   sljit_u32 bit1 = char1a ^ char1b;
@@ -140,7 +145,10 @@
   }


if (char2a == char2b)
+ {
cmp2a = VDUPQ(char2a);
+ cmp2b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */
+ }
else
{
sljit_u32 bit2 = char2a ^ char2b;
@@ -208,8 +216,16 @@
else
data2 = shift_left_n_lanes(data, offs1 - offs2);

-data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b);
-data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b);
+if (compare1_type == compare_match1)
+ data = VCEQQ(data, cmp1a);
+else
+ data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b);
+
+if (compare2_type == compare_match1)
+ data2 = VCEQQ(data2, cmp2a);
+else
+ data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b);
+
vect_t eq = VANDQ(data, data2);
#endif

@@ -275,8 +291,14 @@
   data = VCEQQ(data, cmp1a);
   data2 = VCEQQ(data2, cmp2a);
 # else
-  data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b);
-  data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b);
+  if (compare1_type == compare_match1)
+    data = VCEQQ(data, cmp1a);
+  else
+    data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b);
+  if (compare2_type == compare_match1)
+    data2 = VCEQQ(data2, cmp2a);
+  else
+    data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b);
 # endif


eq = VANDQ(data, data2);