From 194c524aa2f34e1389c4ddd31b20eea15eae00bb Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Sun, 30 Apr 2006 19:23:13 +0000 Subject: [PATCH] rs6000.c (rs6000_override_options): Enable TARGET_NO_FP_IN_TOC for section anchors. * config/rs6000/rs6000.c (rs6000_override_options): Enable TARGET_NO_FP_IN_TOC for section anchors. (optimization_options): Enable section anchors for all non-"Objective" languages. From-SVN: r113395 --- gcc/ChangeLog | 7 +++++++ gcc/config/rs6000/rs6000.c | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8eca71bbc4f..49d96389628 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-04-30 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_override_options): Enable + TARGET_NO_FP_IN_TOC for section anchors. + (optimization_options): Enable section anchors for all + non-"Objective" languages. + 2006-04-28 Eric Christopher * config/darwin-c.c (darwin_ms_struct): Move this diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 0bb68109efa..53b10829cdd 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1350,6 +1350,11 @@ rs6000_override_options (const char *default_cpu) rs6000_alignment_flags = MASK_ALIGN_NATURAL; } + /* Place FP constants in the constant pool instead of TOC + if section anchors enabled. */ + if (flag_section_anchors) + TARGET_NO_FP_IN_TOC = 1; + /* Handle -mtls-size option. */ rs6000_parse_tls_size_option (); @@ -1621,6 +1626,12 @@ optimization_options (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED) /* Double growth factor to counter reduced min jump length. */ set_param_value ("max-grow-copy-bb-insns", 16); + + /* Enable section anchors by default. + Skip section anchors for Objective C and Objective C++ + until front-ends fixed. */ + if (lang_hooks.name[4] != 'O') + flag_section_anchors = 1; } /* Implement TARGET_HANDLE_OPTION. */ @@ -3452,7 +3463,7 @@ rs6000_legitimize_reload_address (rtx x, enum machine_mode mode, && constant_pool_expr_p (x) && ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (get_pool_constant (x), mode)) { - (x) = create_TOC_reference (x); + x = create_TOC_reference (x); *win = 1; return x; } -- 2.30.2