diff options
author | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-14 07:49:14 +0000 |
---|---|---|
committer | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-14 07:49:14 +0000 |
commit | 853000f290c8b1f2f903a858de1b98e22b3db326 (patch) | |
tree | 1c21566fb30d00cb79d178deb684bbba64e6424f /gcc | |
parent | 9b0fef97f18ed5c9f2f9a361262fbb450f2b0b53 (diff) | |
download | gcc-853000f290c8b1f2f903a858de1b98e22b3db326.tar.gz |
gcc/
PR target/43746
* config/avr/elf.h (TARGET_ASM_SELECT_SECTION): Remove,
i.e. use default_elf_select_section.
(TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Remove.
(READONLY_DATA_SECTION_ASM_OP): Remove.
(TARGET_ASM_NAMED_SECTION): Move from here...
* config/avr/avr.c: ...to here.
(avr_asm_init_sections): Set unnamed callback of
readonly_data_section.
(avr_asm_named_section): Make static.
testsuite/
PR target/43746
* gcc.dg/array-quals-1.c: Don't xfail on AVR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176262 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 11 | ||||
-rw-r--r-- | gcc/config/avr/elf.h | 12 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/array-quals-1.c | 2 |
5 files changed, 26 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c7b0dfc997..3cbc03c6330 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2011-07-14 Georg-Johann Lay <avr@gjlay.de> + + PR target/43746 + * config/avr/elf.h (TARGET_ASM_SELECT_SECTION): Remove, + i.e. use default_elf_select_section. + (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Remove. + (READONLY_DATA_SECTION_ASM_OP): Remove. + (TARGET_ASM_NAMED_SECTION): Move from here... + * config/avr/avr.c: ...to here. + (avr_asm_init_sections): Set unnamed callback of + readonly_data_section. + (avr_asm_named_section): Make static. + 2011-07-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR bootstrap/49739 diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 128706d6776..d535f330621 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -194,8 +194,8 @@ static const struct attribute_spec avr_attribute_table[] = #undef TARGET_SECTION_TYPE_FLAGS #define TARGET_SECTION_TYPE_FLAGS avr_section_type_flags -/* `TARGET_ASM_NAMED_SECTION' must be defined in avr.h. */ - +#undef TARGET_ASM_NAMED_SECTION +#define TARGET_ASM_NAMED_SECTION avr_asm_named_section #undef TARGET_ASM_INIT_SECTIONS #define TARGET_ASM_INIT_SECTIONS avr_asm_init_sections #undef TARGET_ENCODE_SECTION_INFO @@ -5091,8 +5091,11 @@ avr_asm_init_sections (void) progmem_section = get_unnamed_section (AVR_HAVE_JMP_CALL ? 0 : SECTION_CODE, avr_output_progmem_section_asm_op, NULL); - readonly_data_section = data_section; + /* Override section callbacks to keep track of `avr_need_clear_bss_p' + resp. `avr_need_copy_data_p'. */ + + readonly_data_section->unnamed.callback = avr_output_data_section_asm_op; data_section->unnamed.callback = avr_output_data_section_asm_op; bss_section->unnamed.callback = avr_output_bss_section_asm_op; } @@ -5101,7 +5104,7 @@ avr_asm_init_sections (void) /* Implement `TARGET_ASM_NAMED_SECTION'. */ /* Track need of __do_clear_bss, __do_copy_data for named sections. */ -void +static void avr_asm_named_section (const char *name, unsigned int flags, tree decl) { if (!avr_need_copy_data_p) diff --git a/gcc/config/avr/elf.h b/gcc/config/avr/elf.h index 9bbd32fd7b1..f360e882a96 100644 --- a/gcc/config/avr/elf.h +++ b/gcc/config/avr/elf.h @@ -26,24 +26,12 @@ #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG -#undef TARGET_ASM_NAMED_SECTION -#define TARGET_ASM_NAMED_SECTION avr_asm_named_section - -/* Use lame default: no string merging, ... */ -#undef TARGET_ASM_SELECT_SECTION -#define TARGET_ASM_SELECT_SECTION default_select_section - #undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT (32768 * 8) -#undef TARGET_HAVE_SWITCHABLE_BSS_SECTIONS - #undef STRING_LIMIT #define STRING_LIMIT ((unsigned) 64) -/* Setup `readonly_data_section' in `avr_asm_init_sections'. */ -#undef READONLY_DATA_SECTION_ASM_OP - /* Take care of `signal' and `interrupt' attributes. */ #undef ASM_DECLARE_FUNCTION_NAME #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a38c046e430..192c908505b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-07-14 Georg-Johann Lay <avr@gjlay.de> + + PR target/43746 + * gcc.dg/array-quals-1.c: Don't xfail on AVR. + 2011-07-13 Michael Meissner <meissner@linux.vnet.ibm.com> * gcc.target/powerpc/no-r11-1.c: Change -mno-r11 to diff --git a/gcc/testsuite/gcc.dg/array-quals-1.c b/gcc/testsuite/gcc.dg/array-quals-1.c index f01db686b45..17df9837817 100644 --- a/gcc/testsuite/gcc.dg/array-quals-1.c +++ b/gcc/testsuite/gcc.dg/array-quals-1.c @@ -4,7 +4,7 @@ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* { dg-do compile } */ /* The MMIX port always switches to the .data section at the end of a file. */ -/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* x86_64-*-mingw* picochip--*-* avr-*-*} } } */ +/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* x86_64-*-mingw* picochip--*-* } } } */ static const int a[2] = { 1, 2 }; const int a1[2] = { 1, 2 }; typedef const int ci; |