aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr/avr.h
diff options
context:
space:
mode:
authorSenthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>2015-12-17 19:55:39 +0300
committerDenis Chertykov <denisc@gcc.gnu.org>2015-12-17 19:55:39 +0300
commit998f15f3b6a3ec8963e5c9864480d5c990099bc8 (patch)
tree48f5a33661807489ccc663e4534c63ea77d68b2d /gcc/config/avr/avr.h
parent62f9ab0d432554c33c8d9c449ebcae73b2789812 (diff)
downloadgcc-998f15f3b6a3ec8963e5c9864480d5c990099bc8.zip
gcc-998f15f3b6a3ec8963e5c9864480d5c990099bc8.tar.gz
gcc-998f15f3b6a3ec8963e5c9864480d5c990099bc8.tar.bz2
avr.h (MOVE_MAX): Set value to 1.
* config/avr/avr.h (MOVE_MAX): Set value to 1. (MOVE_MAX_PIECES): Define. (MOVE_RATIO): Define. * config/avr/avr.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Provide target hook. (avr_use_by_pieces_infrastructure_p): New function. From-SVN: r231782
Diffstat (limited to 'gcc/config/avr/avr.h')
-rw-r--r--gcc/config/avr/avr.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 7439964..9872884 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -453,7 +453,22 @@ typedef struct avr_args
#undef WORD_REGISTER_OPERATIONS
-#define MOVE_MAX 4
+/* Can move only a single byte from memory to reg in a
+ single instruction. */
+
+#define MOVE_MAX 1
+
+/* Allow upto two bytes moves to occur using by_pieces
+ infrastructure */
+
+#define MOVE_MAX_PIECES 2
+
+/* Set MOVE_RATIO to 3 to allow memory moves upto 4 bytes to happen
+ by pieces when optimizing for speed, like it did when MOVE_MAX_PIECES
+ was 4. When optimizing for size, allow memory moves upto 2 bytes.
+ Also see avr_use_by_pieces_infrastructure_p. */
+
+#define MOVE_RATIO(speed) ((speed) ? 3 : 2)
#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1