[Bug target/81072] [avr] Support some XMEGA devices with flash seen in RAM address space.

2017-07-05 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81072

--- Comment #4 from Georg-Johann Lay  ---
Author: gjl
Date: Wed Jul  5 13:57:28 2017
New Revision: 25

URL: https://gcc.gnu.org/viewcvs?rev=25=gcc=rev
Log:
gcc/
Graceful degrade if Binutils PR21472 is not available.
PR target/81072
* configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
.rodata in flash test fails.
(HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
* confgure: Regenerate.
* config.in: Regenerate.
* config/avr/avr.c (avr_asm_named_section)
[HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
__do_copy_data for stuff in .rodata if flash_pm_offset = 0.
(avr_asm_init_sections): Same.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.in
trunk/gcc/config/avr/avr.c
trunk/gcc/configure
trunk/gcc/configure.ac

[Bug target/81072] [avr] Support some XMEGA devices with flash seen in RAM address space.

2017-06-13 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81072

--- Comment #3 from Georg-Johann Lay  ---
Author: gjl
Date: Tue Jun 13 08:25:07 2017
New Revision: 249146

URL: https://gcc.gnu.org/viewcvs?rev=249146=gcc=rev
Log:
PR target/81072
* config/avr/avr-devices.c: Fix indentation.
* config/avr/gen-avr-mmcu-specs.c: Dito.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr-devices.c
trunk/gcc/config/avr/gen-avr-mmcu-specs.c

[Bug target/81072] [avr] Support some XMEGA devices with flash seen in RAM address space.

2017-06-12 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81072

Georg-Johann Lay  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug target/81072] [avr] Support some XMEGA devices with flash seen in RAM address space.

2017-06-12 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81072

Georg-Johann Lay  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Georg-Johann Lay  ---
Added in v8 and will need

https://sourceware.org/bugzilla/show_bug.cgi?id=21472

for configure to pass.

[Bug target/81072] [avr] Support some XMEGA devices with flash seen in RAM address space.

2017-06-12 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81072

--- Comment #1 from Georg-Johann Lay  ---
Author: gjl
Date: Mon Jun 12 12:52:30 2017
New Revision: 249124

URL: https://gcc.gnu.org/viewcvs?rev=249124=gcc=rev
Log:
gcc/
Support multilibs and devices that see flash in RAM address range.

PR target/81072
* config/avr/avr-arch.h (avr_arch_id) : New enum.
(avr_mcu_t) : New field.
(avr_device_specific_features) : New enum.
* config/avr/avr.h (AVR_SHORT_CALLS): New define.
(AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
(AVR_TINY_PM_OFFSET): Remove macro.
* config/avr/avr.opt (-mshort-calls): New option.
* config/avr/gen-avr-mmcu-specs.c (print_mcu)
[*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
* config/avr/avr-c.c (avr_cpu_cpp_builtins)
<__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
<__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
instead of avr_arch->have_jmp_call.
<__AVR_PM_BASE_ADDRESS__>: Built-in define if
avr_arch->flash_pm_offset.
[AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
avr_arch->flash_pm_offset to define.
* config/avr/avr-devices.c (avr_arch_types): Add initializers for
new field flash_pm_offset.  Add entry for avrxmega3.
(avr_texinfo): Add entry for avrxmega3.
* config/avr/avr-mcus.def: Add entries for: avrxmega3,
attiny212, attiny214,
attiny412, attiny414, attiny416, attiny417,
attiny814, attiny816, attiny817,
attiny1614, attiny1616, attiny1617,
attiny3214, attiny3216, attiny3217.
* config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
(avr_print_operand_address) [AVR_TINY]: Same.
(avr_asm_init_sections) : Only patch
callback if avr_arch->flash_pm_offset = 0.
(avr_asm_named_section) : Skip setting it
for rodata if avr_arch->flash_pm_offset != 0.
(avr_encode_section_info) [AVR_TINY]: Adjust comment.
* config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
(opts) [AVR_ISA_RCALL]: Append opt_rcall.
(m_options): Append opt_rcall.
(m_dirnames): Append dir_rcall.
* config/avr/t-multilib: Regenerate.
* configure.ac [target=avr]: Check whether avrxmega3 default
linker description file works as needed.
* configure: Regenerate.
* doc/avr-mmcu.texi: Regenerate.
* doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
<__AVR_ARCH__>: Document avrxmega3 and 103.
<__AVR_HAVE_JMP_CALL__>: Adjust documentation.
<__AVR_SHORT_CALLS__>: Document it.
<__AVR_PM_BASE_ADDRESS__>: Document it.
* doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
(AVR Variable Attributes) : Document this is
not needed for avrxmega3.
(AVR Named Address Spaces) <__flash>: Dito.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr-arch.h
trunk/gcc/config/avr/avr-c.c
trunk/gcc/config/avr/avr-devices.c
trunk/gcc/config/avr/avr-mcus.def
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h
trunk/gcc/config/avr/avr.opt
trunk/gcc/config/avr/gen-avr-mmcu-specs.c
trunk/gcc/config/avr/genmultilib.awk
trunk/gcc/config/avr/t-multilib
trunk/gcc/configure
trunk/gcc/configure.ac
trunk/gcc/doc/avr-mmcu.texi
trunk/gcc/doc/extend.texi
trunk/gcc/doc/invoke.texi

[Bug target/81072] [avr] Support some XMEGA devices with flash seen in RAM address space.

2017-06-12 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81072

Georg-Johann Lay  changed:

   What|Removed |Added

 Target||avr
   Priority|P3  |P4
   Assignee|unassigned at gcc dot gnu.org  |gjl at gcc dot gnu.org