public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@sifive.com>
To: Shi-Hua Liao <shihua@iscas.ac.cn>
Cc: "GCC Patches" <gcc-patches@gcc.gnu.org>,
	"Jim Wilson" <jimw@sifive.com>,
	"Christoph Muellner" <cmuellner@ventanamicro.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Andrew Waterman" <andrew@sifive.com>,
	"Wei Wu (吴伟)" <lazyparser@gmail.com>, jiawei <jiawei@iscas.ac.cn>,
	anku.anand@gmail.com
Subject: Re: RISCV: Add zmmul extension
Date: Wed, 27 Oct 2021 15:13:59 +0800	[thread overview]
Message-ID: <CALLt3ThOhcXUuEz6hGywPWGPEB0N4cWDjRRCX2=+21zqoNwmBw@mail.gmail.com> (raw)
In-Reply-To: <20211027025116.1720-1-shihua@iscas.ac.cn>

Hi Shi-Hua:

> --- a/gcc/config/riscv/riscv.c
> +++ b/gcc/config/riscv/riscv.c
> @@ -1872,7 +1872,7 @@ riscv_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno ATTRIBUTE_UN
>      case MULT:
>        if (float_mode_p)
>         *total = tune_param->fp_mul[mode == DFmode];
> -      else if (!TARGET_MUL)
> +      else if (!TARGET_MUL && !TARGET_ZMMUL)
>         /* Estimate the cost of a library call.  */
>         *total = COSTS_N_INSNS (speed ? 32 : 6);
>        else if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
> @@ -4736,6 +4736,9 @@ riscv_option_override (void)
>    if (flag_pic)
>      g_switch_value = 0;
>
> +  /* zmmul */
> +  if (TARGET_ZMMUL && TARGET_MUL)
> +    error ("can not use both the %<ZMMUL%> and the %<M%> extension");

My understanding is zmmul and M are not mutually exclusive, so we
don't need this check,

Otherwise it is LGTM, but I'm just surprised it's still 0.1 and not frozen yet.

[1] https://github.com/riscv/riscv-isa-manual/pull/648#issuecomment-842461775

  reply	other threads:[~2021-10-27  7:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27  2:51 shihua
2021-10-27  7:13 ` Kito Cheng [this message]
2021-10-27 23:40   ` Jim Wilson

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='CALLt3ThOhcXUuEz6hGywPWGPEB0N4cWDjRRCX2=+21zqoNwmBw@mail.gmail.com' \
    --to=kito.cheng@sifive.com \
    --cc=andrew@sifive.com \
    --cc=anku.anand@gmail.com \
    --cc=cmuellner@ventanamicro.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jiawei@iscas.ac.cn \
    --cc=jimw@sifive.com \
    --cc=lazyparser@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=shihua@iscas.ac.cn \
    /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).