From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by sourceware.org (Postfix) with ESMTPS id A390A3858C2C for ; Thu, 4 Jan 2024 10:04:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A390A3858C2C Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A390A3858C2C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704362657; cv=none; b=drvVbnzOXPLvvHcBEJnP6BbfXHCVwAPSk53Pn4XDgpgIB7bSviyO1P1P7jHjxEMs/Rf+1RBtw9BXQflLr/V0opRFgnaDObLikgXAfVPWpG28ekfzmMkX2yCGk7ND4HAL1XGJ4xnggweKefDTUpZ2RHQYfJ1ghyqNBnLhLAtXGDU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704362657; c=relaxed/simple; bh=d0ZPC6rhl3aR10iSzRR8w5BIRUIX3bkcRbkE8wS3k4k=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=qE+B7ipa7FpccwRVWUDwQlfv3+ZhsNhAofzvEoKbaFtogwcS+SoLmdbgJzgi2Gpe6VUQMye7IbjcBmU8TvZiEE3eLCgV1/+M9mXJLKgdCWsXDTaSD/Rwerh/5/fd370lm/nZa5VHVHguLb0S+cjmhTVfP1MYfBnc6MrF4n16nj0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-28cb1286e10so204868a91.0 for ; Thu, 04 Jan 2024 02:04:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1704362652; x=1704967452; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vlOHEU6Z6CHNVHlBmHUCeP5MY51NZeWuAZ9JxwJ1AwU=; b=ESHrDJs/0Vs15+iiV/Sz2oqafO0UijWa/IVyc+7+ExetBBSpMOrSZgkQyNuYdc3PZA RXir9rlAWvW2B3SOBFQmY5BEwYk3DTByxwecUKYqZLtc6IveCD27Eb7cNkkeo3vRfuDW sZg+UV2YG9daD7Uswkijh2mQ8tVZxmrVT5fP9ntGoRemndjS/zA5BvepuFryZ1MjAhQT kxD9+8L2tuGr3HuOaXsZQBVChD6P9ILZL+ibPAmRac3w5IK6UlilaQxuZ9oy9Mael1fq zq7bAsfolxO7qVuI8QuLOqGd+LhnZqL0HSe9hStso5wtlaw0U48mdVo07JKxNmr4MjQ9 WyTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704362652; x=1704967452; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vlOHEU6Z6CHNVHlBmHUCeP5MY51NZeWuAZ9JxwJ1AwU=; b=tAIKze1Bhnqrcq7thZVeiWUPofcE2YWqOqDfwLqOopVTfYCXLJgi+sxTGIkL0SUtmR XHEa5aNcvYFUkImR/RyiodmNoQ5RZD1H2wzxA2UPb6rW1mCMtRXZzuX8ZIleFSeWrMs7 hOSkvlEsyQKM8EcKm1+bTFYXG/BYnMvngjBGV3hvi2aep5i5bfMaCPl8qAxJ5bUvG2KR DQ+27CzhxV7D7VgEbDT28wf6acY4UDqjlfpq/wRkuSyXGRIVP8P0o7xU5Ef6c9hbGUu8 810eSkRB4q5qYYLITb+fsi+xeO1eTIRa1khcxnsG4VoBeEQmlKQSdWPX4dkj0O+gczED 7h+g== X-Gm-Message-State: AOJu0YzPIQv35EytVWhoduvgIzG6rrMux5jE2Q0B4XJOdlwYo7PrpDM7 O0q9DXSysqHza3JoJkoY51+dWhnmquRbGEcKDm0pYRDubqr1hg== X-Google-Smtp-Source: AGHT+IHdDVXuqRiuyDXHMWHe8bjIzRAP7Vd8UZk1ngOvNGFUvwdkR7tNM+TM+f//ocbmoFe04XaEJi5LggcivRXMq58= X-Received: by 2002:a17:90a:b293:b0:28b:d908:7af5 with SMTP id c19-20020a17090ab29300b0028bd9087af5mr278351pjr.76.1704362652550; Thu, 04 Jan 2024 02:04:12 -0800 (PST) MIME-Version: 1.0 References: <9C9A2CEFF50F1A0D+2024010417182466760410@rivai.ai> In-Reply-To: <9C9A2CEFF50F1A0D+2024010417182466760410@rivai.ai> From: =?UTF-8?Q?Christoph_M=C3=BCllner?= Date: Thu, 4 Jan 2024 11:04:01 +0100 Message-ID: Subject: Re: Re: [PATCH v4] RISC-V: Adds the prefix "th." for the instructions of XTheadVector. To: "juzhe.zhong@rivai.ai" Cc: "cooper.joshua" , jeffreyalaw , gcc-patches , Jim Wilson , palmer , andrew , "philipp.tomsich" , jinma , "cooper.qu" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_ASCII_DIVIDERS,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Jan 4, 2024 at 10:18=E2=80=AFAM juzhe.zhong@rivai.ai wrote: > > \ No newline at end of file > > Each file needs newline. > > I am not able to review arch stuff. This needs kito. > > Besides, Andrew Pinski want us defer theadvector to GCC-15. Maybe I misread this (sorry if so), but I though that was answered by Kito = here: https://gcc.gnu.org/pipermail/gcc-patches/2024-January/641723.html > > I have no strong opinion here. > > ________________________________ > juzhe.zhong@rivai.ai > > > =E5=8F=91=E4=BB=B6=E4=BA=BA=EF=BC=9A joshua > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4=EF=BC=9A 2024-01-04 17:15 > =E6=94=B6=E4=BB=B6=E4=BA=BA=EF=BC=9A =E9=92=9F=E5=B1=85=E5=93=B2; Jeff La= w; gcc-patches > =E6=8A=84=E9=80=81=EF=BC=9A jim.wilson.gcc; palmer; andrew; philipp.tomsi= ch; Christoph M=C3=BCllner; jinma; Cooper Qu > =E4=B8=BB=E9=A2=98=EF=BC=9A Re=EF=BC=9ARe: [PATCH v4] RISC-V: Adds the pr= efix "th." for the instructions of XTheadVector. > Hi Juzhe, > > So is the following patch that this patch relies on OK to commit? > https://gcc.gnu.org/pipermail/gcc-patches/2023-December/641533.html > > Joshua > > > > > ------------------------------------------------------------------ > =E5=8F=91=E4=BB=B6=E4=BA=BA=EF=BC=9A=E9=92=9F=E5=B1=85=E5=93=B2 > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4=EF=BC=9A2024=E5=B9=B41=E6=9C=882=E6= =97=A5(=E6=98=9F=E6=9C=9F=E4=BA=8C) 06:57 > =E6=94=B6=E4=BB=B6=E4=BA=BA=EF=BC=9AJeff Law; "coo= per.joshua"; "gcc-patches" > =E6=8A=84=E3=80=80=E9=80=81=EF=BC=9A"jim.wilson.gcc"; palmer; andrew; "philipp.toms= ich"; "Christoph M=C3=BCllner"; jinma; Cooper Qu > =E4=B8=BB=E3=80=80=E9=A2=98=EF=BC=9ARe: Re: [PATCH v4] RISC-V: Adds the p= refix "th." for the instructions of XTheadVector. > > > This is Ok from my side. > But before commit this patch, I think we need this patch first: > https://gcc.gnu.org/pipermail/gcc-patches/2023-December/641533.html > > > I will be back to work so I will take a look at other patches today. > juzhe.zhong@rivai.ai > > > From: Jeff Law > Date: 2024-01-01 01:43 > To: Jun Sha (Joshua); gcc-patches > CC: jim.wilson.gcc; palmer; andrew; philipp.tomsich; christoph.muellner; = juzhe.zhong; Jin Ma; Xianmiao Qu > Subject: Re: [PATCH v4] RISC-V: Adds the prefix "th." for the instruction= s of XTheadVector. > > > > On 12/28/23 21:19, Jun Sha (Joshua) wrote: > > This patch adds th. prefix to all XTheadVector instructions by > > implementing new assembly output functions. We only check the > > prefix is 'v', so that no extra attribute is needed. > > > > gcc/ChangeLog: > > > > * config/riscv/riscv-protos.h (riscv_asm_output_opcode): > > New function to add assembler insn code prefix/suffix. > > * config/riscv/riscv.cc (riscv_asm_output_opcode): Likewise. > > * config/riscv/riscv.h (ASM_OUTPUT_OPCODE): Likewise. > > > > Co-authored-by: Jin Ma > > Co-authored-by: Xianmiao Qu > > Co-authored-by: Christoph M=C3=BCllner > > --- > > gcc/config/riscv/riscv-protos.h | 1 + > > gcc/config/riscv/riscv.cc | 14 +++++++++++++= + > > gcc/config/riscv/riscv.h | 4 ++++ > > .../gcc.target/riscv/rvv/xtheadvector/prefix.c | 12 ++++++++++++ > > 4 files changed, 31 insertions(+) > > create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/xtheadvector/pr= efix.c > > > > diff --git a/gcc/config/riscv/riscv-protos.h b/gcc/config/riscv/riscv-p= rotos.h > > index 31049ef7523..5ea54b45703 100644 > > --- a/gcc/config/riscv/riscv-protos.h > > +++ b/gcc/config/riscv/riscv-protos.h > > @@ -102,6 +102,7 @@ struct riscv_address_info { > > }; > > > > /* Routines implemented in riscv.cc. */ > > +extern const char *riscv_asm_output_opcode (FILE *asm_out_file, const = char *p); > > extern enum riscv_symbol_type riscv_classify_symbolic_expression (rtx= ); > > extern bool riscv_symbolic_constant_p (rtx, enum riscv_symbol_type *)= ; > > extern int riscv_float_const_rtx_index_for_fli (rtx); > > diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc > > index 0d1cbc5cb5f..ea1d59d9cf2 100644 > > --- a/gcc/config/riscv/riscv.cc > > +++ b/gcc/config/riscv/riscv.cc > > @@ -5636,6 +5636,20 @@ riscv_get_v_regno_alignment (machine_mode mode) > > return lmul; > > } > > > > +/* Define ASM_OUTPUT_OPCODE to do anything special before > > + emitting an opcode. */ > > +const char * > > +riscv_asm_output_opcode (FILE *asm_out_file, const char *p) > > +{ > > + /* We need to add th. prefix to all the xtheadvector > > + insturctions here.*/ > > + if (TARGET_XTHEADVECTOR && current_output_insn !=3D NULL_RTX && > > + p[0] =3D=3D 'v') > > + fputs ("th.", asm_out_file); > > + > > + return p; > Just a formatting nit. The GNU standards break lines before the > operator, not after. So > if (TARGET_XTHEADVECTOR > && current_output_insn !=3D NULL > && p[0] =3D=3D 'v') > > Note that current_output_insn is "extern rtx_insn *", so use NULL, not > NULL_RTX. > > Neither of these nits require a new version for review. Just fix them. > > If Juzhe is fine with this, so am I. We can refine it if necessary later= . > > jeff > > >