diff options
author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-28 03:57:05 +0000 |
---|---|---|
committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-28 03:57:05 +0000 |
commit | 47cc051e7c991a84e29496b385905d13fa488e1d (patch) | |
tree | 3515decec7ad63fba6dd25e7d8ccc9614454cd01 /gcc | |
parent | f3c0949b97e12737c78e810d8eacdd62c2e798aa (diff) | |
download | gcc-47cc051e7c991a84e29496b385905d13fa488e1d.tar.gz |
* doc/invoke.texi (powerpc msdata-data): Static data doesn't go in
small data sections.
* config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Make global.
* config/rs6000/rs6000-protos.h: (rs6000_elf_in_small_data_p): Declare.
* config/rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Rename to..
(ASM_OUTPUT_ALIGNED_DECL_LOCAL): ..this, adding extra parm. Don't
output locals to sbss if !rs6000_elf_in_small_data_p.
(ASM_OUTPUT_ALIGNED_BSS): Adjust for above.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107592 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 3 | ||||
-rw-r--r-- | gcc/config/rs6000/sysv4.h | 10 |
4 files changed, 17 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4c260bde14..a80979ea5e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,16 @@ 2005-11-28 Alan Modra <amodra@bigpond.net.au> + * doc/invoke.texi (powerpc msdata-data): Static data doesn't go in + small data sections. + * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Make global. + * config/rs6000/rs6000-protos.h: (rs6000_elf_in_small_data_p): Declare. + * config/rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Rename to.. + (ASM_OUTPUT_ALIGNED_DECL_LOCAL): ..this, adding extra parm. Don't + output locals to sbss if !rs6000_elf_in_small_data_p. + (ASM_OUTPUT_ALIGNED_BSS): Adjust for above. + +2005-11-28 Alan Modra <amodra@bigpond.net.au> + PR target/24997 * config/rs6000/rs6000.c (legitimate_indexed_address_p): Allow pattern generated by reload. diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index fe04d81f43e..65cb79d7cbf 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -123,6 +123,7 @@ extern rtx rs6000_libcall_value (enum machine_mode); extern rtx rs6000_va_arg (tree, tree); extern int function_ok_for_sibcall (tree); extern void rs6000_elf_declare_function_name (FILE *, const char *, tree); +extern bool rs6000_elf_in_small_data_p (tree); #ifdef ARGS_SIZE_RTX /* expr.h defines ARGS_SIZE_RTX and `enum direction' */ extern enum direction function_arg_padding (enum machine_mode, tree); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d013916a42e..8d5cd99b01e 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -615,7 +615,6 @@ static void rs6000_elf_select_rtx_section (enum machine_mode, rtx, unsigned HOST_WIDE_INT); static void rs6000_elf_encode_section_info (tree, rtx, int) ATTRIBUTE_UNUSED; -static bool rs6000_elf_in_small_data_p (tree); #endif #if TARGET_XCOFF static void rs6000_xcoff_asm_globalize_label (FILE *, const char *); @@ -17437,7 +17436,7 @@ rs6000_elf_encode_section_info (tree decl, rtx rtl, int first) } } -static bool +bool rs6000_elf_in_small_data_p (tree decl) { if (rs6000_sdata == SDATA_NONE) diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 238b497250f..30777762e48 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -550,12 +550,10 @@ extern int rs6000_pic_labelno; #define LCOMM_ASM_OP "\t.lcomm\t" -/* Override elfos.h definition. */ -#undef ASM_OUTPUT_ALIGNED_LOCAL -#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ +/* Describe how to emit uninitialized local items. */ +#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ - if (rs6000_sdata != SDATA_NONE && (SIZE) > 0 \ - && (SIZE) <= g_switch_value) \ + if ((DECL) && rs6000_elf_in_small_data_p (DECL)) \ { \ sbss_section (); \ ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \ @@ -577,7 +575,7 @@ do { \ /* Describe how to emit uninitialized external linkage items. */ #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ - ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \ + ASM_OUTPUT_ALIGNED_DECL_LOCAL (FILE, DECL, NAME, SIZE, ALIGN); \ } while (0) #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN |