]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Comparison with an enum should mention enum value.
authorMartin Liska <mliska@suse.cz>
Thu, 27 Dec 2018 08:51:14 +0000 (09:51 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 27 Dec 2018 08:51:14 +0000 (08:51 +0000)
2018-12-27  Martin Liska  <mliska@suse.cz>

* builtins.c (expand_movstr): Compare with RETURN_BEGIN.
* expr.c (move_by_pieces): Likewise.
(store_by_pieces): Likewise.
(store_expr): Fix GNU coding style.

From-SVN: r267430

gcc/ChangeLog
gcc/builtins.c
gcc/expr.c

index a07b0d5c15922a788a2764271de8eb749ddd5aca..c64fa347cc901824ecf4b354cd50941fc1760197 100644 (file)
@@ -1,3 +1,10 @@
+2018-12-27  Martin Liska  <mliska@suse.cz>
+
+       * builtins.c (expand_movstr): Compare with RETURN_BEGIN.
+       * expr.c (move_by_pieces): Likewise.
+       (store_by_pieces): Likewise.
+       (store_expr): Fix GNU coding style.
+
 2018-12-26  Andrew Pinski  <apinski@marvell.com>
 
        * config/aarch64/aarch64-cores.def (octeontx): New.
index b56577e450c9ed122fa9e106adf8759d7d8e0559..0d66dd7c8899bfd695c5fe128c555d166c171f2a 100644 (file)
@@ -3939,7 +3939,8 @@ expand_movstr (tree dest, tree src, rtx target, memop_ret retmode)
       dest_mem = replace_equiv_address (dest_mem, target);
     }
 
-  create_output_operand (&ops[0], retmode ? target : NULL_RTX, Pmode);
+  create_output_operand (&ops[0],
+                        retmode != RETURN_BEGIN ? target : NULL_RTX, Pmode);
   create_fixed_operand (&ops[1], dest_mem);
   create_fixed_operand (&ops[2], src_mem);
   if (!maybe_expand_insn (targetm.code_for_movstr, 3, ops))
index 818313426778386af951389c23e59f99f102d5f4..abbaef2d9ce7b784cfe69afe7d5984123e39569e 100644 (file)
@@ -1220,7 +1220,7 @@ move_by_pieces (rtx to, rtx from, unsigned HOST_WIDE_INT len,
 
   data.run ();
 
-  if (retmode)
+  if (retmode != RETURN_BEGIN)
     return data.finish_retmode (retmode);
   else
     return to;
@@ -1388,7 +1388,7 @@ store_by_pieces (rtx to, unsigned HOST_WIDE_INT len,
   store_by_pieces_d data (to, constfun, constfundata, len, align);
   data.run ();
 
-  if (retmode)
+  if (retmode != RETURN_BEGIN)
     return data.finish_retmode (retmode);
   else
     return to;
@@ -5609,13 +5609,13 @@ store_expr (tree exp, rtx target, int call_param_p,
 
       dest_mem = target;
 
+      memop_ret retmode = exp_len > str_copy_len ? RETURN_END : RETURN_BEGIN;
       dest_mem = store_by_pieces (dest_mem,
                                  str_copy_len, builtin_strncpy_read_str,
                                  CONST_CAST (char *,
                                              TREE_STRING_POINTER (str)),
                                  MEM_ALIGN (target), false,
-                                 (exp_len > str_copy_len ? RETURN_END :
-                                  RETURN_BEGIN));
+                                 retmode);
       if (exp_len > str_copy_len)
        clear_storage (adjust_address (dest_mem, BLKmode, 0),
                       GEN_INT (exp_len - str_copy_len),