[committed] Allocate subspace for tm data on 32-bit hppa-hpux
John David Anglin
dave@hiauly1.hia.nrc.ca
Fri Dec 23 02:19:00 GMT 2011
The attached patch fixes a slew testsuite of ICEs in default_no_named_section.
The patch creates a subspace/section for tm data. This resolves all the ICEs.
Tested on hppa2.0w=hp-hpux11.11 and hppa64-hp-hpux11.11. Committed to trunk.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
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.
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c (revision 182554)
+++ config/pa/pa.c (working copy)
@@ -118,6 +118,7 @@
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 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 @@
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 @@
"\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 @@
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
Index: config/pa/som.h
===================================================================
--- config/pa/som.h (revision 182554)
+++ config/pa/som.h (working copy)
@@ -342,3 +342,5 @@
#define SHLIB_SUFFIX ".sl"
#define TARGET_HAVE_NAMED_SECTIONS false
+
+#define TARGET_ASM_TM_CLONE_TABLE_SECTION pa_som_tm_clone_table_section
More information about the Gcc-patches
mailing list