aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-06-25 20:12:41 +0930
committerAlan Modra <amodra@gcc.gnu.org>2010-06-25 20:12:41 +0930
commit4c9d416e567100b2bd4cd935711e09985024c3fa (patch)
treed70e644a7ae7830550868ad54caea42e04e8420b /gcc
parent0b032f38aac55e2d85b2dfbdddd63b0eacc1834b (diff)
downloadgcc-4c9d416e567100b2bd4cd935711e09985024c3fa.zip
gcc-4c9d416e567100b2bd4cd935711e09985024c3fa.tar.gz
gcc-4c9d416e567100b2bd4cd935711e09985024c3fa.tar.bz2
invoke.texi: Delete mcmodel=medium from powerpc options.
* doc/invoke.texi: Delete mcmodel=medium from powerpc options. * config/rs6000/rs6000.h (enum rs6000_cmodel): Delete CMODEL_MEDIUM. * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Set CMODEL_LARGE as default. * config/rs6000/rs6000.c (rs6000_handle_option): Remove mcmodel=medium. (offsettable_ok_by_alignment): Delete. (rs6000_emit_move): Remove mcmodel=medium optimization. From-SVN: r161371
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/rs6000/linux64.h2
-rw-r--r--gcc/config/rs6000/rs6000.c47
-rw-r--r--gcc/config/rs6000/rs6000.h4
-rw-r--r--gcc/doc/invoke.texi5
5 files changed, 17 insertions, 51 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3dd8907..52583f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2010-06-25 Alan Modra <amodra@gmail.com>
+
+ * doc/invoke.texi: Delete mcmodel=medium from powerpc options.
+ * config/rs6000/rs6000.h (enum rs6000_cmodel): Delete CMODEL_MEDIUM.
+ * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Set
+ CMODEL_LARGE as default.
+ * config/rs6000/rs6000.c (rs6000_handle_option): Remove mcmodel=medium.
+ (offsettable_ok_by_alignment): Delete.
+ (rs6000_emit_move): Remove mcmodel=medium optimization.
+
2010-06-25 Bernd Schmidt <bernds@codesourcery.com>
With large parts from Jim Wilson:
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index c4e3651..900570f 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -134,7 +134,7 @@ extern enum rs6000_cmodel cmodel;
else \
{ \
if (!rs6000_explicit_options.cmodel) \
- SET_CMODEL (CMODEL_MEDIUM); \
+ SET_CMODEL (CMODEL_LARGE); \
if (cmodel != CMODEL_SMALL) \
{ \
TARGET_NO_FP_IN_TOC = 0; \
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 55dd0a6..485b077 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -3653,8 +3653,6 @@ rs6000_handle_option (size_t code, const char *arg, int value)
case OPT_mcmodel_:
if (strcmp (arg, "small") == 0)
cmodel = CMODEL_SMALL;
- else if (strcmp (arg, "medium") == 0)
- cmodel = CMODEL_MEDIUM;
else if (strcmp (arg, "large") == 0)
cmodel = CMODEL_LARGE;
else
@@ -6636,36 +6634,6 @@ rs6000_eliminate_indexed_memrefs (rtx operands[2])
copy_addr_to_reg (XEXP (operands[1], 0)));
}
-/* Return true if memory accesses to DECL are known to never straddle
- a 32k boundary. */
-
-static bool
-offsettable_ok_by_alignment (tree decl)
-{
- unsigned HOST_WIDE_INT dsize;
-
- /* Presume any compiler generated symbol_ref is suitably aligned. */
- if (!decl)
- return true;
-
- if (TREE_CODE (decl) != VAR_DECL
- && TREE_CODE (decl) != PARM_DECL
- && TREE_CODE (decl) != RESULT_DECL
- && TREE_CODE (decl) != FIELD_DECL)
- return true;
-
- if (!host_integerp (DECL_SIZE_UNIT (decl), 1))
- return false;
-
- dsize = tree_low_cst (DECL_SIZE_UNIT (decl), 1);
- if (dsize <= 1)
- return true;
- if (dsize > 32768)
- return false;
-
- return DECL_ALIGN_UNIT (decl) >= dsize;
-}
-
/* Emit a move from SOURCE to DEST in mode MODE. */
void
rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
@@ -6979,16 +6947,11 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
/* If this is a SYMBOL_REF that refers to a constant pool entry,
and we have put it in the TOC, we just need to make a TOC-relative
reference to it. */
- if ((TARGET_TOC
- && GET_CODE (operands[1]) == SYMBOL_REF
- && constant_pool_expr_p (operands[1])
- && ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (get_pool_constant (operands[1]),
- get_pool_mode (operands[1])))
- || (TARGET_CMODEL == CMODEL_MEDIUM
- && GET_CODE (operands[1]) == SYMBOL_REF
- && !CONSTANT_POOL_ADDRESS_P (operands[1])
- && SYMBOL_REF_LOCAL_P (operands[1])
- && offsettable_ok_by_alignment (SYMBOL_REF_DECL (operands[1]))))
+ if (TARGET_TOC
+ && GET_CODE (operands[1]) == SYMBOL_REF
+ && constant_pool_expr_p (operands[1])
+ && ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (get_pool_constant (operands[1]),
+ get_pool_mode (operands[1])))
{
rtx reg = NULL_RTX;
if (TARGET_CMODEL != CMODEL_SMALL)
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index cd7b928..a6248ec 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -295,11 +295,9 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
/* Code model for 64-bit linux.
small: 16-bit toc offsets.
- medium: 32-bit toc offsets, static data and code within 2G of TOC pointer.
- large: 32-bit toc offsets, no limit on static data and code. */
+ large: 32-bit toc offsets. */
enum rs6000_cmodel {
CMODEL_SMALL,
- CMODEL_MEDIUM,
CMODEL_LARGE
};
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 7aa4e51..d132ee8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -14987,11 +14987,6 @@ scheduling parameters set by @option{-mtune}.
Generate PowerPC64 code for the small model: The TOC is limited to
64k.
-@item -mcmodel=medium
-@opindex mcmodel=medium
-Generate PowerPC64 code for the medium model: The TOC and other static
-data may be up to a total of 4G in size.
-
@item -mcmodel=large
@opindex mcmodel=large
Generate PowerPC64 code for the large model: The TOC may be up to 4G