aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-10-06 16:26:22 +0000
committerNick Clifton <nickc@gcc.gnu.org>2015-10-06 16:26:22 +0000
commit90bc48789b8ca036a728396de3d26b6a2b6a60e8 (patch)
treecab0ca94b0c4571ec5452234d295d64177c9f136 /gcc/doc/extend.texi
parenteaec70cd8bb0d06d550878428a961a41e755f213 (diff)
downloadgcc-90bc48789b8ca036a728396de3d26b6a2b6a60e8.zip
gcc-90bc48789b8ca036a728396de3d26b6a2b6a60e8.tar.gz
gcc-90bc48789b8ca036a728396de3d26b6a2b6a60e8.tar.bz2
gcc * config/msp430/msp430.c (ATTR_NOINIT): New constant.
(ATTR_PERSIST): New constant. (msp430_data_attr): New function - verifies an attribute that only applies to variables. (msp430_attributes): Add noinit and persistent attributes. (noinit_section): New variable. (presis_section): New variable. (TARGET_ASM_INIT_SECTIONS): Define. (msp430_init_sections): New function - initialises the noinit and persist section variables. (msp430_select_section): Add support for noinit and persist attributes. (msp430_section_type_flags): Likewise. * doc/extend.texi: Document the reent, critical, wakeup, noinit and persistent attributes. tests * gcc.target/msp430: New directory. * gcc.target/msp430/msp430.exp: New file. Runs MSP430 specific tests. * gcc.target/msp430/data-attributes.c: New file. Checks the noinit and persistent data attributes. From-SVN: r228531
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi51
1 files changed, 51 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 2db7bb2..79440d3 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3319,6 +3319,24 @@ one pass over the objects and does the best that it can. Using the
options can help the packing however, since they produce smaller,
easier to pack regions.
+@item reentrant
+On the MSP430 a function can be given the @code{reentant} attribute.
+This makes the function disable interrupts upon entry and enable
+interrupts upon exit. Reentrant functions cannot be @code{naked}.
+
+@item critical
+On the MSP430 a function can be given the @code{critical} attribute.
+This makes the function disable interrupts upon entry and restore the
+previous interrupt enabled/disabled state upon exit. A function
+cannot have both the @code{reentrant} and @code{critical} attributes.
+Critical functions cannot be @code{naked}.
+
+@item wakeup
+On the MSP430 a function can be given the @code{wakeup} attribute.
+Such a function must also have the @code{interrupt} attribute. When a
+function with the @code{wakeup} attribute exists the processor will be
+woken up from any low-power state in which it may be residing.
+
@end table
@c This is the end of the target-independent attribute table
@@ -5264,6 +5282,7 @@ attributes.
* M32R/D Variable Attributes::
* MeP Variable Attributes::
* Microsoft Windows Variable Attributes::
+* MSP430 Variable Attributes::
* PowerPC Variable Attributes::
* SPU Variable Attributes::
* x86 Variable Attributes::
@@ -5854,6 +5873,38 @@ The @code{shared} attribute is only available on Microsoft Windows@.
@end table
+@node MSP430 Variable Attributes
+@subsection MSP430 Variable Attributes
+
+@table @code
+@item noinit
+@cindex @code{noinit} MSP430 variable attribute
+Any data with the @code{noinit} attribute will not be initialised by
+the C runtime startup code, or the program loader. Not initialising
+data in this way can reduce program startup times.
+
+@item persistent
+@cindex @code{persistent} MSP430 variable attribute
+Any variable with the @code{persistent} attribute will not be
+initialised by the C runtime startup code. Instead its value will be
+set once, when the application is loaded, and then never initialised
+again, even if the processor is reset or the program restarts.
+Persistent data is intended to be placed into FLASH RAM, where its
+value will be retained across resets. The linker script being used to
+create the application should ensure that persistent data is correctly
+placed.
+
+@item lower
+@itemx upper
+@itemx either
+@cindex @code{lower} memory region on the MSP430
+@cindex @code{upper} memory region on the MSP430
+@cindex @code{either} memory region on the MSP430
+These attributes are the same as the MSP430 function attributes of the
+same name. These attributes can be applied to both functions and
+variables.
+@end table
+
@node PowerPC Variable Attributes
@subsection PowerPC Variable Attributes