aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2003-05-02 18:32:49 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2003-05-02 18:32:49 +0000
commit20bfcd69246d50a2457e4f05ce41879beaef614d (patch)
tree906721cefa276fb5d223aed3f169373c84013c64 /gcc
parent7454096f706828364fc50756a67df3a6269482ac (diff)
downloadgcc-20bfcd69246d50a2457e4f05ce41879beaef614d.zip
gcc-20bfcd69246d50a2457e4f05ce41879beaef614d.tar.gz
gcc-20bfcd69246d50a2457e4f05ce41879beaef614d.tar.bz2
sysv4.h (SYMBOL_FLAG_SMALL_V4): Delete.
* config/rs6000/sysv4.h (SYMBOL_FLAG_SMALL_V4): Delete. (SYMBOL_FLAG_SMALL_V4): Delete. * config/rs6000/rs6000.c (small_data_operand): Use SYMBOL_REF_SMALL_P. (rs6000_elf_encode_section_info): Don't set SYMBOL_FLAG_SMALL_V4. (rs6000_elf_in_small_data_p): Add extra section names. Add comment about TREE_PUBLIC test. From-SVN: r66393
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/rs6000/rs6000.c39
-rw-r--r--gcc/config/rs6000/sysv4.h6
3 files changed, 14 insertions, 38 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 88e3f7d..6b86913 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2003-05-02 Geoffrey Keating <geoffk@apple.com>
+ * config/rs6000/sysv4.h (SYMBOL_FLAG_SMALL_V4): Delete.
+ (SYMBOL_FLAG_SMALL_V4): Delete.
+ * config/rs6000/rs6000.c (small_data_operand): Use SYMBOL_REF_SMALL_P.
+ (rs6000_elf_encode_section_info): Don't set SYMBOL_FLAG_SMALL_V4.
+ (rs6000_elf_in_small_data_p): Add extra section names. Add
+ comment about TREE_PUBLIC test.
+
* c-semantics.c (genrtl_switch_stmt, genrtl_if_stmt): Call
expand_stmt on result of expand_unreachable_stmt.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 3ef0a68..c63e406 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -2210,7 +2210,7 @@ small_data_operand (op, mode)
sym_ref = XEXP (sum, 0);
}
- return SYMBOL_REF_SMALL_V4_P (sym_ref);
+ return SYMBOL_REF_SMALL_P (sym_ref);
#else
return 0;
#endif
@@ -12926,9 +12926,6 @@ rs6000_elf_unique_section (decl, reloc)
/* For a SYMBOL_REF, set generic flags and then perform some
target-specific processing.
- Set SYMBOL_FLAG_SMALL_V4 for an operand in small memory on V.4/eabi;
- this is different from the generic SYMBOL_FLAG_SMALL.
-
When the AIX ABI is requested on a non-AIX system, replace the
function name with the real name (with a leading .) rather than the
function descriptor name. This saves a lot of overriding code to
@@ -12954,33 +12951,6 @@ rs6000_elf_encode_section_info (decl, rtl, first)
memcpy (str + 1, XSTR (sym_ref, 0), len + 1);
XSTR (sym_ref, 0) = ggc_alloc_string (str, len + 1);
}
- else if (rs6000_sdata != SDATA_NONE
- && DEFAULT_ABI == ABI_V4
- && TREE_CODE (decl) == VAR_DECL)
- {
- rtx sym_ref = XEXP (rtl, 0);
- int size = int_size_in_bytes (TREE_TYPE (decl));
- tree section_name = DECL_SECTION_NAME (decl);
- const char *name = (char *)0;
-
- if (section_name)
- {
- if (TREE_CODE (section_name) == STRING_CST)
- name = TREE_STRING_POINTER (section_name);
- else
- abort ();
- }
-
- if (name
- ? (strcmp (name, ".sdata") == 0
- || strcmp (name, ".sdata2") == 0
- || strcmp (name, ".sbss") == 0
- || strcmp (name, ".sbss2") == 0
- || strcmp (name, ".PPC.EMB.sdata0") == 0
- || strcmp (name, ".PPC.EMB.sbss0") == 0)
- : (size > 0 && size <= g_switch_value))
- SYMBOL_REF_FLAGS (sym_ref) |= SYMBOL_FLAG_SMALL_V4;
- }
}
static bool
@@ -12995,7 +12965,10 @@ rs6000_elf_in_small_data_p (decl)
const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (decl));
if (strcmp (section, ".sdata") == 0
|| strcmp (section, ".sdata2") == 0
- || strcmp (section, ".sbss") == 0)
+ || strcmp (section, ".sbss") == 0
+ || strcmp (section, ".sbss2") == 0
+ || strcmp (section, ".PPC.EMB.sdata0") == 0
+ || strcmp (section, ".PPC.EMB.sbss0") == 0)
return true;
}
else
@@ -13004,6 +12977,8 @@ rs6000_elf_in_small_data_p (decl)
if (size > 0
&& size <= g_switch_value
+ /* If it's not public, and we're not going to reference it there,
+ there's no need to put it in the small data section. */
&& (rs6000_sdata != SDATA_DATA || TREE_PUBLIC (decl)))
return true;
}
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 8fd4f45..69c86ec 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -1374,9 +1374,3 @@ ncrtn.o%s"
/* Generate entries in .fixup for relocatable addresses. */
#define RELOCATABLE_NEEDS_FIXUP
-
-/* Define target-specific symbol_ref flags, beginning with
- SYMBOL_REF_FLAG_DEP. */
-#define SYMBOL_FLAG_SMALL_V4 (SYMBOL_FLAG_MACH_DEP << 0)
-#define SYMBOL_REF_SMALL_V4_P(RTX) \
- ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_SMALL_V4) != 0)