diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2016-10-24 11:02:51 +0000 |
---|---|---|
committer | Georg-Johann Lay <gjl@gcc.gnu.org> | 2016-10-24 11:02:51 +0000 |
commit | b1b6774f67ee3760778596db91bbe5a6ce73a172 (patch) | |
tree | b7c4975fab294b75e604f23f0d4cc6a39addca46 /gcc/testsuite/lib | |
parent | 06d1ff9050a32a7dda55e1905de3d4fd6eb76452 (diff) | |
download | gcc-b1b6774f67ee3760778596db91bbe5a6ce73a172.zip gcc-b1b6774f67ee3760778596db91bbe5a6ce73a172.tar.gz gcc-b1b6774f67ee3760778596db91bbe5a6ce73a172.tar.bz2 |
re PR target/78093 ([avr] New variable attribute "absdata" and option "-mabsdata" to enable LDS / STS on Reduced Tiny)
gcc/
PR target/78093
* doc/extend.texi (AVR Variable Attributes) [absdata]: Document it.
* config/avr/avr.c (AVR_SYMBOL_FLAG_TINY_ABSDATA): New macro.
(avr_address_tiny_absdata_p): New static function.
(avr_legitimate_address_p, avr_legitimize_address) [AVR_TINY]: Use
it to determine validity of constant addresses.
(avr_attribute_table) [absdata]: New variable attribute...
(avr_handle_absdata_attribute): ...and handler.
(avr_decl_absdata_p): New static function.
(avr_encode_section_info) [AVR_TINY]: Use it to add flag
AVR_SYMBOL_FLAG_TINY_ABSDATA to respective symbols_refs.
(avr_address_cost) [AVR_TINY]: absdata addresses cost 2.
gcc/testsuite/
PR target/78093
* lib/target-supports.exp (check_effective_target_avr_tiny): New proc.
* gcc.target/avr/torture/tiny-absdata-1.c: New test.
From-SVN: r241468
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2394ac4..b5a9faa 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -7784,6 +7784,24 @@ proc check_effective_target_aarch64_large { } { } } + +# Return 1 if this is a reduced AVR Tiny core. Such cores have different +# register set, instruction set, addressing capabilities and ABI. + +proc check_effective_target_avr_tiny { } { + if { [istarget avr*-*-*] } { + return [check_no_compiler_messages avr_tiny object { + #ifdef __AVR_TINY__ + int dummy; + #else + #error target not a reduced AVR Tiny core + #endif + }] + } else { + return 0 + } +} + # Return 1 if <fenv.h> is available with all the standard IEEE # exceptions and floating-point exceptions are raised by arithmetic # operations. (If the target requires special options for "inexact" |