public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
To: jeffreyalaw <jeffreyalaw@gmail.com>,
	 gcc-patches <gcc-patches@gcc.gnu.org>
Cc: kito.cheng <kito.cheng@gmail.com>,  palmer <palmer@dabbelt.com>
Subject: Re: Re: [PATCH] RISC-V: Fix SEW64 of vrsub.vx runtime fail in RV32 system
Date: Mon, 3 Apr 2023 12:18:58 +0800	[thread overview]
Message-ID: <BA05F08C8A16F007+2023040312185834454250@rivai.ai> (raw)
In-Reply-To: <2fa75b34-889f-d6c7-ec91-25999acbde4b@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2273 bytes --]

OK, would you mind telling me some tool can help for formatting of .MD file?
Since clang-format only works on .cc/.h file.

I have asked many people how to format .MD file but I didn't get the answer.
So that's why you can see formatting of .MD file is not good. Unlike .cc/.h files.

Thanks.


juzhe.zhong@rivai.ai
 
From: Jeff Law
Date: 2023-04-03 12:13
To: juzhe.zhong; gcc-patches
CC: kito.cheng; palmer
Subject: Re: [PATCH] RISC-V: Fix SEW64 of vrsub.vx runtime fail in RV32 system
 
 
On 4/2/23 18:38, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
> 
> It's quite obvious that the order of vrsub SEW64 is wrong.
> 
> gcc/ChangeLog:
> 
>          * config/riscv/vector.md: Fix incorrect operand order.
Note the formatting in that code is wrong on multiple levels.  While I 
don't typically get nit-picky on formatting, this needs serious cleanup 
for gcc-14:
 
>  if (riscv_vector::sew64_scalar_helper (
>     operands,
>     /* scalar op */&operands[3],
>     /* vl */operands[5],
>     <MODE>mode,
>     <VM>mode,                      
>     riscv_vector::simm5_p (operands[3]),
>     [] (rtx *operands, rtx boardcast_scalar) {
>       emit_insn (gen_pred_merge<mode> (operands[0], operands[1],
>            operands[2], boardcast_scalar, operands[4], operands[5],
>            operands[6], operands[7]));
>         }))
 
 
Please review the coding standards, particularly with regards to 
indention and function call parameters.  When you find that you're 
writing code like this:
 
   emit_insn (gen_something (x, y,
    x, p, q, r, s, t));
 
Please break it up.   Pull the generator call out and store its result 
in a temporary.  Then fix the indention of its arguments so that it 
looks like this:
 
   temp = gen_something (some_long_argument, another_long_argument,
                         more_long_args, something_else);
 
 
The coding standards exist to make it easier for everyone to be able to 
understand your code without having to waste mental energy parsing 
different formatting styles.
 
As it stands I'm spending *far* too much mental energy just trying to 
figure out what arguments are associated with what calls.  That's just 
crazy.
 
jeff
 
 

  reply	other threads:[~2023-04-03  4:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03  0:38 juzhe.zhong
2023-04-03  4:13 ` Jeff Law
2023-04-03  4:18   ` juzhe.zhong [this message]
2023-04-05  1:34     ` Jeff Law
2023-04-05 13:49 ` Jeff Law

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=BA05F08C8A16F007+2023040312185834454250@rivai.ai \
    --to=juzhe.zhong@rivai.ai \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.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).