public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Hu, Jiangping" <hujiangping@cn.fujitsu.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: RE: [PATCH] target: fix default value checking of x_str_align_functions in aarch64.c
Date: Thu, 16 Jul 2020 10:11:25 +0000	[thread overview]
Message-ID: <3089bc921d414bf8abc17ada6310252e@G08CNEXMBPEKD06.g08.fujitsu.local> (raw)
In-Reply-To: <20200714075518.4653-1-hujiangping@cn.fujitsu.com>

PING.

> -----Original Message-----
> From: Gcc-patches <gcc-patches-bounces@gcc.gnu.org> On Behalf Of Hu
> Jiangping
> Sent: Tuesday, July 14, 2020 3:55 PM
> To: gcc-patches@gcc.gnu.org
> Subject: [PATCH] target: fix default value checking of x_str_align_functions in
> aarch64.c
> 
> Hi,
> 
> This patch deal with the -falign-X=0 options. According to man pages,
> if zero is specified, a machine-dependent default value should be used.
> But in fact, zero was used in internal process, it is inconsistent.
> 
> Tested on aarch64-linux cross compiler, Is that OK?
> 
> BTW, the similar problems exists in other target sources.
> I can submit them all in another patch if needed,
> but I can test on i386 target only.
> 
> Regards!
> Hujp
> 
> ---
>  gcc/config/aarch64/aarch64.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
> index 17dbe673978..697ac676f4d 100644
> --- a/gcc/config/aarch64/aarch64.c
> +++ b/gcc/config/aarch64/aarch64.c
> @@ -14221,11 +14221,14 @@ aarch64_override_options_after_change_1
> (struct gcc_options *opts)
>       alignment to what the target wants.  */
>    if (!opts->x_optimize_size)
>      {
> -      if (opts->x_flag_align_loops && !opts->x_str_align_loops)
> +      if ((opts->x_flag_align_loops && !opts->x_str_align_loops)
> +        || (opts->x_str_align_loops && strcmp(opts->x_str_align_loops, "0") ==
> 0))
>  	opts->x_str_align_loops = aarch64_tune_params.loop_align;
> -      if (opts->x_flag_align_jumps && !opts->x_str_align_jumps)
> +      if ((opts->x_flag_align_jumps && !opts->x_str_align_jumps)
> +        || (opts->x_str_align_jumps && strcmp(opts->x_str_align_jumps, "0")
> == 0))
>  	opts->x_str_align_jumps = aarch64_tune_params.jump_align;
> -      if (opts->x_flag_align_functions && !opts->x_str_align_functions)
> +      if ((opts->x_flag_align_functions && !opts->x_str_align_functions)
> +        || (opts->x_str_align_functions && strcmp(opts->x_str_align_functions,
> "0") == 0))
>  	opts->x_str_align_functions = aarch64_tune_params.function_align;
>      }
> 
> --
> 2.17.1
> 
> 




  reply	other threads:[~2020-07-16 10:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  7:55 Hu Jiangping
2020-07-16 10:11 ` Hu, Jiangping [this message]
2020-07-20 14:03 ` Richard Sandiford
2020-07-21 11:06   ` Hu, Jiangping
2020-07-21 12:44     ` Richard Sandiford

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=3089bc921d414bf8abc17ada6310252e@G08CNEXMBPEKD06.g08.fujitsu.local \
    --to=hujiangping@cn.fujitsu.com \
    --cc=gcc-patches@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).