From 998f15f3b6a3ec8963e5c9864480d5c990099bc8 Mon Sep 17 00:00:00 2001 From: Senthil Kumar Selvaraj Date: Thu, 17 Dec 2015 19:55:39 +0300 Subject: 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 --- gcc/config/avr/avr.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'gcc/config/avr/avr.h') 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 -- cgit v1.1