]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/expr.h
Update copyright years.
[thirdparty/gcc.git] / gcc / expr.h
index 890ec19ac7ef87ec94b8db32111d3cae94ca1277..f04f40da6ab985cf58fcacfdd86596000b16a82f 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for code generation pass of GNU compiler.
-   Copyright (C) 1987-2021 Free Software Foundation, Inc.
+   Copyright (C) 1987-2024 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -69,25 +69,34 @@ extern void convert_move (rtx, rtx, int);
 extern rtx convert_to_mode (machine_mode, rtx, int);
 
 /* Convert an rtx to MODE from OLDMODE and return the result.  */
-extern rtx convert_modes (machine_mode, machine_mode, rtx, int);
+extern rtx convert_modes (machine_mode mode, machine_mode oldmode,
+                         rtx x, int unsignedp);
+
+/* Variant of convert_modes for ABI parameter passing/return.  */
+extern rtx convert_float_to_wider_int (machine_mode mode, machine_mode fmode,
+                                      rtx x);
+
+/* Variant of convert_modes for ABI parameter passing/return.  */
+extern rtx convert_wider_int_to_float (machine_mode mode, machine_mode imode,
+                                      rtx x);
 
 /* Expand a call to memcpy or memmove or memcmp, and return the result.  */
 extern rtx emit_block_op_via_libcall (enum built_in_function, rtx, rtx, rtx,
                                      bool);
 
-static inline rtx
+inline rtx
 emit_block_copy_via_libcall (rtx dst, rtx src, rtx size, bool tailcall = false)
 {
   return emit_block_op_via_libcall (BUILT_IN_MEMCPY, dst, src, size, tailcall);
 }
 
-static inline rtx
+inline rtx
 emit_block_move_via_libcall (rtx dst, rtx src, rtx size, bool tailcall = false)
 {
   return emit_block_op_via_libcall (BUILT_IN_MEMMOVE, dst, src, size, tailcall);
 }
 
-static inline rtx
+inline rtx
 emit_block_comp_via_libcall (rtx dst, rtx src, rtx size, bool tailcall = false)
 {
   return emit_block_op_via_libcall (BUILT_IN_MEMCMP, dst, src, size, tailcall);
@@ -117,7 +126,8 @@ struct by_pieces_prev
   fixed_size_mode mode;
 };
 
-extern rtx emit_block_move (rtx, rtx, rtx, enum block_op_methods);
+extern rtx emit_block_move (rtx, rtx, rtx, enum block_op_methods,
+                           unsigned ctz_size = 0);
 extern rtx emit_block_move_hints (rtx, rtx, rtx, enum block_op_methods,
                                  unsigned int, HOST_WIDE_INT,
                                  unsigned HOST_WIDE_INT,
@@ -125,9 +135,11 @@ extern rtx emit_block_move_hints (rtx, rtx, rtx, enum block_op_methods,
                                  unsigned HOST_WIDE_INT,
                                  bool bail_out_libcall = false,
                                  bool *is_move_done = NULL,
-                                 bool might_overlap = false);
+                                 bool might_overlap = false,
+                                 unsigned ctz_size = 0);
 extern rtx emit_block_cmp_hints (rtx, rtx, rtx, tree, rtx, bool,
-                                by_pieces_constfn, void *);
+                                by_pieces_constfn, void *,
+                                unsigned ctz_len = 0);
 extern bool emit_storent_insn (rtx to, rtx from);
 
 /* Copy all or part of a value X into registers starting at REGNO.
@@ -169,14 +181,14 @@ extern void clobber_reg_mode (rtx *, rtx, machine_mode);
 extern rtx copy_blkmode_to_reg (machine_mode, tree);
 
 /* Mark REG as holding a parameter for the next CALL_INSN.  */
-static inline void
+inline void
 use_reg (rtx *fusage, rtx reg)
 {
   use_reg_mode (fusage, reg, VOIDmode);
 }
 
 /* Mark REG as clobbered by the call with FUSAGE as CALL_INSN_FUNCTION_USAGE.  */
-static inline void
+inline void
 clobber_reg (rtx *fusage, rtx reg)
 {
   clobber_reg_mode (fusage, reg, VOIDmode);
@@ -213,16 +225,16 @@ extern bool set_storage_via_setmem (rtx, rtx, rtx, unsigned int,
                                    unsigned HOST_WIDE_INT,
                                    unsigned HOST_WIDE_INT);
 
-/* Return nonzero if it is desirable to store LEN bytes generated by
+/* Return true if it is desirable to store LEN bytes generated by
    CONSTFUN with several move instructions by store_by_pieces
    function.  CONSTFUNDATA is a pointer which will be passed as argument
    in every CONSTFUN call.
    ALIGN is maximum alignment we can assume.
    MEMSETP is true if this is a real memset/bzero, not a copy
    of a const string.  */
-extern int can_store_by_pieces (unsigned HOST_WIDE_INT,
-                               by_pieces_constfn,
-                               void *, unsigned int, bool);
+extern bool can_store_by_pieces (unsigned HOST_WIDE_INT,
+                                by_pieces_constfn,
+                                void *, unsigned int, bool);
 
 /* Generate several move instructions to store LEN bytes generated by
    CONSTFUN to block TO.  (A MEM rtx with BLKmode).  CONSTFUNDATA is a
@@ -253,7 +265,7 @@ extern rtx_insn *emit_move_insn_1 (rtx, rtx);
 extern rtx_insn *emit_move_complex_push (machine_mode, rtx, rtx);
 extern rtx_insn *emit_move_complex_parts (rtx, rtx);
 extern rtx read_complex_part (rtx, bool);
-extern void write_complex_part (rtx, rtx, bool);
+extern void write_complex_part (rtx, rtx, bool, bool);
 extern rtx read_complex_part (rtx, bool);
 extern rtx emit_move_resolve_push (machine_mode, rtx);
 
@@ -266,8 +278,8 @@ extern bool emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int,
                            int, rtx, poly_int64, rtx, rtx, int, rtx, bool);
 
 /* Extract the accessible bit-range from a COMPONENT_REF.  */
-extern void get_bit_range (poly_uint64_pod *, poly_uint64_pod *, tree,
-                          poly_int64_pod *, tree *);
+extern void get_bit_range (poly_uint64 *, poly_uint64 *, tree,
+                          poly_int64 *, tree *);
 
 /* Expand an assignment that stores the value of FROM into TO.  */
 extern void expand_assignment (tree, tree, bool);
@@ -294,14 +306,14 @@ extern rtx expand_expr_real_2 (sepops, rtx, machine_mode,
 /* Generate code for computing expression EXP.
    An rtx for the computed value is returned.  The value is never null.
    In the case of a void EXP, const0_rtx is returned.  */
-static inline rtx
+inline rtx
 expand_expr (tree exp, rtx target, machine_mode mode,
             enum expand_modifier modifier)
 {
   return expand_expr_real (exp, target, mode, modifier, NULL, false);
 }
 
-static inline rtx
+inline rtx
 expand_normal (tree exp)
 {
   return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL, false);
@@ -320,10 +332,12 @@ extern enum tree_code maybe_optimize_mod_cmp (enum tree_code, tree *, tree *);
 extern void maybe_optimize_sub_cmp_0 (enum tree_code, tree *, tree *);
 
 /* Two different ways of generating switch statements.  */
-extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx, profile_probability);
-extern int try_tablejump (tree, tree, tree, tree, rtx, rtx, profile_probability);
+extern bool try_casesi (tree, tree, tree, tree, rtx, rtx, rtx,
+                       profile_probability);
+extern bool try_tablejump (tree, tree, tree, tree, rtx, rtx,
+                          profile_probability);
 
-extern int safe_from_p (const_rtx, tree, int);
+extern bool safe_from_p (const_rtx, tree, int);
 
 /* Get the personality libfunc for a function decl.  */
 rtx get_personality_function (tree);
@@ -338,6 +352,9 @@ extern unsigned HOST_WIDE_INT highest_pow2_factor (const_tree);
 extern bool categorize_ctor_elements (const_tree, HOST_WIDE_INT *,
                                      HOST_WIDE_INT *, HOST_WIDE_INT *,
                                      bool *);
+extern bool immediate_const_ctor_p (const_tree, unsigned int words = 1);
+extern void store_constructor (tree, rtx, int, poly_int64, bool);
+extern HOST_WIDE_INT int_expr_size (const_tree exp);
 
 extern void expand_operands (tree, tree, rtx, rtx*, rtx*,
                             enum expand_modifier);