aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr/driver-avr.c
diff options
context:
space:
mode:
authorPitchumani Sivanupandi <pitchumani.s@atmel.com>2014-04-05 09:51:59 +0400
committerDenis Chertykov <denisc@gcc.gnu.org>2014-04-05 09:51:59 +0400
commit576ba35c2a288b7e5ac7b74237a9ac57cba75cd5 (patch)
tree6e7a211179a89dbdd6aa090f3a144347029c7a11 /gcc/config/avr/driver-avr.c
parentebc047a210e17c5facf31ff11eddaac9db4d4a95 (diff)
downloadgcc-576ba35c2a288b7e5ac7b74237a9ac57cba75cd5.zip
gcc-576ba35c2a288b7e5ac7b74237a9ac57cba75cd5.tar.gz
gcc-576ba35c2a288b7e5ac7b74237a9ac57cba75cd5.tar.bz2
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
Diffstat (limited to 'gcc/config/avr/driver-avr.c')
-rw-r--r--gcc/config/avr/driver-avr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/avr/driver-avr.c b/gcc/config/avr/driver-avr.c
index cb5dd1d..76c8b39 100644
--- a/gcc/config/avr/driver-avr.c
+++ b/gcc/config/avr/driver-avr.c
@@ -59,8 +59,8 @@ avr_device_to_as (int argc, const char **argv)
avr_set_current_device (argv[0]);
return concat ("-mmcu=", avr_current_arch->arch_name,
- avr_current_device->errata_skip ? "" : " -mno-skip-bug",
- NULL);
+ avr_current_device->dev_attribute & AVR_ERRATA_SKIP ? "" : " -mno-skip-bug",
+ avr_current_device->dev_attribute & AVR_ISA_RMW ? " -mrmw" : "", NULL);
}
/* Returns command line parameters to pass to ld. */
@@ -144,7 +144,7 @@ avr_device_to_sp8 (int argc, const char **argv)
|| avr_current_device->arch == ARCH_AVR25))
return "";
- return avr_current_device->short_sp
+ return (avr_current_device->dev_attribute & AVR_SHORT_SP)
? "-msp8"
: "%<msp8";
}