aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr/specs.h
AgeCommit message (Collapse)AuthorFilesLines
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-07-10Better ISR prologues by supporting GASes __gcc_isr pseudo insn.Georg-Johann Lay1-0/+1
gcc/ Better ISR prologues by supporting GASes __gcc_isr pseudo insn. PR target/20296 PR target/81268 * configure.ac [target=avr]: Add GAS check for -mgcc-isr. (HAVE_AS_AVR_MGCCISR_OPTION): If so, AC_DEFINE it. * config.in: Regenerate. * configure: Regenerate. * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it. * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it. * config/avr/avr.opt (-mgas-isr-prologues): New option and... (TARGET_GASISR_PROLOGUES): ...target mask. * common/config/avr/avr-common.c (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]: Set -mgas-isr-prologues. * config/avr/avr-passes.def (avr_pass_pre_proep): Add INSERT_PASS_BEFORE for it. * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto. * config/avr/avr.c (avr_option_override) [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES. (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions. (avr_attribute_table) <no_gccisr>: Add new function attribute. (avr_set_current_function) <is_no_gccisr>: Init machine field. (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data and rtl_opt_pass. (make_avr_pass_pre_proep): New function. (emit_push_sfr) <treg>: Add argument to function and use it instead of TMP_REG. (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn and set machine->gasisr.yes. (avr_expand_epilogue) [machine->gasisr.yes]: Similar. (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add __gcc_isr.n_pushed to .L__stack_usage. (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to... (avr_asm_final_postscan_insn): ...this new static function. * config/avr/avr.h (machine_function) <is_no_gccisr, use_L__stack_usage>: New fields. <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields. * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum. (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants. (gasisr, *gasisr): New expander and insn. * config/avr/gen-avr-mmcu-specs.c (print_mcu) [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec. * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec. From-SVN: r250093
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-11-30Commit files forgotten in r242966.Pitchumani Sivanupandi1-1/+2
2016-11-30 Pitchumani Sivanupandi <pitchumani.sivanupandi@microchip.com> Commit files forgotten in r242966. * config/avr/avr-arch.h (avr_mcu_t) [flash_size]: New member. * config/avr/avr-devices.c (avr_mcu_types): Add flash size info. * config/avr/gen-avr-mmcu-specs.c (print_mcu): Remove hard-coded prefix check to find wrap-around value, instead use MCU flash size. For 8k flash devices, update link_pmem_wrap spec string to add --pmem-wrap-around=8k. * config/avr/specs.h (LINK_RELAX_SPEC): Move link_pmem_wrap from here... (LINK_SPEC): ...to here. From-SVN: r243033
2016-11-14re PR target/78093 ([avr] New variable attribute "absdata" and option ↵Georg-Johann Lay1-1/+2
"-mabsdata" to enable LDS / STS on Reduced Tiny) gcc/ PR target/78093 * doc/invoke.texi (AVR Options) [-mabsdata]: Document new option. * config/avr/avr.opt (-mabsdata): New option. * config/avr/avr-arch.h (avr_device_specific_features): Add AVR_ISA_LDS. * config/avr/avr.c (avr_encode_section_info) [AVR_TINY]: If -mabsdata & symbol is not progmem, tag as AVR_SYMBOL_FLAG_TINY_ABSDATA. * config/avr/avr-mcus.def (attiny4/5/9/10/20): Use AVR_ISA_LDS. * config/avr/gen-avr-mmcu-specs.c (print_mcu): Print cc1_absdata spec depending on AVR_ISA_LDS. * config/avr/specs.h (CC1_SPEC): Enhanced by cc1_absdata spec. gcc/testsuite/ PR target/78093 * gcc.target/avr/torture/tiny-absdata-2.c: New test. From-SVN: r242379
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-03-17re PR target/65296 ([avr] fix various issues with specs file generation)Georg-Johann Lay1-2/+2
PR target/65296 * config/avr/avr.opt (-nodevicelib): New option. * doc/invoke.texi (AVR Options): Document it. * config/avr/avrlibc.h (LIB_SPEC, LIBGCC_SPEC) [avr1]: Don't link libgcc.a, libc.a, libm.a. * config/avr/specs.h: Same. * config/avr/gen-avr-mmcu-specs.c (print_mcu): Don't print specs which don't (directly) depend on the device. Print more help. (*avrlibc_devicelib) [-nodevicelib]: Don't link libdev.a. (*cpp): Don't define __AVR_DEV_LIB_NAME__. * config/avr/driver-avr.c: Remove -nodevicelib from option list in case of an error. (avr_devicespecs_file): Use suffix "%s" instead of absolute path for specs file name. * config/avr/avr-arch.h (avr_mcu_t) [.library_name]: Remove. * config/avr/avr-mcus.def: Adjust initializers and comments. From-SVN: r221475
2015-03-10re PR target/65296 ([avr] fix various issues with specs file generation)Georg-Johann Lay1-0/+77
PR target/65296 * config.gcc (extra_options) [avr]: Remove. (extra_gcc_objs) [avr]: Use driver-avr.o, avr-devices.o. (tm_file) [avr]: Add avr/specs.h after avr/avr.h. (tm_defines) [avr-*-rtems*]: Add WITH_RTEMS. * config/avr/avr.opt (config/avr/avr-arch.h): Remove include. (-mmcu=): Add Var and MissingArgError properties. (-march=): Remove. * config/avr/genmultilib.awk: Use -mmcu= instead of -march=. * config/avr/t-multilib: Regenerate. * config/avr/specs.h: New file. * config/avr/driver-avr.c: New file. * config/avr/genopt.sh: Remove file. * config/avr/avr-tables.opt: Remove file. * config/avr/predicates.md (avr_current_arch): Rename to avr_arch. * config/avr/avr-c.c: Same. * avr-arch.h: Same. (avr_current_device): Remove proto. * config/avr/avr.h (avr_current_arch): Rename to avr_arch. (AVR_HAVE_8BIT_SP): Don't depend on avr_current_device. (EXTRA_SPEC_FUNCTIONS): Define. (avr_devicespecs_file): New specs function proto. (DRIVER_SELF_SPECS): Use device-specs-file spec function. * config/avr/avr.c (avr_current_arch): Rename to avr_arch. (avr_current_device): Remove definition and usage. (avr_set_core_architecture): New static function. (avr_option_override): Use it. * config/avr/avr-devices.c (diagnostic.h, avr-arch.h): Include them. (mcu_name): New static array. (comparator, avr_archs_str, avr_mcus_str): New static functions. (avr_inform_devices, avr_inform_core_architectures): New functions. * config/avr/gen-avr-mmcu-specs.c (avr-arch.h, specs.h): Include. (avrlibc.h) [WITH_AVRLIBC]: Include. (../rtems.h, rtems.h) [WITH_RTEMS]: Include. (print_mcu): Rewrite from scratch. * config/avr/avrlibc.h (LIB_SPEC, LIBGCC_SPEC, STARTFILE_SPEC): Forward to avr-specific specs defined in device-specs file. * config/avr/t-avr (driver-avr.o): New rule. (avr-devices.o): Depend on avr-arch.h. (avr-mcus): No more depend on avr-tables.opt. (avr-tables.opt): Remove rule. (install-device-specs): Use INSTALL_DATA, not INSTALL_PROGRAM. From-SVN: r221316