diff options
author | James Greenhalgh <james.greenhalgh@arm.com> | 2014-11-01 10:15:51 +0000 |
---|---|---|
committer | James Greenhalgh <jgreenhalgh@gcc.gnu.org> | 2014-11-01 10:15:51 +0000 |
commit | d3006da6f1f3b24d4274597c30f460e2241fb9e4 (patch) | |
tree | 222d1e0c46ddc5fe41eab58e96ead468198415cf /gcc | |
parent | a10ce561035bc1e1ca234dcb233f6bcdb32bfbc0 (diff) | |
download | gcc-d3006da6f1f3b24d4274597c30f460e2241fb9e4.zip gcc-d3006da6f1f3b24d4274597c30f460e2241fb9e4.tar.gz gcc-d3006da6f1f3b24d4274597c30f460e2241fb9e4.tar.bz2 |
[Patch 6/7 AArch64] Deprecate *_BY_PIECES_P, move to hookized version
gcc/
* config/aarch64/aarch64.c
(aarch64_use_by_pieces_infrastructre_p): New.
(TARGET_USE_BY_PIECES_INFRASTRUCTURE): Likewise.
* config/aarch64/aarch64.h (STORE_BY_PIECES_P): Delete.
From-SVN: r217003
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 20 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.h | 6 |
3 files changed, 27 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7e9ae04..99150b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2014-11-01 James Greenhalgh <james.greenhalgh@arm.com> + * config/aarch64/aarch64.c + (aarch64_use_by_pieces_infrastructre_p): New. + (TARGET_USE_BY_PIECES_INFRASTRUCTURE): Likewise. + * config/aarch64/aarch64.h (STORE_BY_PIECES_P): Delete. + +2014-11-01 James Greenhalgh <james.greenhalgh@arm.com> + * config/mips/mips.h (MOVE_BY_PIECES_P): Remove. (STORE_BY_PIECES_P): Likewise. * config/mips/mips.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 0400fd5..9aeac7c 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -10001,6 +10001,22 @@ aarch64_asan_shadow_offset (void) return (HOST_WIDE_INT_1 << 36); } +static bool +aarch64_use_by_pieces_infrastructure_p (unsigned int size, + unsigned int align, + enum by_pieces_operation op, + bool speed_p) +{ + /* STORE_BY_PIECES can be used when copying a constant string, but + in that case each 64-bit chunk takes 5 insns instead of 2 (LDR/STR). + For now we always fail this and let the move_by_pieces code copy + the string from read-only memory. */ + if (op == STORE_BY_PIECES) + return false; + + return default_use_by_pieces_infrastructure_p (size, align, op, speed_p); +} + #undef TARGET_ADDRESS_COST #define TARGET_ADDRESS_COST aarch64_address_cost @@ -10253,6 +10269,10 @@ aarch64_asan_shadow_offset (void) #undef TARGET_LEGITIMIZE_ADDRESS #define TARGET_LEGITIMIZE_ADDRESS aarch64_legitimize_address +#undef TARGET_USE_BY_PIECES_INFRASTRUCTURE_P +#define TARGET_USE_BY_PIECES_INFRASTRUCTURE_P \ + aarch64_use_by_pieces_infrastructure_p + struct gcc_target targetm = TARGET_INITIALIZER; #include "gt-aarch64.h" diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 97b1848..e22163e 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -723,12 +723,6 @@ do { \ #define SET_RATIO(speed) \ ((speed) ? 15 : AARCH64_CALL_RATIO - 2) -/* STORE_BY_PIECES_P can be used when copying a constant string, but - in that case each 64-bit chunk takes 5 insns instead of 2 (LDR/STR). - For now we always fail this and let the move_by_pieces code copy - the string from read-only memory. */ -#define STORE_BY_PIECES_P(SIZE, ALIGN) 0 - /* Disable auto-increment in move_by_pieces et al. Use of auto-increment is rarely a good idea in straight-line code since it adds an extra address dependency between each instruction. Better to use incrementing offsets. */ |