diff options
author | James Greenhalgh <james.greenhalgh@arm.com> | 2014-11-01 08:44:39 +0000 |
---|---|---|
committer | James Greenhalgh <jgreenhalgh@gcc.gnu.org> | 2014-11-01 08:44:39 +0000 |
commit | ad23f5d41174ce13f2b3d912a3f6633d1d6bc0f5 (patch) | |
tree | 203a2c03a7ac185bee70fbd7e085279134e49be5 /gcc | |
parent | b5e3200c52733b209ce8b9309b32bf152627746e (diff) | |
download | gcc-ad23f5d41174ce13f2b3d912a3f6633d1d6bc0f5.zip gcc-ad23f5d41174ce13f2b3d912a3f6633d1d6bc0f5.tar.gz gcc-ad23f5d41174ce13f2b3d912a3f6633d1d6bc0f5.tar.bz2 |
[Patch 3/7 arc] Deprecate *_BY_PIECES_P, move to hookized version
gcc/
* config/arc/arc.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New.
(arc_use_by_pieces_infrastructure_p): Likewise.
* confir/arc/arc.h (MOVE_BY_PIECES_P): Delete.
(CAN_MOVE_BY_PIECES): Likewise.
From-SVN: r216999
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/arc/arc.c | 24 | ||||
-rw-r--r-- | gcc/config/arc/arc.h | 6 |
3 files changed, 31 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2412bab..daebba9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2014-11-01 James Greenhalgh <james.greenhalgh@arm.com> + * config/arc/arc.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New. + (arc_use_by_pieces_infrastructure_p): Likewise. + * confir/arc/arc.h (MOVE_BY_PIECES_P): Delete. + (CAN_MOVE_BY_PIECES): Likewise. + +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. diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index d04be01..f3769dd 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -415,6 +415,11 @@ static void output_short_suffix (FILE *file); static bool arc_frame_pointer_required (void); +static bool arc_use_by_pieces_infrastructure_p (unsigned int, + unsigned int, + enum by_pieces_operation op, + bool); + /* Implements target hook vector_mode_supported_p. */ static bool @@ -530,6 +535,10 @@ static void arc_finalize_pic (void); #undef TARGET_DELEGITIMIZE_ADDRESS #define TARGET_DELEGITIMIZE_ADDRESS arc_delegitimize_address +#undef TARGET_USE_BY_PIECES_INFRASTRUCTURE_P +#define TARGET_USE_BY_PIECES_INFRASTRUCTURE_P \ + arc_use_by_pieces_infrastructure_p + /* Usually, we will be able to scale anchor offsets. When this fails, we want LEGITIMIZE_ADDRESS to kick in. */ #undef TARGET_MIN_ANCHOR_OFFSET @@ -9383,6 +9392,21 @@ arc_legitimize_reload_address (rtx *p, machine_mode mode, int opnum, return false; } +/* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */ + +static bool +arc_use_by_pieces_infrastructure_p (unsigned int size, + unsigned int align, + enum by_pieces_operation op, + bool speed_p) +{ + /* Let the movmem expander handle small block moves. */ + if (op == MOVE_BY_PIECES) + return false; + + return default_use_by_pieces_infrastructure_p (size, align, op, speed_p); +} + struct gcc_target targetm = TARGET_INITIALIZER; #include "gt-arc.h" diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index d40f5c3..2d27787 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -1553,12 +1553,6 @@ extern int arc_return_address_regs[4]; in one reasonably fast instruction. */ #define MOVE_MAX 4 -/* Let the movmem expander handle small block moves. */ -#define MOVE_BY_PIECES_P(LEN, ALIGN) 0 -#define CAN_MOVE_BY_PIECES(SIZE, ALIGN) \ - (move_by_pieces_ninsns (SIZE, ALIGN, MOVE_MAX_PIECES + 1) \ - < (unsigned int) MOVE_RATIO (!optimize_size)) - /* Undo the effects of the movmem pattern presence on STORE_BY_PIECES_P . */ #define MOVE_RATIO(SPEED) ((SPEED) ? 15 : 3) |