From 576ba35c2a288b7e5ac7b74237a9ac57cba75cd5 Mon Sep 17 00:00:00 2001 From: Pitchumani Sivanupandi Date: Sat, 5 Apr 2014 09:51:59 +0400 Subject: avr-arch.h (avr_mcu_t): Add dev_attribute field to have device specific ISA/ feature information. * config/avr/avr-arch.h (avr_mcu_t): Add dev_attribute field to have device specific ISA/ feature information. Remove short_sp and errata_skip ds. Add avr_device_specific_features enum to have device specific info. * config/avr/avr-c.c (avr_cpu_cpp_builtins): use dev_attribute to check errata_skip. Add __AVR_ISA_RMW__ builtin macro if RMW ISA available. * config/avr/avr-devices.c (avr_mcu_types): Update AVR_MCU macro for updated device specific info. * config/avr/avr-mcus.def: Merge device specific details to dev_attribute field. * config/avr/avr.c (avr_2word_insn_p): use dev_attribute field to check errata_skip. * config/avr/avr.h (AVR_HAVE_8BIT_SP): same for short sp info. * config/avr/driver-avr.c (avr_device_to_as): Pass -mrmw option to assembler if RMW isa supported by current device. * config/avr/genmultilib.awk: Update as device info structure changed. * doc/invoke.texi: Add info for __AVR_ISA_RMW__ builtin macro * gcc.target/avr/dev-specific-rmw.c: New test. From-SVN: r209141 --- gcc/config/avr/avr.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/config/avr/avr.h') diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 74be83c..78434ec 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -88,8 +88,9 @@ enum __AVR_HAVE_8BIT_SP__ and __AVR_HAVE_16BIT_SP__. During multilib generation there is always __AVR_SP8__ == __AVR_HAVE_8BIT_SP__. */ -#define AVR_HAVE_8BIT_SP \ - (avr_current_device->short_sp || TARGET_TINY_STACK || avr_sp8) +#define AVR_HAVE_8BIT_SP \ + ((avr_current_device->dev_attribute & AVR_SHORT_SP) || \ + TARGET_TINY_STACK || avr_sp8) #define AVR_HAVE_SPH (!avr_sp8) -- cgit v1.1