diff options
author | James Greenhalgh <james.greenhalgh@arm.com> | 2014-11-01 08:38:36 +0000 |
---|---|---|
committer | James Greenhalgh <jgreenhalgh@gcc.gnu.org> | 2014-11-01 08:38:36 +0000 |
commit | b5e3200c52733b209ce8b9309b32bf152627746e (patch) | |
tree | 12b71b230d42270a7f4266a9df476c391d72380d /gcc | |
parent | 7cbed00872ff3e20e5183f0cb788cd0c86bdf168 (diff) | |
download | gcc-b5e3200c52733b209ce8b9309b32bf152627746e.zip gcc-b5e3200c52733b209ce8b9309b32bf152627746e.tar.gz gcc-b5e3200c52733b209ce8b9309b32bf152627746e.tar.bz2 |
[Patch 2/7 s390] Deprecate *_BY_PIECES_P, move to hookized version
gcc/
* config/s390/s390.c (s390_use_by_pieces_infrastructure_p): New.
(TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Likewise.
* config/s390/s390.h (MOVE_BY_PIECES_P): Remove.
(CLEAR_BY_PIECES): Likewise.
(SET_BY_PIECES): Likewise.
(STORE_BY_PIECES): Likewise.
From-SVN: r216998
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 16 | ||||
-rw-r--r-- | gcc/config/s390/s390.h | 18 |
3 files changed, 25 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7ed09eb..2412bab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2014-11-01 James Greenhalgh <james.greenhalgh@arm.com> + * config/s390/s390.c (s390_use_by_pieces_infrastructure_p): New. + (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Likewise. + * config/s390/s390.h (MOVE_BY_PIECES_P): Remove. + (CLEAR_BY_PIECES): Likewise. + (SET_BY_PIECES): Likewise. + (STORE_BY_PIECES): Likewise. + +2014-11-01 James Greenhalgh <james.greenhalgh@arm.com> + * target.def (use_by_pieces_infrastructure_p): New. * doc/tm.texi.in (MOVE_BY_PIECES_P): Describe that this macro is deprecated. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 874eb7c..51ae90c 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -12032,6 +12032,18 @@ s390_option_override (void) register_pass (&insert_pass_s390_early_mach); } +/* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */ + +static bool +s390_use_by_pieces_infrastructure_p (unsigned int size, + unsigned int align ATTRIBUTE_UNUSED, + enum by_pieces_operation op ATTRIBUTE_UNUSED, + bool speed_p ATTRIBUTE_UNUSED) +{ + return (size == 1 || size == 2 + || size == 4 || (TARGET_ZARCH && size == 8)); +} + /* Initialize GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP @@ -12217,6 +12229,10 @@ s390_option_override (void) #undef TARGET_SET_UP_BY_PROLOGUE #define TARGET_SET_UP_BY_PROLOGUE s300_set_up_by_prologue +#undef TARGET_USE_BY_PIECES_INFRASTRUCTURE_P +#define TARGET_USE_BY_PIECES_INFRASTRUCTURE_P \ + s390_use_by_pieces_infrastructure_p + struct gcc_target targetm = TARGET_INITIALIZER; #include "gt-s390.h" diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 0a935ee..d933b8d 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -744,24 +744,6 @@ do { \ #define MOVE_MAX_PIECES (TARGET_ZARCH ? 8 : 4) #define MAX_MOVE_MAX 16 -/* Determine whether to use move_by_pieces or block move insn. */ -#define MOVE_BY_PIECES_P(SIZE, ALIGN) \ - ( (SIZE) == 1 || (SIZE) == 2 || (SIZE) == 4 \ - || (TARGET_ZARCH && (SIZE) == 8) ) - -/* Determine whether to use clear_by_pieces or block clear insn. */ -#define CLEAR_BY_PIECES_P(SIZE, ALIGN) \ - ( (SIZE) == 1 || (SIZE) == 2 || (SIZE) == 4 \ - || (TARGET_ZARCH && (SIZE) == 8) ) - -/* This macro is used to determine whether store_by_pieces should be - called to "memcpy" storage when the source is a constant string. */ -#define STORE_BY_PIECES_P(SIZE, ALIGN) MOVE_BY_PIECES_P (SIZE, ALIGN) - -/* Likewise to decide whether to "memset" storage with byte values - other than zero. */ -#define SET_BY_PIECES_P(SIZE, ALIGN) STORE_BY_PIECES_P (SIZE, ALIGN) - /* Don't perform CSE on function addresses. */ #define NO_FUNCTION_CSE |