public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/casm-state)] Step #4.
Date: Tue,  7 Sep 2021 12:43:08 +0000 (GMT)	[thread overview]
Message-ID: <20210907124308.02D1B3857406@sourceware.org> (raw)

https://gcc.gnu.org/g:20d320727a35f9c255ba885cf9b324891b195828

commit 20d320727a35f9c255ba885cf9b324891b195828
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Sep 7 14:15:46 2021 +0200

    Step #4.

Diff:
---
 gcc/output.h | 5 ++++-
 gcc/varasm.c | 5 +----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/output.h b/gcc/output.h
index 3c7cb4c904c..adb473917bd 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -324,7 +324,7 @@ struct section_hasher : ggc_ptr_hash<section>
 struct GTY(()) asm_out_state
 {
   asm_out_state (): out_file (NULL), in_section (NULL),
-    sections ({}), in_cold_section_p (false)
+    sections ({}), anchor_labelno (0), in_cold_section_p (false)
   {
     section_htab = hash_table<section_hasher>::create_ggc (31);
   }
@@ -345,6 +345,9 @@ struct GTY(()) asm_out_state
     section *data;
   } sections;
 
+  /* The next number to use for internal anchor labels.  */
+  int anchor_labelno;
+
   /* True if code for the current function is currently being directed
      at the cold section.  */
   bool in_cold_section_p;
diff --git a/gcc/varasm.c b/gcc/varasm.c
index ad9578f3638..30c70b0a43a 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -182,9 +182,6 @@ struct object_block_hasher : ggc_ptr_hash<object_block>
 /* A table of object_blocks, indexed by section.  */
 static GTY(()) hash_table<object_block_hasher> *object_block_htab;
 
-/* The next number to use for internal anchor labels.  */
-static GTY(()) int anchor_labelno;
-
 /* A pool of constants that can be shared between functions.  */
 static GTY(()) struct rtx_constant_pool *shared_constant_pool;
 
@@ -7978,7 +7975,7 @@ get_section_anchor (struct object_block *block, HOST_WIDE_INT offset,
     }
 
   /* Create a new anchor with a unique label.  */
-  ASM_GENERATE_INTERNAL_LABEL (label, "LANCHOR", anchor_labelno++);
+  ASM_GENERATE_INTERNAL_LABEL (label, "LANCHOR", casm->anchor_labelno++);
   anchor = create_block_symbol (ggc_strdup (label), block, offset);
   SYMBOL_REF_FLAGS (anchor) |= SYMBOL_FLAG_LOCAL | SYMBOL_FLAG_ANCHOR;
   SYMBOL_REF_FLAGS (anchor) |= model << SYMBOL_FLAG_TLS_SHIFT;


             reply	other threads:[~2021-09-07 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 12:43 Martin Liska [this message]
2021-09-08  9:28 Martin Liska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210907124308.02D1B3857406@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).