public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/casm-state-v3)] Auto-conversion it.
@ 2021-09-14 12:35 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-09-14 12:35 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:266aac9cf2a3e02320f230dc0c57f6cefd74d51b

commit 266aac9cf2a3e02320f230dc0c57f6cefd74d51b
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Sep 9 13:54:45 2021 +0200

    Auto-conversion it.

Diff:
---
 gcc/config/aarch64/aarch64.c       |  2 +-
 gcc/config/alpha/alpha.c           | 12 +++----
 gcc/config/arc/arc.c               |  2 +-
 gcc/config/arm/arm.c               | 14 ++++----
 gcc/config/avr/avr.c               | 12 +++----
 gcc/config/c6x/c6x.c               |  4 +--
 gcc/config/csky/csky.c             |  2 +-
 gcc/config/darwin.c                | 66 +++++++++++++++++++-------------------
 gcc/config/frv/frv.c               |  4 +--
 gcc/config/i386/winnt.c            |  2 +-
 gcc/config/ia64/ia64.c             |  4 +--
 gcc/config/microblaze/microblaze.c |  6 ++--
 gcc/config/mips/mips.c             |  2 +-
 gcc/config/mmix/mmix.c             |  6 ++--
 gcc/config/msp430/msp430.c         |  8 ++---
 gcc/config/pa/pa.c                 | 34 ++++++++++----------
 gcc/config/pdp11/pdp11.c           |  6 ++--
 gcc/config/riscv/riscv.c           |  4 +--
 gcc/config/rl78/rl78.c             | 12 +++----
 gcc/config/rs6000/rs6000.c         | 24 +++++++-------
 gcc/config/rx/rx.c                 | 12 +++----
 gcc/config/s390/s390.c             |  2 +-
 gcc/config/sh/sh.c                 |  2 +-
 gcc/config/sparc/sparc.c           |  2 +-
 gcc/config/v850/v850.c             | 10 +++---
 gcc/dbxout.c                       |  2 +-
 gcc/dwarf2out.c                    |  6 ++--
 gcc/except.c                       |  2 +-
 gcc/final.c                        |  4 +--
 gcc/langhooks.c                    |  2 +-
 gcc/targhooks.c                    |  2 +-
 gcc/varasm.c                       | 40 +++++++++++------------
 gcc/vmsdbgout.c                    |  2 +-
 33 files changed, 157 insertions(+), 157 deletions(-)

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 36519ccc5a5..95949c8d049 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -25737,7 +25737,7 @@ aarch64_sls_emit_blr_function_thunks (FILE *out_file)
      would happen in a different section -- leaving an unmatched
      `.cfi_startproc` in the cold text section and an unmatched `.cfi_endproc`
      in the standard text section.  */
-  section *save_text_section = in_section;
+  section *save_text_section = casm->in_section;
   switch_to_section (function_section (current_function_decl));
   for (int regnum = 0; regnum < 30; ++regnum)
     {
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index c702e683c31..54a1df4b821 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -8055,13 +8055,13 @@ alpha_start_function (FILE *file, const char *fnname,
 
 #ifdef TARGET_VMS_CRASH_DEBUG
   /* Support of minimal traceback info.  */
-  switch_to_section (readonly_data_section);
+  switch_to_section (casm->sections.readonly_data);
   fprintf (file, "\t.align 3\n");
   assemble_name (file, fnname); fputs ("..na:\n", file);
   fputs ("\t.ascii \"", file);
   assemble_name (file, fnname);
   fputs ("\\0\"\n", file);
-  switch_to_section (text_section);
+  switch_to_section (casm->sections.text);
 #endif
 #endif /* TARGET_ABI_OPEN_VMS */
 }
@@ -9446,7 +9446,7 @@ alpha_elf_select_rtx_section (machine_mode mode, rtx x,
 {
   if (TARGET_SMALL_DATA && GET_MODE_SIZE (mode) <= g_switch_value)
     /* ??? Consider using mergeable sdata sections.  */
-    return sdata_section;
+    return casm->sections.sdata;
   else
     return default_elf_select_rtx_section (mode, x, align);
 }
@@ -9613,7 +9613,7 @@ alpha_write_linkage (FILE *stream, const char *funname)
 {
   fprintf (stream, "\t.link\n");
   fprintf (stream, "\t.align 3\n");
-  in_section = NULL;
+  casm->in_section = NULL;
 
 #ifdef TARGET_VMS_CRASH_DEBUG
   fputs ("\t.name ", stream);
@@ -9665,7 +9665,7 @@ vms_asm_named_section (const char *name, unsigned int flags,
 static void
 vms_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
 {
-  switch_to_section (ctors_section);
+  switch_to_section (casm->sections.ctors);
   assemble_align (BITS_PER_WORD);
   assemble_integer (symbol, UNITS_PER_WORD, BITS_PER_WORD, 1);
 }
@@ -9673,7 +9673,7 @@ vms_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
 static void
 vms_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
 {
-  switch_to_section (dtors_section);
+  switch_to_section (casm->sections.dtors);
   assemble_align (BITS_PER_WORD);
   assemble_integer (symbol, UNITS_PER_WORD, BITS_PER_WORD, 1);
 }
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 92797db96b7..ee763e59312 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -8832,7 +8832,7 @@ arc_asm_output_aligned_decl_local (FILE * stream, tree decl, const char * name,
     switch_to_section (get_named_section (NULL, ".sbss", 0));
   /*    named_section (0,".sbss",0); */
   else
-    switch_to_section (bss_section);
+    switch_to_section (casm->sections.bss);
 
   if (globalize_p)
     (*targetm.asm_out.globalize_label) (stream, name);
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 6c6e77fab66..bc7cf4f5d2a 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -17256,7 +17256,7 @@ get_jump_table_size (rtx_jump_table_data *insn)
 {
   /* ADDR_VECs only take room if read-only data does into the text
      section.  */
-  if (JUMP_TABLES_IN_TEXT_SECTION || readonly_data_section == text_section)
+  if (JUMP_TABLES_IN_TEXT_SECTION || casm->sections.readonly_data == casm->sections.text)
     {
       rtx body = PATTERN (insn);
       int elt = GET_CODE (body) == ADDR_DIFF_VEC ? 1 : 0;
@@ -24664,9 +24664,9 @@ arm_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor)
       s = get_section (buf, SECTION_WRITE | SECTION_NOTYPE, NULL_TREE);
     }
   else if (is_ctor)
-    s = ctors_section;
+    s = casm->sections.ctors;
   else
-    s = dtors_section;
+    s = casm->sections.dtors;
 
   switch_to_section (s);
   assemble_align (POINTER_SIZE);
@@ -27932,7 +27932,7 @@ thumb_call_via_reg (rtx reg)
   /* If we are in the normal text section we can use a single instance
      per compilation unit.  If we are doing function sections, then we need
      an entry per section, since we can't rely on reachability.  */
-  if (in_section == text_section)
+  if (casm->in_section == casm->sections.text)
     {
       thumb_call_reg_needed = 1;
 
@@ -28324,7 +28324,7 @@ arm_file_end (void)
   if (! thumb_call_reg_needed)
     return;
 
-  switch_to_section (text_section);
+  switch_to_section (casm->sections.text);
   asm_fprintf (asm_out_file, "\t.code 16\n");
   ASM_OUTPUT_ALIGN (asm_out_file, 1);
 
@@ -29774,13 +29774,13 @@ static void
 arm_asm_init_sections (void)
 {
 #if ARM_UNWIND_INFO
-  exception_section = get_unnamed_section (0, output_section_asm_op,
+  casm->sections.exception = get_unnamed_section (0, output_section_asm_op,
 					   "\t.handlerdata");
 #endif /* ARM_UNWIND_INFO */
 
 #ifdef OBJECT_FORMAT_ELF
   if (target_pure_code)
-    text_section->unnamed.data = "\t.section .text,\"0x20000006\",%progbits";
+    casm->sections.text->unnamed.data = "\t.section .text,\"0x20000006\",%progbits";
 #endif
 }
 
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 200701a583c..9b650bdbf51 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -10085,7 +10085,7 @@ avr_asm_asm_output_aligned_bss (FILE *file, tree decl, const char *name,
 }
 
 
-/* Unnamed section callback for data_section
+/* Unnamed section callback for casm->sections.data
    to track need of __do_copy_data.  */
 
 static void
@@ -10098,7 +10098,7 @@ avr_output_data_section_asm_op (const void *data)
 }
 
 
-/* Unnamed section callback for bss_section
+/* Unnamed section callback for casm->sections.bss
    to track need of __do_clear_bss.  */
 
 static void
@@ -10133,9 +10133,9 @@ avr_asm_init_sections (void)
 #if defined HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH
   if (avr_arch->flash_pm_offset == 0)
 #endif
-    readonly_data_section->unnamed.callback = avr_output_data_section_asm_op;
-  data_section->unnamed.callback = avr_output_data_section_asm_op;
-  bss_section->unnamed.callback = avr_output_bss_section_asm_op;
+    casm->sections.readonly_data->unnamed.callback = avr_output_data_section_asm_op;
+  casm->sections.data->unnamed.callback = avr_output_data_section_asm_op;
+  casm->sections.bss->unnamed.callback = avr_output_bss_section_asm_op;
 }
 
 
@@ -12567,7 +12567,7 @@ avr_output_addr_vec (rtx_insn *labl, rtx table)
   // Switch back to original section.  As we clobbered the section above,
   // forget the current section before switching back.
 
-  in_section = NULL;
+  casm->in_section = NULL;
   switch_to_section (current_function_section ());
 }
 
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index ce4949516cf..b775e518d0c 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -890,7 +890,7 @@ c6x_select_rtx_section (machine_mode mode, rtx x,
   if (c6x_sdata_mode == C6X_SDATA_ALL
       || (c6x_sdata_mode != C6X_SDATA_NONE && GET_MODE_SIZE (mode) <= 8))
     /* ??? Consider using mergeable sdata sections.  */
-    return sdata_section;
+    return casm->sections.sdata;
   else
     return default_elf_select_rtx_section (mode, x, align);
 }
@@ -5473,7 +5473,7 @@ c6x_asm_emit_except_personality (rtx personality)
 static void
 c6x_asm_init_sections (void)
 {
-  exception_section = get_unnamed_section (0, output_section_asm_op,
+  casm->sections.exception = get_unnamed_section (0, output_section_asm_op,
 					   "\t.handlerdata");
 }
 
diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c
index e55821fe2ee..c82540abeda 100644
--- a/gcc/config/csky/csky.c
+++ b/gcc/config/csky/csky.c
@@ -958,7 +958,7 @@ get_csky_jump_table_size (rtx insn)
 {
   /* ADDR_VECs only take room if read-only data does into the text
      section.  */
-  if (JUMP_TABLES_IN_TEXT_SECTION || readonly_data_section == text_section)
+  if (JUMP_TABLES_IN_TEXT_SECTION || casm->sections.readonly_data == casm->sections.text)
     {
       rtx body = PATTERN (insn);
       int elt = GET_CODE (body) == ADDR_DIFF_VEC ? 1 : 0;
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 781742fe46f..f6ce2d5d09e 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -143,7 +143,7 @@ output_objc_section_asm_op (const void *directive)
      section is requested.  */
   if (darwin_symbol_stubs && ! been_here)
     {
-      section *saved_in_section = in_section;
+      section *saved_in_section = casm->in_section;
       static const enum darwin_section_enum tomark[] =
 	{
 	  /* written, cold -> hot */
@@ -236,14 +236,14 @@ darwin_init_sections (void)
 #include "config/darwin-sections.def"
 #undef DEF_SECTION
 
-  readonly_data_section = darwin_sections[const_section];
-  exception_section = darwin_sections[darwin_exception_section];
-  eh_frame_section = darwin_sections[darwin_eh_frame_section];
+  casm->sections.readonly_data = darwin_sections[const_section];
+  casm->sections.exception = darwin_sections[darwin_exception_section];
+  casm->sections.eh_frame = darwin_sections[darwin_eh_frame_section];
 
   /* If our linker is new enough to coalesce weak symbols, then we
      can just put picbase_thunks into the text section.  */
   if (! ld_uses_coal_sects )
-    darwin_sections[picbase_thunk_section] = text_section;
+    darwin_sections[picbase_thunk_section] = casm->sections.text;
 }
 
 int
@@ -1071,7 +1071,7 @@ machopic_output_data_section_indirection (machopic_indirection **slot,
   /* The name of the indirection symbol.  */
   const char *ptr_name = p->ptr_name;
 
-  switch_to_section (data_section);
+  switch_to_section (casm->sections.data);
   assemble_align (GET_MODE_ALIGNMENT (Pmode));
   assemble_label (asm_out_file, ptr_name);
   assemble_integer (gen_rtx_SYMBOL_REF (Pmode, sym_name),
@@ -1340,7 +1340,7 @@ darwin_mergeable_string_section (tree exp,
       && TREE_STRING_LENGTH (exp) == 0)
     return darwin_sections[zobj_const_section];
 
-  return readonly_data_section;
+  return casm->sections.readonly_data;
 }
 
 #ifndef HAVE_GAS_LITERAL16
@@ -1362,7 +1362,7 @@ darwin_mergeable_constant_section (tree exp,
       || align < 8
       || align > 256
       || (align & (align -1)) != 0)
-    return readonly_data_section;
+    return casm->sections.readonly_data;
 
   /* This will ICE if the mode is not a constant size, but that is reasonable,
      since one cannot put a variable-sized thing into a constant section, we
@@ -1370,12 +1370,12 @@ darwin_mergeable_constant_section (tree exp,
   const unsigned int modesize = GET_MODE_BITSIZE (mode).to_constant ();
 
   if (modesize > align)
-    return readonly_data_section;
+    return casm->sections.readonly_data;
 
   tree size = TYPE_SIZE_UNIT (TREE_TYPE (exp));
 
   if (TREE_CODE (size) != INTEGER_CST)
-    return readonly_data_section;
+    return casm->sections.readonly_data;
 
   unsigned isize = TREE_INT_CST_LOW (size);
   if (isize == 4)
@@ -1387,7 +1387,7 @@ darwin_mergeable_constant_section (tree exp,
 	   && isize == 16)
     return darwin_sections[literal16_section];
 
-  return readonly_data_section;
+  return casm->sections.readonly_data;
 }
 
 section *
@@ -1443,7 +1443,7 @@ darwin_objc2_section (tree decl ATTRIBUTE_UNUSED, tree meta, section * base)
 
   objc_metadata_seen = 1;
 
-  if (base == data_section)
+  if (base == casm->sections.data)
     base = darwin_sections[objc2_metadata_section];
 
   /* Most of the OBJC2 META-data end up in the base section, so check it
@@ -1494,7 +1494,7 @@ darwin_objc2_section (tree decl ATTRIBUTE_UNUSED, tree meta, section * base)
 
   else if (startswith (p, "V2_EHTY"))
     return ld_uses_coal_sects ? darwin_sections[data_coal_section]
-                              : data_section;
+                              : casm->sections.data;
 
   else if (startswith (p, "V2_CSTR"))
     return darwin_sections[objc2_constant_string_object_section];
@@ -1680,7 +1680,7 @@ machopic_select_section (tree decl,
       else if (ro)
 	base_section = darwin_sections[const_data_section];
       else
-	base_section = data_section;
+	base_section = casm->sections.data;
       break;
     case SECCAT_BSS:
     case SECCAT_SBSS:
@@ -1690,11 +1690,11 @@ machopic_select_section (tree decl,
       else
 	{
 	  if (!TREE_PUBLIC (decl))
-	    base_section = lcomm_section;
-	  else if (bss_noswitch_section)
-	    base_section = bss_noswitch_section;
+	    base_section = casm->sections.lcomm;
+	  else if (casm->sections.bss_noswitch)
+	    base_section = casm->sections.bss_noswitch;
 	  else
-	    base_section = data_section;
+	    base_section = casm->sections.data;
 	}
       break;
 
@@ -2365,8 +2365,8 @@ fprintf (file, "# dadon: %s %s (%llu, %u) local %d weak %d"
       /* Check that we've correctly picked up the zero-sized item and placed it
          properly.  */
       gcc_assert ((!DARWIN_SECTION_ANCHORS || !flag_section_anchors)
-		  || (in_section
-		      && (in_section->common.flags & SECTION_NO_ANCHOR)));
+		  || (casm->in_section
+		      && (casm->in_section->common.flags & SECTION_NO_ANCHOR)));
     }
   else
     ASM_OUTPUT_LABEL (file, xname);
@@ -2386,8 +2386,8 @@ darwin_asm_declare_constant_name (FILE *file, const char *name,
       /* Check that we've correctly picked up the zero-sized item and placed it
          properly.  */
       gcc_assert ((!DARWIN_SECTION_ANCHORS || !flag_section_anchors)
-		  || (in_section
-		      && (in_section->common.flags & SECTION_NO_ANCHOR)));
+		  || (casm->in_section
+		      && (casm->in_section->common.flags & SECTION_NO_ANCHOR)));
     }
 }
 
@@ -2424,7 +2424,7 @@ darwin_emit_weak_or_comdat (FILE *fp, tree decl, const char *name,
 				: darwin_sections[const_data_section]);
   else
     switch_to_section (use_coal ? darwin_sections[data_coal_section]
-				: data_section);
+				: casm->sections.data);
 
   /* To be consistent, we'll allow darwin_asm_declare_object_name to assemble
      the align info for zero-sized items... but do it here otherwise.  */
@@ -2446,7 +2446,7 @@ darwin_emit_objc_zeroed (FILE *fp, tree decl, const char *name,
 				  unsigned HOST_WIDE_INT size,
 				  unsigned int align, tree meta)
 {
-  section *ocs = data_section;
+  section *ocs = casm->sections.data;
 
   if (TREE_PURPOSE (meta) == get_identifier("OBJC2META"))
     ocs = darwin_objc2_section (decl, meta, ocs);
@@ -2488,13 +2488,13 @@ darwin_emit_local_bss (FILE *fp, tree decl, const char *name,
       if (!size)
 	{
 	  fputs ("\t.section\t__DATA,__zobj_bss\n", fp);
-	  in_section = darwin_sections[zobj_bss_section];
+	  casm->in_section = darwin_sections[zobj_bss_section];
 	  size = 1;
 	}
       else
 	{
 	  fputs ("\t.static_data\n", fp);
-	  in_section = darwin_sections[static_data_section];
+	  casm->in_section = darwin_sections[static_data_section];
 	}
 
       if (l2align)
@@ -2512,7 +2512,7 @@ darwin_emit_local_bss (FILE *fp, tree decl, const char *name,
       char secnam[64];
       snprintf (secnam, 64, "__DATA,__bss");
       unsigned int flags = SECTION_BSS|SECTION_WRITE|SECTION_NO_ANCHOR;
-      in_section = get_section (secnam, flags, NULL);
+      casm->in_section = get_section (secnam, flags, NULL);
       fprintf (fp, "\t.zerofill %s,", secnam);
       assemble_name (fp, name);
       if (!size)
@@ -2559,7 +2559,7 @@ darwin_emit_common (FILE *fp, const char *name,
   l2align = floor_log2 (align);
   gcc_assert (l2align <= L2_MAX_OFILE_ALIGNMENT);
 
-  in_section = comm_section;
+  casm->in_section = casm->sections.comm;
   /* We mustn't allow multiple public symbols to share an address when using
      the normal OSX toolchain.  */
   if (!size)
@@ -2567,7 +2567,7 @@ darwin_emit_common (FILE *fp, const char *name,
       /* Put at least one byte.  */
       size = 1;
       /* This section can no longer participate in section anchoring.  */
-      comm_section->common.flags |= SECTION_NO_ANCHOR;
+      casm->sections.comm->common.flags |= SECTION_NO_ANCHOR;
     }
 
   fputs ("\t.comm\t", fp);
@@ -2656,13 +2656,13 @@ fprintf (fp, "# albss: %s (%lld,%d) ro %d cst %d stat %d com %d"
       if (!size)
 	{
 	  fputs ("\t.section\t__DATA,__zobj_data\n", fp);
-	  in_section = darwin_sections[zobj_data_section];
+	  casm->in_section = darwin_sections[zobj_data_section];
 	  size = 1;
 	}
       else
 	{
 	  fputs ("\t.data\n", fp);
-	  in_section = data_section;
+	  casm->in_section = casm->sections.data;
 	}
 
       if (l2align)
@@ -2677,7 +2677,7 @@ fprintf (fp, "# albss: %s (%lld,%d) ro %d cst %d stat %d com %d"
       unsigned int flags = SECTION_BSS|SECTION_WRITE|SECTION_NO_ANCHOR;
       char secnam[64];
       snprintf (secnam, 64, "__DATA,__common");
-      in_section = get_section (secnam, flags, NULL);
+      casm->in_section = get_section (secnam, flags, NULL);
       fprintf (fp, "\t.zerofill %s,", secnam);
       assemble_name (fp, name);
       if (!size)
@@ -3893,7 +3893,7 @@ darwin_function_section (tree decl, enum node_frequency freq,
   /* Otherwise, default to the 'normal' non-reordered sections.  */
 default_function_sections:
   return (use_coal) ? darwin_sections[text_coal_section]
-		    : text_section;
+		    : casm->sections.text;
 }
 
 #include "gt-darwin.h"
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index a7f7f086d17..74237e93e96 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -9395,7 +9395,7 @@ frv_rtx_costs (rtx x,
 static void
 frv_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
 {
-  switch_to_section (ctors_section);
+  switch_to_section (casm->sections.ctors);
   assemble_align (POINTER_SIZE);
   if (TARGET_FDPIC)
     {
@@ -9410,7 +9410,7 @@ frv_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
 static void
 frv_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
 {
-  switch_to_section (dtors_section);
+  switch_to_section (casm->sections.dtors);
   assemble_align (POINTER_SIZE);
   if (TARGET_FDPIC)
     {
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 4158a45ac31..c6b0949da15 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -1347,7 +1347,7 @@ void
 i386_pe_seh_init_sections (void)
 {
   if (TARGET_SEH)
-    exception_section = get_unnamed_section (0, output_section_asm_op,
+    casm->sections.exception = get_unnamed_section (0, output_section_asm_op,
 					     "\t.seh_handlerdata");
 }
 \f
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 632b9df1761..d9b9fcc5eda 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -10406,7 +10406,7 @@ ia64_asm_emit_except_personality (rtx personality)
 static void
 ia64_asm_init_sections (void)
 {
-  exception_section = get_unnamed_section (0, output_section_asm_op,
+  casm->sections.exception = get_unnamed_section (0, output_section_asm_op,
 					   "\t.handlerdata");
 }
 
@@ -10858,7 +10858,7 @@ ia64_select_rtx_section (machine_mode mode, rtx x,
   if (GET_MODE_SIZE (mode) > 0
       && GET_MODE_SIZE (mode) <= ia64_section_threshold
       && !TARGET_NO_SDATA)
-    return sdata_section;
+    return casm->sections.sdata;
   else
     return default_elf_select_rtx_section (mode, x, align);
 }
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index 6e8f367c80a..4105df8a480 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -2836,9 +2836,9 @@ microblaze_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor)
       s = get_section (buf, SECTION_WRITE, NULL_TREE);
     }
   else if (is_ctor)
-    s = ctors_section;
+    s = casm->sections.ctors;
   else
-    s = dtors_section;
+    s = casm->sections.dtors;
 
   switch_to_section (s);
   assemble_align (POINTER_SIZE);
@@ -3261,7 +3261,7 @@ microblaze_select_section (tree decl, int reloc, unsigned HOST_WIDE_INT align)
          relaxation/relocation. Currently, turning mergeable sections 
          into regular readonly sections.  */
 
-      return readonly_data_section;
+      return casm->sections.readonly_data;
     default:
       return default_elf_select_section (decl, reloc, align);
     }
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index ade5d7041f0..50dd99ff0b3 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -9718,7 +9718,7 @@ mips_output_aligned_decl_common (FILE *stream, tree decl, const char *name,
       if (TREE_PUBLIC (decl) && DECL_NAME (decl))
 	targetm.asm_out.globalize_label (stream, name);
 
-      switch_to_section (readonly_data_section);
+      switch_to_section (casm->sections.readonly_data);
       ASM_OUTPUT_ALIGN (stream, floor_log2 (align / BITS_PER_UNIT));
       mips_declare_object (stream, name, "",
 			   ":\n\t.space\t" HOST_WIDE_INT_PRINT_UNSIGNED "\n",
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index 010cd4773ea..5522535e0ab 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -1321,7 +1321,7 @@ mmix_file_start (void)
   fputs ("! mmixal:= 8H LOC Data_Section\n", asm_out_file);
 
   /* Make sure each file starts with the text section.  */
-  switch_to_section (text_section);
+  switch_to_section (casm->sections.text);
 }
 
 /* TARGET_ASM_FILE_END.  */
@@ -1330,7 +1330,7 @@ static void
 mmix_file_end (void)
 {
   /* Make sure each file ends with the data section.  */
-  switch_to_section (data_section);
+  switch_to_section (casm->sections.data);
 }
 
 /* TARGET_ASM_OUTPUT_SOURCE_FILENAME.  */
@@ -1510,7 +1510,7 @@ mmix_asm_output_aligned_local (FILE *stream,
 			       int size,
 			       int align)
 {
-  switch_to_section (data_section);
+  switch_to_section (casm->sections.data);
 
   ASM_OUTPUT_ALIGN (stream, exact_log2 (align/BITS_PER_UNIT));
   assemble_name (stream, name);
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
index 1cdacb7f480..d9ae7e2d912 100644
--- a/gcc/config/msp430/msp430.c
+++ b/gcc/config/msp430/msp430.c
@@ -2398,22 +2398,22 @@ msp430_select_section (tree decl, int reloc, unsigned HOST_WIDE_INT align)
     {
     case SECCAT_TEXT:
       if (!prefix)
-	return text_section;
+	return casm->sections.text;
       base_sec_name = ".text";
       break;
     case SECCAT_DATA:
       if (!prefix)
-	return data_section;
+	return casm->sections.data;
       base_sec_name = ".data";
       break;
     case SECCAT_BSS:
       if (!prefix)
-	return bss_section;
+	return casm->sections.bss;
       base_sec_name = ".bss";
       break;
     case SECCAT_RODATA:
       if (!prefix)
-	return readonly_data_section;
+	return casm->sections.readonly_data;
       base_sec_name = ".rodata";
       break;
 
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 06143023b46..2f01884cea2 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -4444,7 +4444,7 @@ pa_output_function_epilogue (FILE *file)
       /* We are done with this subspace except possibly for some additional
 	 debug information.  Forget that we are in this subspace to ensure
 	 that the next function is output in its own subspace.  */
-      in_section = NULL;
+      casm->in_section = NULL;
       cfun->machine->in_nsubspa = 2;
     }
 
@@ -4693,7 +4693,7 @@ output_deferred_profile_counters (void)
   if (funcdef_nos.is_empty ())
    return;
 
-  switch_to_section (data_section);
+  switch_to_section (casm->sections.data);
   align = MIN (BIGGEST_ALIGNMENT, LONG_TYPE_SIZE);
   ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT));
 
@@ -5863,7 +5863,7 @@ output_deferred_plabels (void)
      before outputting the deferred plabels.  */
   if (n_deferred_plabels)
     {
-      switch_to_section (flag_pic ? data_section : readonly_data_section);
+      switch_to_section (flag_pic ? casm->sections.data : casm->sections.readonly_data);
       ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
     }
 
@@ -8872,7 +8872,7 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
 
   if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
     {
-      switch_to_section (data_section);
+      switch_to_section (casm->sections.data);
       output_asm_insn (".align 4", xoperands);
       ASM_OUTPUT_LABEL (file, label);
       output_asm_insn (".word P'%0", xoperands);
@@ -9047,7 +9047,7 @@ pa_asm_output_aligned_bss (FILE *stream,
 			   unsigned HOST_WIDE_INT size,
 			   unsigned int align)
 {
-  switch_to_section (bss_section);
+  switch_to_section (casm->sections.bss);
 
 #ifdef ASM_OUTPUT_TYPE_DIRECTIVE
   ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "object");
@@ -9084,7 +9084,7 @@ pa_asm_output_aligned_common (FILE *stream,
       align = max_common_align;
     }
 
-  switch_to_section (bss_section);
+  switch_to_section (casm->sections.bss);
 
   assemble_name (stream, name);
   fprintf (stream, "\t.comm " HOST_WIDE_INT_PRINT_UNSIGNED"\n",
@@ -9104,7 +9104,7 @@ pa_asm_output_aligned_local (FILE *stream,
 			     unsigned HOST_WIDE_INT size,
 			     unsigned int align)
 {
-  switch_to_section (bss_section);
+  switch_to_section (casm->sections.bss);
   fprintf (stream, "\t.align %u\n", align / BITS_PER_UNIT);
 
 #ifdef LOCAL_ASM_OP
@@ -10030,10 +10030,10 @@ som_output_text_section_asm_op (const void *data ATTRIBUTE_UNUSED)
 	     function has been completed.  So, we are changing to the
 	     text section to output debugging information.  Thus, we
 	     need to forget that we are in the text section so that
-	     varasm.c will call us when text_section is selected again.  */
+	     varasm.c will call us when casm->sections.text is selected again.  */
 	  gcc_assert (!cfun || !cfun->machine
 		      || cfun->machine->in_nsubspa == 2);
-	  in_section = NULL;
+	  casm->in_section = NULL;
 	}
       output_section_asm_op ("\t.SPACE $TEXT$\n\t.NSUBSPA $CODE$");
       return;
@@ -10047,7 +10047,7 @@ som_output_text_section_asm_op (const void *data ATTRIBUTE_UNUSED)
 static void
 som_output_comdat_data_section_asm_op (const void *data)
 {
-  in_section = NULL;
+  casm->in_section = NULL;
   output_section_asm_op (data);
 }
 
@@ -10056,7 +10056,7 @@ som_output_comdat_data_section_asm_op (const void *data)
 static void
 pa_som_asm_init_sections (void)
 {
-  text_section
+  casm->sections.text
     = get_unnamed_section (0, som_output_text_section_asm_op, NULL);
 
   /* SOM puts readonly data in the default $LIT$ subspace when PIC code
@@ -10104,14 +10104,14 @@ pa_som_asm_init_sections (void)
      when generating PIC code.  This reduces sharing, but it works
      correctly.  Now we rely on pa_reloc_rw_mask() for section selection.
      This puts constant data not needing relocation into the $TEXT$ space.  */
-  readonly_data_section = som_readonly_data_section;
+  casm->sections.readonly_data = som_readonly_data_section;
 
   /* We must not have a reference to an external symbol defined in a
      shared library in a readonly section, else the SOM linker will
      complain.
 
      So, we force exception information into the data section.  */
-  exception_section = data_section;
+  casm->sections.exception = casm->sections.data;
 }
 
 /* Implement TARGET_ASM_TM_CLONE_TABLE_SECTION.  */
@@ -10144,18 +10144,18 @@ pa_select_section (tree exp, int reloc,
 	  && !DECL_WEAK (exp))
 	return som_one_only_readonly_data_section;
       else
-	return readonly_data_section;
+	return casm->sections.readonly_data;
     }
   else if (CONSTANT_CLASS_P (exp)
 	   && !(reloc & pa_reloc_rw_mask ()))
-    return readonly_data_section;
+    return casm->sections.readonly_data;
   else if (TARGET_SOM
 	   && TREE_CODE (exp) == VAR_DECL
 	   && DECL_ONE_ONLY (exp)
 	   && !DECL_WEAK (exp))
     return som_one_only_data_section;
   else
-    return data_section;
+    return casm->sections.data;
 }
 
 /* Implement pa_elf_select_rtx_section.  If X is a function label operand
@@ -10648,7 +10648,7 @@ pa_function_section (tree decl, enum node_frequency freq,
 {
   /* Put functions in text section if target doesn't have named sections.  */
   if (!targetm_common.have_named_sections)
-    return text_section;
+    return casm->sections.text;
 
   /* Force nested functions into the same section as the containing
      function.  */
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index ced653116a4..0cb38926edc 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -743,7 +743,7 @@ void
 pdp11_asm_output_var (FILE *file, const char *name, int size,
 		      int align, bool global)
 {
-  switch_to_section (data_section);
+  switch_to_section (casm->sections.data);
   if (align > 8)
     fprintf (file, "\t.even\n");
   if (TARGET_DEC_ASM)
@@ -2323,11 +2323,11 @@ pdp11_asm_init_sections (void)
 {
   if (TARGET_DEC_ASM)
     {
-      bss_section = data_section;
+      casm->sections.bss = casm->sections.data;
     }
   else if (TARGET_GNU_ASM)
     {
-      bss_section = get_unnamed_section (SECTION_WRITE | SECTION_BSS,
+      casm->sections.bss = get_unnamed_section (SECTION_WRITE | SECTION_BSS,
 					 output_section_asm_op,
 					 ".bss");
     }
diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
index 576960bb37c..66bb05b0e43 100644
--- a/gcc/config/riscv/riscv.c
+++ b/gcc/config/riscv/riscv.c
@@ -3615,8 +3615,8 @@ riscv_elf_select_rtx_section (machine_mode mode, rtx x,
 	  return get_section (name, s->named.common.flags, NULL);
 	}
 
-      if (s == data_section)
-	return sdata_section;
+      if (s == casm->sections.data)
+	return casm->sections.sdata;
     }
 
   return s;
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index 4c34949a97f..30d81f9d41f 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -4644,14 +4644,14 @@ rl78_select_section (tree decl,
     }
 
   if (readonly)
-    return TARGET_ES0 ? frodata_section : readonly_data_section;
+    return TARGET_ES0 ? frodata_section : casm->sections.readonly_data;
 
   switch (categorize_decl_for_section (decl, reloc))
     {
-    case SECCAT_TEXT:   return text_section;
-    case SECCAT_DATA:   return data_section;
-    case SECCAT_BSS:    return bss_section;
-    case SECCAT_RODATA: return TARGET_ES0 ? frodata_section : readonly_data_section;
+    case SECCAT_TEXT:   return casm->sections.text;
+    case SECCAT_DATA:   return casm->sections.data;
+    case SECCAT_BSS:    return casm->sections.bss;
+    case SECCAT_RODATA: return TARGET_ES0 ? frodata_section : casm->sections.readonly_data;
     default:
       return default_select_section (decl, reloc, align);
     }
@@ -4786,7 +4786,7 @@ rl78_asm_ctor_dtor (rtx symbol, int priority, bool is_ctor)
       sec = get_section (buf, 0, NULL);
     }
   else
-    sec = is_ctor ? ctors_section : dtors_section;
+    sec = is_ctor ? casm->sections.ctors : casm->sections.dtors;
 
   assemble_addr_to_section (symbol, sec);
 }
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 25709375635..acb2cae4e76 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -14499,7 +14499,7 @@ rs6000_assemble_integer (rtx x, unsigned int size, int aligned_p)
 	 section.  */
       if (DEFAULT_ABI == ABI_V4
 	  && (TARGET_RELOCATABLE || flag_pic > 1)
-	  && in_section != toc_section
+	  && casm->in_section != toc_section
 	  && !recurse
 	  && !CONST_SCALAR_INT_P (x)
 	  && CONSTANT_P (x))
@@ -21048,7 +21048,7 @@ rs6000_elf_file_end (void)
       /* We have expanded a CPU builtin, so we need to emit a reference to
 	 the special symbol that LIBC uses to declare it supports the
 	 AT_PLATFORM and AT_HWCAP/AT_HWCAP2 in the TCB feature.  */
-      switch_to_section (data_section);
+      switch_to_section (casm->sections.data);
       fprintf (asm_out_file, "\t.align %u\n", TARGET_32BIT ? 2 : 3);
       fprintf (asm_out_file, "\t%s %s\n",
 	       TARGET_32BIT ? ".long" : ".quad", tcb_verification_symbol);
@@ -21173,7 +21173,7 @@ rs6000_xcoff_asm_init_sections (void)
   toc_section
     = get_unnamed_section (0, rs6000_xcoff_output_toc_section_asm_op, NULL);
 
-  readonly_data_section = read_only_data_section;
+  casm->sections.readonly_data = read_only_data_section;
 }
 
 static int
@@ -21251,7 +21251,7 @@ rs6000_xcoff_select_section (tree decl, int reloc,
       if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL_P (decl))
 	{
 	  if (bss_initializer_p (decl))
-	    return tls_comm_section;
+	    return casm->sections.tls_comm;
 	  else if (TREE_PUBLIC (decl))
 	    return tls_data_section;
 	  else
@@ -21260,7 +21260,7 @@ rs6000_xcoff_select_section (tree decl, int reloc,
       else
 #endif
 	if (TREE_PUBLIC (decl))
-	return data_section;
+	return casm->sections.data;
       else
 	return private_data_section;
     }
@@ -21365,7 +21365,7 @@ rs6000_xcoff_file_start (void)
   if (write_symbols != NO_DEBUG)
     switch_to_section (private_data_section);
   switch_to_section (toc_section);
-  switch_to_section (text_section);
+  switch_to_section (casm->sections.text);
   if (profile_flag)
     fprintf (asm_out_file, "\t.extern %s\n", RS6000_MCOUNT);
   rs6000_file_start ();
@@ -21377,9 +21377,9 @@ rs6000_xcoff_file_start (void)
 static void
 rs6000_xcoff_file_end (void)
 {
-  switch_to_section (text_section);
+  switch_to_section (casm->sections.text);
   fputs ("_section_.text:\n", asm_out_file);
-  switch_to_section (data_section);
+  switch_to_section (casm->sections.data);
   fputs (TARGET_32BIT
 	 ? "\t.long _section_.text\n" : "\t.llong _section_.text\n",
 	 asm_out_file);
@@ -21499,7 +21499,7 @@ rs6000_xcoff_visibility (tree decl)
    Dollar signs are converted to underscores.
 
    The csect for the function will have already been created when
-   text_section was selected.  We do have to go back to that csect, however.
+   casm->sections.text was selected.  We do have to go back to that csect, however.
 
    The third and fourth parameters to the .function pseudo-op (16 and 044)
    are placeholders which no longer have any use.
@@ -21561,7 +21561,7 @@ rs6000_xcoff_declare_function_name (FILE *file, const char *name, tree decl)
   RS6000_OUTPUT_BASENAME (file, buffer);
   fputs (", TOC[tc0], 0\n", file);
 
-  in_section = NULL;
+  casm->in_section = NULL;
   switch_to_section (function_section (decl));
   putc ('.', file);
   ASM_OUTPUT_LABEL (file, buffer);
@@ -21621,7 +21621,7 @@ rs6000_xcoff_asm_output_aligned_decl_common (FILE *stream,
   if (! DECL_COMMON (decl))
     {
       /* Forget section.  */
-      in_section = NULL;
+      casm->in_section = NULL;
 
       /* Globalize TLS BSS.  */
       if (TREE_PUBLIC (decl) && DECL_THREAD_LOCAL_P (decl))
@@ -26616,7 +26616,7 @@ rs6000_code_end (void)
   else
 #endif
     {
-      switch_to_section (text_section);
+      switch_to_section (casm->sections.text);
       ASM_OUTPUT_LABEL (asm_out_file, name);
     }
 
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index af54ccc2588..3cb495f5c4d 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -2305,7 +2305,7 @@ rx_select_rtx_section (machine_mode mode,
   if (rx_small_data_limit > 0
       && GET_MODE_SIZE (mode) <= rx_small_data_limit
       && align <= (unsigned HOST_WIDE_INT) rx_small_data_limit * BITS_PER_UNIT)
-    return sdata_section;
+    return casm->sections.sdata;
 
   return default_elf_select_rtx_section (mode, x, align);
 }
@@ -2319,8 +2319,8 @@ rx_select_section (tree decl,
     {
       switch (categorize_decl_for_section (decl, reloc))
 	{
-	case SECCAT_SDATA:	return sdata_section;
-	case SECCAT_SBSS:	return sbss_section;
+	case SECCAT_SDATA:	return casm->sections.sdata;
+	case SECCAT_SBSS:	return casm->sections.sbss;
 	case SECCAT_SRODATA:
 	  /* Fall through.  We do not put small, read only
 	     data into the C_2 section because we are not
@@ -2342,7 +2342,7 @@ rx_select_section (tree decl,
       case SECCAT_RODATA_MERGE_CONST:
       case SECCAT_RODATA_MERGE_STR_INIT:
       case SECCAT_RODATA_MERGE_STR:
-	return readonly_data_section;
+	return casm->sections.readonly_data;
 
       default:
 	break;
@@ -2690,9 +2690,9 @@ rx_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor)
       s = get_section (buf, SECTION_WRITE, NULL_TREE);
     }
   else if (is_ctor)
-    s = ctors_section;
+    s = casm->sections.ctors;
   else
-    s = dtors_section;
+    s = casm->sections.dtors;
 
   switch_to_section (s);
   assemble_align (POINTER_SIZE);
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 54dd6332c3a..244e97bbbca 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -16612,7 +16612,7 @@ s390_output_indirect_thunk_function (unsigned int regno, bool z10_p)
     }
   else
     {
-      switch_to_section (text_section);
+      switch_to_section (casm->sections.text);
       ASM_OUTPUT_LABEL (asm_out_file, thunk_label);
     }
 
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 1564109c942..07d18406ea1 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -2828,7 +2828,7 @@ sh_file_start (void)
   else
     /* Switch to the data section so that the coffsem symbol
        isn't in the text section.  */
-    switch_to_section (data_section);
+    switch_to_section (casm->sections.data);
 
   if (TARGET_LITTLE_ENDIAN)
     fputs ("\t.little\n", asm_out_file);
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 06f41d7bb53..53fca1f4b5c 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -12499,7 +12499,7 @@ sparc_file_end (void)
       else
 	{
 	  const int align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT);
-          switch_to_section (text_section);
+          switch_to_section (casm->sections.text);
 	  if (align > 0)
 	    ASM_OUTPUT_ALIGN (asm_out_file, align);
 	  ASM_OUTPUT_LABEL (asm_out_file, name);
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index 4978faf9318..2d1c8dca2ea 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -2398,7 +2398,7 @@ v850_output_aligned_bss (FILE * file,
       break;
 
     case DATA_AREA_SDA:
-      switch_to_section (sbss_section);
+      switch_to_section (casm->sections.sbss);
       break;
 
     case DATA_AREA_TDA:
@@ -2406,7 +2406,7 @@ v850_output_aligned_bss (FILE * file,
       break;
       
     default:
-      switch_to_section (bss_section);
+      switch_to_section (casm->sections.bss);
       break;
     }
   
@@ -2882,13 +2882,13 @@ v850_select_section (tree exp,
 	  return tdata_section;
 
         case DATA_AREA_SDA:
-	  return is_const ? rosdata_section : sdata_section;
+	  return is_const ? rosdata_section : casm->sections.sdata;
 
         default:
-	  return is_const ? readonly_data_section : data_section;
+	  return is_const ? casm->sections.readonly_data : casm->sections.data;
         }
     }
-  return readonly_data_section;
+  return casm->sections.readonly_data;
 }
 \f
 /* Worker function for TARGET_FUNCTION_VALUE_REGNO_P.  */
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 2a77c0bcee9..0ad57ab35bd 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -3114,7 +3114,7 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
 	    {
 	      /* Ultrix `as' seems to need this.  */
 #ifdef DBX_STATIC_STAB_DATA_SECTION
-	      switch_to_section (data_section);
+	      switch_to_section (casm->sections.data);
 #endif
 	      code = N_STSYM;
 	    }
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 596d0cd8796..cdfdee3cd9a 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -438,7 +438,7 @@ should_emit_struct_debug (tree type, enum debug_info_usage usage)
   return DUMP_GSTRUCT (type, usage, criterion, generic, false, false);
 }
 \f
-/* Switch [BACK] to eh_frame_section.  If we don't have an eh_frame_section,
+/* Switch [BACK] to casm->sections.eh_frame.  If we don't have an casm->sections.eh_frame,
    switch to the data section instead, and write out a synthetic start label
    for collect2 the first time around.  */
 
@@ -476,8 +476,8 @@ switch_to_eh_frame_section (bool back ATTRIBUTE_UNUSED)
 #ifdef EH_FRAME_SECTION_NAME
       casm->sections.eh_frame = get_section (EH_FRAME_SECTION_NAME, flags, NULL);
 #else
-      eh_frame_section = ((flags == SECTION_WRITE)
-			  ? data_section : readonly_data_section);
+      casm->sections.eh_frame = ((flags == SECTION_WRITE)
+			  ? casm->sections.data : casm->sections.readonly_data);
 #endif /* EH_FRAME_SECTION_NAME */
     }
 
diff --git a/gcc/except.c b/gcc/except.c
index e72d9c98f51..db6a2b9e14c 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2924,7 +2924,7 @@ switch_to_exception_section (const char * ARG_UNUSED (fnname))
       else
 	flags = SECTION_WRITE;
 
-      /* Compute the section and cache it into exception_section,
+      /* Compute the section and cache it into casm->sections.exception,
 	 unless it depends on the function name.  */
       if (targetm_common.have_named_sections)
 	{
diff --git a/gcc/final.c b/gcc/final.c
index f14bb0b1ba8..6515f00875c 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1143,7 +1143,7 @@ shorten_branches (rtx_insn *first)
 		 may need to update the alignment of this label.  */
 
 	      if (JUMP_TABLES_IN_TEXT_SECTION
-		  || readonly_data_section == casm->sections.text)
+		  || casm->sections.readonly_data == casm->sections.text)
 		{
 		  rtx_jump_table_data *table = jump_table_for_label (label);
 		  if (table)
@@ -1284,7 +1284,7 @@ shorten_branches (rtx_insn *first)
 		      >= GET_MODE_SIZE (table->get_data_mode ())))
 		PUT_MODE (body, vec_mode);
 	      if (JUMP_TABLES_IN_TEXT_SECTION
-		  || readonly_data_section == casm->sections.text)
+		  || casm->sections.readonly_data == casm->sections.text)
 		{
 		  insn_lengths[uid]
 		    = (XVECLEN (body, 1)
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index a25a4f84eba..b2c5ccb3b5e 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -803,7 +803,7 @@ lhd_begin_section (const char *name)
 
   /* Save the old section so we can restore it in lto_end_asm_section.  */
   gcc_assert (!saved_section);
-  saved_section = casm->in_section;
+  saved_section = casm->casm->in_section;
   if (!saved_section)
     saved_section = casm->sections.text;
 
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 68660186ec5..c10dc877a80 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1962,7 +1962,7 @@ default_print_patchable_function_entry_1 (FILE *file,
     {
       char buf[256];
       static int patch_area_number;
-      section *previous_section = casm->in_section;
+      section *previous_section = casm->casm->in_section;
       const char *asm_op = integer_asm_op (POINTER_SIZE_UNITS, false);
 
       gcc_assert (asm_op != NULL);
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 2776603c069..0c776d477e1 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1682,7 +1682,7 @@ void
 default_dtor_section_asm_out_destructor (rtx symbol,
 					 int priority ATTRIBUTE_UNUSED)
 {
-  assemble_addr_to_section (symbol, dtors_section);
+  assemble_addr_to_section (symbol, casm->sections.dtors);
 }
 #endif
 
@@ -1705,7 +1705,7 @@ void
 default_ctor_section_asm_out_constructor (rtx symbol,
 					  int priority ATTRIBUTE_UNUSED)
 {
-  assemble_addr_to_section (symbol, ctors_section);
+  assemble_addr_to_section (symbol, casm->sections.ctors);
 }
 #endif
 \f
@@ -1969,7 +1969,7 @@ assemble_end_function (tree decl, const char *fnname ATTRIBUTE_UNUSED)
     {
       section *save_text_section;
 
-      save_text_section = casm->in_section;
+      save_text_section = casm->casm->in_section;
       switch_to_section (unlikely_text_section ());
 #ifdef ASM_DECLARE_COLD_FUNCTION_SIZE
       if (cold_function_name != NULL_TREE)
@@ -1999,7 +1999,7 @@ assemble_zeros (unsigned HOST_WIDE_INT size)
 #ifdef ASM_NO_SKIP_IN_TEXT
   /* The `space' pseudo in the text section outputs nop insns rather than 0s,
      so we must output 0s explicitly in the text section.  */
-  if (ASM_NO_SKIP_IN_TEXT && (casm->in_section->common.flags & SECTION_CODE) != 0)
+  if (ASM_NO_SKIP_IN_TEXT && (casm->casm->in_section->common.flags & SECTION_CODE) != 0)
     {
       unsigned HOST_WIDE_INT i;
       for (i = 0; i < size; i++)
@@ -2046,7 +2046,7 @@ assemble_string (const char *p, int size)
 }
 
 \f
-/* A noswitch_section_callback for lcomm_section.  */
+/* A noswitch_section_callback for casm->sections.lcomm.  */
 
 static bool
 emit_local (tree decl ATTRIBUTE_UNUSED,
@@ -2069,7 +2069,7 @@ emit_local (tree decl ATTRIBUTE_UNUSED,
 #endif
 }
 
-/* A noswitch_section_callback for bss_noswitch_section.  */
+/* A noswitch_section_callback for casm->sections.bss_noswitch.  */
 
 #if defined ASM_OUTPUT_ALIGNED_BSS
 static bool
@@ -2084,7 +2084,7 @@ emit_bss (tree decl ATTRIBUTE_UNUSED,
 }
 #endif
 
-/* A noswitch_section_callback for comm_section.  */
+/* A noswitch_section_callback for casm->sections.comm.  */
 
 static bool
 emit_common (tree decl ATTRIBUTE_UNUSED,
@@ -2106,7 +2106,7 @@ emit_common (tree decl ATTRIBUTE_UNUSED,
 #endif
 }
 
-/* A noswitch_section_callback for tls_comm_section.  */
+/* A noswitch_section_callback for casm->sections.tls_comm.  */
 
 static bool
 emit_tls_common (tree decl ATTRIBUTE_UNUSED,
@@ -4141,8 +4141,8 @@ output_constant_pool_1 (class constant_descriptor_rtx *desc,
   /* Make sure all constants in SECTION_MERGE and not SECTION_STRINGS
      sections have proper size.  */
   if (align > GET_MODE_BITSIZE (desc->mode)
-      && casm->in_section
-      && (casm->in_section->common.flags & SECTION_MERGE))
+      && casm->casm->in_section
+      && (casm->casm->in_section->common.flags & SECTION_MERGE))
     assemble_align (align);
 
 #ifdef ASM_OUTPUT_SPECIAL_POOL_ENTRY
@@ -6561,7 +6561,7 @@ init_varasm_once (void)
 #endif
 
 #ifdef SDATA_SECTION_ASM_OP
-  sdata_section = get_unnamed_section (SECTION_WRITE, output_section_asm_op,
+  casm->sections.sdata = get_unnamed_section (SECTION_WRITE, output_section_asm_op,
 				       SDATA_SECTION_ASM_OP);
 #endif
 
@@ -6571,12 +6571,12 @@ init_varasm_once (void)
 #endif
 
 #ifdef CTORS_SECTION_ASM_OP
-  ctors_section = get_unnamed_section (0, output_section_asm_op,
+  casm->sections.ctors = get_unnamed_section (0, output_section_asm_op,
 				       CTORS_SECTION_ASM_OP);
 #endif
 
 #ifdef DTORS_SECTION_ASM_OP
-  dtors_section = get_unnamed_section (0, output_section_asm_op,
+  casm->sections.dtors = get_unnamed_section (0, output_section_asm_op,
 				       DTORS_SECTION_ASM_OP);
 #endif
 
@@ -6587,7 +6587,7 @@ init_varasm_once (void)
 #endif
 
 #ifdef SBSS_SECTION_ASM_OP
-  sbss_section = get_unnamed_section (SECTION_WRITE | SECTION_BSS,
+  casm->sections.sbss = get_unnamed_section (SECTION_WRITE | SECTION_BSS,
 				      output_section_asm_op,
 				      SBSS_SECTION_ASM_OP);
 #endif
@@ -6732,7 +6732,7 @@ default_section_type_flags (tree decl, const char *name, int reloc)
 }
 
 /* Return true if the target supports some form of global BSS,
-   either through bss_noswitch_section, or by selecting a BSS
+   either through casm->sections.bss_noswitch, or by selecting a BSS
    section in TARGET_ASM_SELECT_SECTION.  */
 
 bool
@@ -7766,13 +7766,13 @@ switch_to_section (section *new_section, tree decl)
 		  "%qD was declared here", used_decl);
 	}
     }
-  else if (casm->in_section == new_section)
+  else if (casm->casm->in_section == new_section)
     return;
 
   if (new_section->common.flags & SECTION_FORGET)
-    casm->in_section = NULL;
+    casm->casm->in_section = NULL;
   else
-    casm->in_section = new_section;
+    casm->casm->in_section = new_section;
 
   switch (SECTION_STYLE (new_section))
     {
@@ -8417,7 +8417,7 @@ handle_vtv_comdat_section (section *sect, const_tree decl ATTRIBUTE_UNUSED)
 				 sect->named.common.flags
 				 | SECTION_LINKONCE,
 				 DECL_NAME (decl));
-  casm->in_section = sect;
+  casm->casm->in_section = sect;
 #else
   /* Neither OBJECT_FORMAT_PE, nor OBJECT_FORMAT_COFF is set here.
      Therefore the following check is used.
@@ -8443,7 +8443,7 @@ handle_vtv_comdat_section (section *sect, const_tree decl ATTRIBUTE_UNUSED)
 				     sect->named.common.flags
 				     | SECTION_LINKONCE,
 				     DECL_NAME (decl));
-      casm->in_section = sect;
+      casm->casm->in_section = sect;
     }
   else
     switch_to_section (sect);
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index 05fadce075e..48e1ca9fb25 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -1583,7 +1583,7 @@ vmsdbgout_finish (const char *filename ATTRIBUTE_UNUSED)
     return;
 
   /* Output a terminator label for the .text section.  */
-  switch_to_section (text_section);
+  switch_to_section (casm->sections.text);
   targetm.asm_out.internal_label (asm_out_file, TEXT_END_LABEL, 0);
 
   /* Output debugging information.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-14 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 12:35 [gcc(refs/users/marxin/heads/casm-state-v3)] Auto-conversion it Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).