This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,avr] Add new option -mabsdata.
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Denis Chertykov <chertykov at gmail dot com>, Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>, Pitchumani Sivanupandi <pitchumani dot sivanupandi at microchip dot com>
- Date: Mon, 7 Nov 2016 14:03:36 +0100
- Subject: Re: [patch,avr] Add new option -mabsdata.
- Authentication-results: sourceware.org; auth=none
- References: <ddf84c3a-48f0-71f6-b746-69fb43a8c68a@gjlay.de>
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.