aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2011-12-23 01:53:13 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2011-12-23 01:53:13 +0000
commit57d138a946002b7d49af7e287abbe4efa2fa7492 (patch)
tree685e9057867b62ad618b3c95d29a4908bd17da09 /gcc
parent2ae90de6655ff7fa87a4ac94e155e3bfd83fe78c (diff)
downloadgcc-57d138a946002b7d49af7e287abbe4efa2fa7492.zip
gcc-57d138a946002b7d49af7e287abbe4efa2fa7492.tar.gz
gcc-57d138a946002b7d49af7e287abbe4efa2fa7492.tar.bz2
re PR middle-end/51252 (FAIL: c-c++-common/tm/freq.c (internal compiler error))
PR middle-end/51252 * config/pa/pa.c (pa_som_tm_clone_table_section): New function. (som_tm_clone_table_section): Declare. (pa_file_start_space): Create $TM_CLONE_TABLE$ subspace. (pa_som_asm_init_sections): Init som_tm_clone_table_section. * config/pa/som.h (TARGET_ASM_TM_CLONE_TABLE_SECTION): Define. From-SVN: r182646
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/pa/pa.c25
-rw-r--r--gcc/config/pa/som.h2
3 files changed, 32 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 711e39a..ae8cad3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2011-12-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR middle-end/51252
+ * config/pa/pa.c (pa_som_tm_clone_table_section): New function.
+ (som_tm_clone_table_section): Declare.
+ (pa_file_start_space): Create $TM_CLONE_TABLE$ subspace.
+ (pa_som_asm_init_sections): Init som_tm_clone_table_section.
+ * config/pa/som.h (TARGET_ASM_TM_CLONE_TABLE_SECTION): Define.
+
2011-12-22 Richard Sandiford <rdsandiford@googlemail.com>
* doc/tm.texi.in (TARGET_PREPARE_PCH_SAVE): New hook.
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 134f1f8..9b1a657 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -118,6 +118,7 @@ static int pa_adjust_cost (rtx, rtx, rtx, int);
static int pa_adjust_priority (rtx, int);
static int pa_issue_rate (void);
static void pa_som_asm_init_sections (void) ATTRIBUTE_UNUSED;
+static section *pa_som_tm_clone_table_section (void) ATTRIBUTE_UNUSED;
static section *pa_select_section (tree, int, unsigned HOST_WIDE_INT)
ATTRIBUTE_UNUSED;
static void pa_encode_section_info (tree, rtx, int);
@@ -192,6 +193,7 @@ static bool pa_legitimate_constant_p (enum machine_mode, rtx);
static GTY(()) section *som_readonly_data_section;
static GTY(()) section *som_one_only_readonly_data_section;
static GTY(()) section *som_one_only_data_section;
+static GTY(()) section *som_tm_clone_table_section;
/* Counts for the number of callee-saved general and floating point
registers which were saved by the current function's prologue. */
@@ -5396,13 +5398,15 @@ pa_file_start_space (int sortspace)
aputs ("\t.SPACE $PRIVATE$");
if (sortspace)
aputs (",SORT=16");
- aputs ("\n\t.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31"
- "\n\t.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82"
- "\n\t.SPACE $TEXT$");
+ aputs ("\n\t.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31");
+ if (flag_tm)
+ aputs ("\n\t.SUBSPA $TM_CLONE_TABLE$,QUAD=1,ALIGN=8,ACCESS=31");
+ aputs ("\n\t.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82"
+ "\n\t.SPACE $TEXT$");
if (sortspace)
aputs (",SORT=8");
aputs ("\n\t.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44"
- "\n\t.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n");
+ "\n\t.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n");
}
static inline void
@@ -9755,6 +9759,11 @@ pa_som_asm_init_sections (void)
"\t.NSUBSPA $DATA$,QUAD=1,ALIGN=8,"
"ACCESS=31,SORT=24,COMDAT");
+ if (flag_tm)
+ som_tm_clone_table_section
+ = get_unnamed_section (0, output_section_asm_op,
+ "\t.SPACE $PRIVATE$\n\t.SUBSPA $TM_CLONE_TABLE$");
+
/* FIXME: HPUX ld generates incorrect GOT entries for "T" fixups
which reference data within the $TEXT$ space (for example constant
strings in the $LIT$ subspace).
@@ -9777,6 +9786,14 @@ pa_som_asm_init_sections (void)
exception_section = data_section;
}
+/* Implement TARGET_ASM_TM_CLONE_TABLE_SECTION. */
+
+static section *
+pa_som_tm_clone_table_section (void)
+{
+ return som_tm_clone_table_section;
+}
+
/* On hpux10, the linker will give an error if we have a reference
in the read-only data section to a symbol defined in a shared
library. Therefore, expressions that might require a reloc can
diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h
index 5147615..78ee28a 100644
--- a/gcc/config/pa/som.h
+++ b/gcc/config/pa/som.h
@@ -342,3 +342,5 @@ do { \
#define SHLIB_SUFFIX ".sl"
#define TARGET_HAVE_NAMED_SECTIONS false
+
+#define TARGET_ASM_TM_CLONE_TABLE_SECTION pa_som_tm_clone_table_section