This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch,avr] Add new option -mabsdata.


On 07.11.2016 13:54, Georg-Johann Lay wrote:
This patch adds a new command line option -mabsdata which can be ised to set
attribute absdata for all data in static storage so it can be accessed by LDS
and STS instructions.

This is only useful for some reduced Tiny devices like ATtiny40.

For other reduced Tiny where all of SRAM fits LDS / STS, the new option is
automatically set by the device specs file.

For ordinary devices the option is accepted but has no effect.

Ok for trunk?

Johann


gcc/
    PR target/78093
    * doc/invoke.texi (AVR Options) [-mabsdata]: Document new option.
    * config/avr/avr.opt (-mabsdata): New option.
    * 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.

Here is the complete lag entry (avr-arch.h was missing):

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]