From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id CE9A33858430 for ; Sat, 9 Jul 2022 09:09:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE9A33858430 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 1B3EB300089; Sat, 9 Jul 2022 09:09:19 +0000 (UTC) From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Cc: binutils@sourceware.org Subject: [PATCH 0/5] RISC-V: Opcode tidying (batch 1) Date: Sat, 9 Jul 2022 18:09:09 +0900 Message-Id: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 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: Sat, 09 Jul 2022 09:09:23 -0000 Hello, This patchset contains various tidying of RISC-V opcodes (this is the first batch). The background of this patchset is partially semi-automated comparison with riscv-opc.h in GNU Binutils and encoding.h generated by riscv-opcodes (https://github.com/riscv/riscv-opcodes). Tracker on GitHub: [Overview of this Patchset] 1. Instruction Name Maintainance a. Remove unused instructions [PATCH 1] b. Use ecall/ebreak instead of scall/sbreak (remove scall/sbreak-related macros) [PATCH 2] c. Use fmv.w.x/fmv.x.w instead of fmv.s.x/fmv.x.s [PATCH 3] d. Make alias instruction real aliases [PATCH 5] 2. Prefer using defined mask and match values (applies to c.nop and fence.i) [PATCH 4] Note that this patchset doesn't: - Remove existing instructions (just removes unused mask and match macros behind the instruction) - Change macro values (just names and formatting) - Replace riscv-opc.h with riscv-opcodes generated one. If you use riscv-opcodes for new instructions (copy portions of encoding.h to riscv-opc.h), porting new instruction will be easy and the result will be more consistent. I tried this approach on upcoming Zihintntl patchset and it worked pretty well. This patchset is only about refactoring and maintainance. Nothing functional. Thanks, Tsukasa Tsukasa OI (5): RISC-V: Remove unused instruction macros RISC-V: Complete tidying up with SCALL and SBREAK RISC-V: Tidying up with fmv.w.x and fmv.x.w RISC-V: Use defined mask and match values RISC-V: Make alias instructions aliases include/opcode/riscv-opc.h | 47 +++++--------------------------------- opcodes/riscv-opc.c | 18 +++++++-------- sim/riscv/sim-main.c | 6 ++--- 3 files changed, 18 insertions(+), 53 deletions(-) base-commit: d2acd4b0c5bab349aaa152d60268bc144634a844 -- 2.34.1