+2002-05-25 Marek Michalkiewicz <marekm@amelek.gda.pl>
+
+ * config/avr/avr.c (avr_handle_progmem_attribute): Handle TYPE_DECL.
+
+ * config/avr/avr.h (BSS_SECTION_ASM_OP, ASM_OUTPUT_BSS): New.
+
2002-05-25 Gabriel Dos Reis <gdr@codesourcery.com>
* toplev.c (output_clean_symbol_name): Fix another thinko. Gosh.
{
if (DECL_P (*node))
{
- if (TREE_STATIC (*node) || DECL_EXTERNAL (*node))
+ if (TREE_CODE (*node) == TYPE_DECL)
+ {
+ /* This is really a decl attribute, not a type attribute,
+ but try to handle it for GCC 3.0 backwards compatibility. */
+
+ tree type = TREE_TYPE (*node);
+ tree attr = tree_cons (name, args, TYPE_ATTRIBUTES (type));
+ tree newtype = build_type_attribute_variant (type, attr);
+
+ TYPE_MAIN_VARIANT (newtype) = TYPE_MAIN_VARIANT (type);
+ TREE_TYPE (*node) = newtype;
+ *no_add_attrs = true;
+ }
+ else if (TREE_STATIC (*node) || DECL_EXTERNAL (*node))
{
if (DECL_INITIAL (*node) == NULL_TREE && !DECL_EXTERNAL (*node))
{
operation to identify the following data as writable initialized
data. Normally `"\t.data"' is right. */
+#define BSS_SECTION_ASM_OP "\t.section .bss"
+/* If defined, a C expression whose value is a string, including
+ spacing, containing the assembler operation to identify the
+ following data as uninitialized global data. If not defined, and
+ neither `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined,
+ uninitialized global data will be output in the data section if
+ `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be
+ used. */
+
#define EXTRA_SECTIONS in_progmem
/* A list of names for sections other than the standard two, which are
`in_text' and `in_data'. You need not define this macro on a
This macro controls how the assembler definitions of uninitialized
common global variables are output. */
+#define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED) \
+ asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED))
+/* A C statement (sans semicolon) to output to the stdio stream
+ STREAM the assembler definition of uninitialized global DECL named
+ NAME whose size is SIZE bytes. The variable ROUNDED is the size
+ rounded up to whatever alignment the caller wants. */
+
#define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \
do { \
fputs ("\t.lcomm ", (STREAM)); \