public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Martin Liška" <mliska@suse.cz>
Cc: Richard Biener <richard.guenther@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 3/N] Come up with casm global state.
Date: Mon, 25 Oct 2021 11:30:47 -0500	[thread overview]
Message-ID: <20211025163047.GV614@gate.crashing.org> (raw)
In-Reply-To: <f2f17851-59f8-a31e-8992-6a6e5513c5b4@suse.cz>

Hi!

On Mon, Oct 25, 2021 at 03:36:25PM +0200, Martin Liška wrote:
> --- a/gcc/config/rs6000/rs6000-internal.h
> +++ b/gcc/config/rs6000/rs6000-internal.h
> @@ -189,4 +189,13 @@ extern bool rs6000_passes_vector;
>  extern bool rs6000_returns_struct;
>  extern bool cpu_builtin_p;
>  
> +struct rs6000_asm_out_state : public asm_out_state
> +{
> +  /* Initialize ELF sections. */
> +  void init_elf_sections ();
> +
> +  /* Initialize XCOFF sections. */
> +  void init_xcoff_sections ();
> +};

Our coding convention says to use "class", not "struct" (since this
isn't valid C code at all).

> -  sdata2_section
> + sec.sdata2
>      = get_unnamed_section (SECTION_WRITE, output_section_asm_op,
>  			   SDATA2_SECTION_ASM_OP);

(broken indentation)

> +/* Implement TARGET_ASM_INIT_SECTIONS.  */

That comment is out-of-date.

> +static asm_out_state *
> +rs6000_elf_asm_init_sections (void)
> +{
> +  rs6000_asm_out_state *target_state
> +    = new (ggc_alloc<rs6000_asm_out_state> ()) rs6000_asm_out_state ();

Hrm, maybe we can have a macro or function that does this, ggc_new or
something?

> +/* Implement TARGET_ASM_INIT_SECTIONS.  */
> +
> +static asm_out_state *
> +rs6000_xcoff_asm_init_sections (void)

Here, too.  Both implementations are each one of several functions that
together implement the target macro.

> +    /* The section that holds the DWARF2 frame unwind information, when known.
> +       The section is set either by the target's init_sections hook or by the
> +       first call to switch_to_eh_frame_section.  */
> +    section *eh_frame;
> +
> +    /* RS6000 sections.  */

Nothing here?  Just remove the comment header?

The idea looks fine to me.


Segher

  reply	other threads:[~2021-10-25 16:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10  9:31 [PATCH][RFC] Come up with casm state Martin Liška
2021-09-16 10:00 ` [PATCH 1/N] Rename asm_out_file function arguments Martin Liška
2021-09-16 13:52   ` Iain Sandoe
2021-09-17  8:23     ` Richard Biener
2021-09-17  9:42       ` Iain Sandoe
2021-09-17  9:57         ` Richard Biener
2021-10-20 11:57   ` Martin Liška
2021-10-20 12:11     ` Richard Biener
2021-09-16 10:00 ` [PATCH 2/N] Do not hide asm_out_file in ASM_OUTPUT_ASCII Martin Liška
2021-09-22  9:44   ` Richard Biener
2021-09-30 11:46     ` Martin Liška
2021-09-16 13:12 ` [PATCH 3/N] Come up with casm global state Martin Liška
2021-09-22  9:59   ` Richard Biener
2021-10-04 11:13     ` Martin Liška
2021-10-05 11:54       ` Richard Biener
2021-10-21  9:47         ` Martin Liška
2021-10-21 12:42           ` Richard Biener
2021-10-21 13:43             ` Martin Liška
2021-10-21 13:57               ` Richard Biener
2021-10-21 15:40             ` Segher Boessenkool
2021-10-25 10:46               ` Richard Biener
2021-10-25 13:36                 ` Martin Liška
2021-10-25 16:30                   ` Segher Boessenkool [this message]
2021-10-26  7:45                     ` Richard Biener
2021-11-05 14:27                       ` Martin Liška
2021-11-09 12:49                         ` Richard Biener
2021-10-25 16:06                 ` Segher Boessenkool
2021-10-04 11:16   ` Martin Liška
2021-10-21 12:47   ` David Malcolm
2021-10-21 13:08     ` Richard Biener

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=20211025163047.GV614@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    --cc=richard.guenther@gmail.com \
    /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).