On Friday 09 June 2017 03:59 PM, Georg-Johann Lay wrote:
Hi,

This patch adds support for devices that can access flash memory
by LD* instructions, hence there is no need to put .rodata in RAM.

The default linker script for the new multilib versions already
supports this feature, it's similar to avrtiny, cf.

https://sourceware.org/PR21472

This patch does the following:

* Add multilib variants avrxmega3 and avrxmega3/short-calls.

* Add new option -mshort-calls for multilib selection between
  devices with <= 8KiB flash and > 8KiB flash.

* Add specs handling for -mshort-calls:  The compiler knows
  if this option is needed or not appropriate (similar to -msp8).

* Add new ISA feature AVR_ISA_RCALL for multilib selection
  via -mshort-calls.

* Add a new row to architecture description that contains the
  start address of flash memory in the RAM address range.
  (The actual value is not needed).

* For devices with flash in RAM space, don't let .rodata
  objects trigger need for __do_copy_data.

* Add some devices.

* Add configure test for Binutils PR21472.

* Adjust documentation etc.

Even the smaller devices with flash <= 8KiB support JMP+CALL,
but we get better code by assuming RJMP+RCALL:  Jump tables
are more efficient and insn length computation is more exact
(CALL -> RCALL relaxation would need -mrelax and insn size
would still be 4 bytes).

Moreover, avr-libc uses __AVR_HAVE_JMP_CALL__ to determine
vector entry size, and libgcc uses that macro for flash size
estimation.
Hi Johann,

+  AVR_ISA_RCALL   = 0x10 /* Use RJMP / RCALL even though RJMP / RCALL
+                            are available (-mshort-calls).  */

I think you meant "even though JMP/ CALL are avariable".

+AVR_MCU ("attiny817",        ARCH_AVRXMEGA3, AVR_ISA_RCALL, 
"__AVR_ATtiny817__",   0x3e00, 0x0, 0x2000)
+AVR_MCU ("attiny1616",       ARCH_AVRXMEGA3, AVR_ISA_NONE,  
"__AVR_ATtiny1616__",  0x3800, 0x0, 0x4000)

Add attiny1614 device.
AVR_MCU ("attiny1614",       ARCH_AVRXMEGA3, AVR_ISA_NONE,  
"__AVR_ATtiny1614__",  0x3800, 0x0, 0x4000)

Regards,
Pitchumani

Reply via email to