summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorgjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-24 11:02:51 +0000
committergjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-24 11:02:51 +0000
commit2cd66116afe4a74474f7b628c9cd17fee50c8453 (patch)
treeb7c4975fab294b75e604f23f0d4cc6a39addca46 /gcc/doc
parentdfa8b1b6ed3f68c4c6e6736180a0cf620900fb7e (diff)
downloadgcc-2cd66116afe4a74474f7b628c9cd17fee50c8453.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241468 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 62a5f2963db..0669f7999be 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -5973,6 +5973,33 @@ memory-mapped peripherals that may lie outside the io address range.
volatile int porta __attribute__((address (0x600)));
@end smallexample
+@item absdata
+@cindex @code{absdata} variable attribute, AVR
+Variables in static storage and with the @code{absdata} attribute can
+be accessed by the @code{LDS} and @code{STS} instructions which take
+absolute addresses.
+
+@itemize @bullet
+@item
+This attribute is only supported for the reduced AVR Tiny core
+like ATtiny40.
+
+@item
+You must make sure that respective data is located in the
+address range @code{0x40}@dots{}@code{0xbf} accessible by
+@code{LDS} and @code{STS}. One way to achieve this as an
+appropriate linker description file.
+
+@item
+If the location does not fit the address range of @code{LDS}
+and @code{STS}, there is currently (Binutils 2.26) just an unspecific
+warning like
+@quotation
+@code{module.c:(.text+0x1c): warning: internal error: out of range error}
+@end quotation
+
+@end itemize
+
@end table
@node Blackfin Variable Attributes