+2014-11-18 James Greenhalgh <james.greenhalgh@arm.com>
+
+ PR target/63937
+ * target.def (use_by_pieces_infrastructure_p): Take unsigned
+ HOST_WIDE_INT as the size parameter.
+ * targhooks.c (default_use_by_pieces_infrastructure_p): Likewise.
+ * targhooks.h (default_use_by_pieces_infrastructure_p): Likewise.
+ * config/arc/arc.c (arc_use_by_pieces_infrastructure_p)): Likewise.
+ * config/mips/mips.c (mips_use_by_pieces_infrastructure_p)): Likewise.
+ * config/s390/s390.c (s390_use_by_pieces_infrastructure_p)): Likewise.
+ * config/sh/sh.c (sh_use_by_pieces_infrastructure_p)): Likewise.
+ * config/aarch64/aarch64.c
+ (aarch64_use_by_pieces_infrastructure_p)): Likewise.
+ * doc/tm.texi: Regenerate.
+
2014-11-18 Jan Hubicka <hubicka@ucw.cz>
* ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn.
}
static bool
-aarch64_use_by_pieces_infrastructure_p (unsigned int size,
+aarch64_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size,
unsigned int align,
enum by_pieces_operation op,
bool speed_p)
static bool arc_frame_pointer_required (void);
-static bool arc_use_by_pieces_infrastructure_p (unsigned int,
+static bool arc_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT,
unsigned int,
enum by_pieces_operation op,
bool);
/* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */
static bool
-arc_use_by_pieces_infrastructure_p (unsigned int size,
+arc_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size,
unsigned int align,
enum by_pieces_operation op,
bool speed_p)
/* Implement TARGET_USE_MOVE_BY_PIECES_INFRASTRUCTURE_P. */
bool
-mips_use_by_pieces_infrastructure_p (unsigned int size,
+mips_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size,
unsigned int align,
enum by_pieces_operation op,
bool speed_p)
/* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */
static bool
-s390_use_by_pieces_infrastructure_p (unsigned int size,
+s390_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size,
unsigned int align ATTRIBUTE_UNUSED,
enum by_pieces_operation op ATTRIBUTE_UNUSED,
bool speed_p ATTRIBUTE_UNUSED)
static bool sh_legitimate_constant_p (machine_mode, rtx);
static int mov_insn_size (machine_mode, bool);
static int mov_insn_alignment_mask (machine_mode, bool);
-static bool sh_use_by_pieces_infrastructure_p (unsigned int,
+static bool sh_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT,
unsigned int,
enum by_pieces_operation,
bool);
/* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */
static bool
-sh_use_by_pieces_infrastructure_p (unsigned int size,
+sh_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size,
unsigned int align,
enum by_pieces_operation op,
bool speed_p)
If you don't define this, a reasonable default is used.
@end defmac
-@deftypefn {Target Hook} bool TARGET_USE_BY_PIECES_INFRASTRUCTURE_P (unsigned int @var{size}, unsigned int @var{alignment}, enum by_pieces_operation @var{op}, bool @var{speed_p})
+@deftypefn {Target Hook} bool TARGET_USE_BY_PIECES_INFRASTRUCTURE_P (unsigned HOST_WIDE_INT @var{size}, unsigned int @var{alignment}, enum by_pieces_operation @var{op}, bool @var{speed_p})
GCC will attempt several strategies when asked to copy between
two areas of memory, or to set, clear or store to memory, for example
when copying a @code{struct}. The @code{by_pieces} infrastructure
Returning true for higher values of @code{size} may also cause an increase\n\
in code size, for example where the number of insns emitted to perform a\n\
move would be greater than that of a library call.",
- bool, (unsigned int size, unsigned int alignment,
+ bool, (unsigned HOST_WIDE_INT size, unsigned int alignment,
enum by_pieces_operation op, bool speed_p),
default_use_by_pieces_infrastructure_p)
a call to memcpy emitted. */
bool
-default_use_by_pieces_infrastructure_p (unsigned int size,
+default_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size,
unsigned int alignment,
enum by_pieces_operation op,
bool speed_p)
extern int default_register_move_cost (machine_mode, reg_class_t,
reg_class_t);
-extern bool default_use_by_pieces_infrastructure_p (unsigned int,
+extern bool default_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT,
unsigned int,
enum by_pieces_operation,
bool);
+2014-11-18 James Greenhalgh <james.greenhalgh@arm.com>
+
+ PR target/63937
+ * gcc.dg/memset-2.c: New.
+
2014-11-18 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/63813
--- /dev/null
+/* PR target/63937 */
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2" } */
+
+void
+foo (char *p)
+{
+ p = __builtin_assume_aligned (p, 64);
+ __builtin_memset (p, 0, 0x100000001ULL);
+}
+