From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id B918F385AE61 for ; Thu, 28 Jul 2022 12:36:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B918F385AE61 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-oi1-x236.google.com with SMTP id p132so2238935oif.9 for ; Thu, 28 Jul 2022 05:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i9VWd2Jsl3hiIhBlNSU+9AtpimHzd3VTs91Q/mPWpdU=; b=gs3Er8PD89EfaSawE1QS1nP35eJDbkmE42EqgtHaAsZSe8tHcULksYyH7WVJf0iAxq y1XDiXy8puDzhO2M3JAe1yHuzJU2rpUwL97/uTm6KjHu3wAfokNcShqxzKeqq+S6eboT Qj7yZPiHj/4PTXe5u2FGf72KmhvYse/68hl62myYXQ+MFFQdGJSHxTXMPpTV208+4qVT VVcv/MkHhzR20wRfJtB4COZm6CYM1lKa6nyd874kV7yrH5S8dXGnO4tHv+UNqh6pKcQn O3pGwVEjEjXBX5OIlkArqvY533T4B7T05hMKuswNX4t8SaGv3j4kwqBJYCZliRrqOXwk Nyzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i9VWd2Jsl3hiIhBlNSU+9AtpimHzd3VTs91Q/mPWpdU=; b=Hu2LSLrSGTs5iJBaXj68lS/tkzsI3YwxamOmvKZS8tuxitJMROPqzV/riEitCKhMEP EglGW7Gn+CGk5rQXpJXpgK9oyDrNebjyNAxaQiZLCqSIasEc1I1vfCKEfZr6Nny9S810 I9P567GXzVFVn+cfa+7FZQZXbE/ZPHfQ5LtYGvF/CGUKthklnMw1/l6yV/wJKsAkLHwW MUNL5jsMDkoAdjqW86NgFz/2EGzneaSuKgWidc23hLR20hOIyRQjj5Ljebh0WcszHKOm O7CDbSzx3A+ptOIXXYFkFXVUkkJEJqDDPbwvG1CAGSzILzt90D5/cyA2o5Wxhm2MIFAE cZdg== X-Gm-Message-State: AJIora+YpCWmjV+m1f8f+a3IpJ9u7x+fiVH0N5KrBhX0mYVyZBk6mX9x cXctWAOo1O1pyQSDXK9Wqxkh+v1CvL3KCWXfVxWKNA== X-Google-Smtp-Source: AGRyM1s5lEODXL0BBW0gbw2H7Bkjb7C3ZLEvmCjCTtGAuOf6rzLquhx3HF/QL0UyGMSfBbDbbQHGxMWQnlpaf0n6D80= X-Received: by 2002:a05:6808:1201:b0:325:75e1:25a8 with SMTP id a1-20020a056808120100b0032575e125a8mr3807672oil.18.1659011767843; Thu, 28 Jul 2022 05:36:07 -0700 (PDT) MIME-Version: 1.0 References: <287255b3-ab0c-1cf6-2681-e35fef1d8b05@irq.a4lg.com> In-Reply-To: <287255b3-ab0c-1cf6-2681-e35fef1d8b05@irq.a4lg.com> From: Kito Cheng Date: Thu, 28 Jul 2022 20:35:57 +0800 Message-ID: Subject: Re: [PATCH 0/1] RISC-V: Add `OP_V' to .insn named opcodes To: Tsukasa OI Cc: Nelson Chu , Palmer Dabbelt , Binutils X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2022 12:36:11 -0000 Hi Tsukasa: Could you add your sample.s as testcase? Thanks On Thu, Jul 28, 2022 at 7:46 PM Tsukasa OI wrote: > Ping. > > I noticed that LLVM (14 or later) already implements this named opcode. > > sample.s: > .attribute arch, "rv64gcv" > # Both vadd.vv v1,v2,v3 > .insn r 0x57, 0, 1, x1, x3, x2 > .insn r OP_V, 0, 1, x1, x3, x2 > > $ llvm-mc -filetype=obj -triple=riscv64 -o sample.o sample.s > $ riscv64-unknown-elf-objdump -d sample.o > (...) > 0000000000000000 <.text>: > 0: 022180d7 vadd.vv v1,v2,v3 > 4: 022180d7 vadd.vv v1,v2,v3 > > Even after this patch, following assembly file generates an error > (unlike LLVM). I'm going to raise an issue later. > > sample2.s: > .attribute arch, "rv64gcv" > # vadd.vv v1,v2,v3 (okay on LLVM but error on Binutils) > .insn r OP_V, 0, 1, v1, v3, v2 > > Thanks, > Tsukasa > > > On 2022/07/09 12:51, Tsukasa OI wrote: > > Hello, > > > > This small patch adds OP_V to named opcode list for .insn directive. > > > > Tracker on GitHub: > > > > > > Sidenote: > > I started listing my Binutils submissions on my GitHub Wiki: > > > > hoping that current status and conflicting patches are clear. > > > > > > OP-V (0x57) is an opcode for vector instructions (defined on now > > ratified V extension). It adds OP_V to named constants of .insn > directive > > (note that replacing - with _ is standard on GNU Binutils' .insn). > > > > Although vector instruction encoding is not implemented in .insn > directive, > > it will help future implementation of custom vector .insn. > > > > If Zp* extensions are ratified, we could add OP_P (0x77) likewise. > > > > > > Thanks, > > Tsukasa > > > > > > > > > > Tsukasa OI (1): > > RISC-V: Add `OP_V' to .insn named opcodes > > > > gas/config/tc-riscv.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > base-commit: d2acd4b0c5bab349aaa152d60268bc144634a844 >