diff options
Diffstat (limited to 'gcc/config/avr/avr.h')
-rw-r--r-- | gcc/config/avr/avr.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 7d1e327..1b7bd35 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -46,11 +46,12 @@ struct base_arch_s /* Core have 'EICALL' and 'EIJMP' instructions. */ int have_eijmp_eicall; - /* Reserved for xmega architecture. */ - int reserved; + /* This is an XMEGA core. */ + int xmega_p; - /* Reserved for xmega architecture. */ - int reserved2; + /* This core has the RAMPD special function register + and thus also the RAMPX, RAMPY and RAMPZ registers. */ + int have_rampd; /* Default start of data section address for architecture. */ int default_data_section_start; @@ -62,6 +63,7 @@ struct base_arch_s /* Number of 64k segments in the flash. */ int n_segments; + /* Architecture id to built-in define __AVR_ARCH__ (NULL -> no macro) */ const char *const macro; /* Architecture name. */ @@ -83,7 +85,12 @@ enum avr_arch ARCH_AVR4, ARCH_AVR5, ARCH_AVR51, - ARCH_AVR6 + ARCH_AVR6, + ARCH_AVRXMEGA2, + ARCH_AVRXMEGA4, + ARCH_AVRXMEGA5, + ARCH_AVRXMEGA6, + ARCH_AVRXMEGA7 }; struct mcu_type_s { @@ -175,13 +182,19 @@ enum #define AVR_HAVE_LPMX (avr_current_arch->have_movw_lpmx) #define AVR_HAVE_ELPM (avr_current_arch->have_elpm) #define AVR_HAVE_ELPMX (avr_current_arch->have_elpmx) -#define AVR_HAVE_RAMPZ (avr_current_arch->have_elpm) +#define AVR_HAVE_RAMPD (avr_current_arch->have_rampd) +#define AVR_HAVE_RAMPX (avr_current_arch->have_rampd) +#define AVR_HAVE_RAMPY (avr_current_arch->have_rampd) +#define AVR_HAVE_RAMPZ (avr_current_arch->have_elpm \ + || avr_current_arch->have_rampd) #define AVR_HAVE_EIJMP_EICALL (avr_current_arch->have_eijmp_eicall) #define AVR_HAVE_8BIT_SP (avr_current_device->short_sp || TARGET_TINY_STACK) #define AVR_2_BYTE_PC (!AVR_HAVE_EIJMP_EICALL) #define AVR_3_BYTE_PC (AVR_HAVE_EIJMP_EICALL) +#define AVR_XMEGA (avr_current_arch->xmega_p) + #define BITS_BIG_ENDIAN 0 #define BYTES_BIG_ENDIAN 0 #define WORDS_BIG_ENDIAN 0 |