From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x933.google.com (mail-ua1-x933.google.com [IPv6:2607:f8b0:4864:20::933]) by sourceware.org (Postfix) with ESMTPS id A97593858C83 for ; Mon, 7 Feb 2022 06:47:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A97593858C83 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-ua1-x933.google.com with SMTP id g15so6899305uap.11 for ; Sun, 06 Feb 2022 22:47:16 -0800 (PST) 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=Fom8HA1B69ftXpoySpCN7GpRLFPjjhyZAlIzUENlGr8=; b=Ke/AN7Hab+Bt7T7DTvAi/OIaxdRol73wNQBxEBLuZ0ocM7R3U82r+zcFLStCnRQmE3 lmCCOWKV5KEpJuQH4L9OY1OOw8/5tigkjTOhJ2QJu/kWCk7qb5cVJXRWeJy51PlUHKGm WcPjLuq8/hA5rBGwaDuSjyI1hfNYvgicNsAdid0OunGPAFlxa0eUa+JUH5fKWY0I1TCm h29Qr6kqf1g8orKl7rbEMHrhzxzG8F42SUAses7NIMEIeekQUul8dpEKWUvGuAdQ7Gnl M4ztJAIxDEBPXuPm4ohpuEknx44rkgAHPMEaNVWoF1O3qjldR5xmX+eYNeWOPOl308Vn iG7A== 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=Fom8HA1B69ftXpoySpCN7GpRLFPjjhyZAlIzUENlGr8=; b=uP68hpPRRKOA9kOEWCUwaExn9Knaowcm9rjBWWkqKpufrBTGDhJ7TATYBDcT9tA+Pp 0UguaVx1AtzRsIACeuPLKX46FjweaENe36mGoDwtI0ItDQOuvxvNZHd+e2LZ/NO02uvS XROm7FzovKFWVQL0R+Wz7auSMINget0GN9rK3xHq7O4wtEOPHnC1r8SvQ2EVqivpzbbO Eu3tg254oZ2QCrS4GA2DjK/p329qhtYWLnKS1drUaTUi+tVRLASlrKWjXzS6D/eAEWGf BTeho2jtPnxb+nPpCDvVpLoPaAgg+xPSRTbr1wSB8y4ScwBO6aDvzgW0HSNH8eRPvRRO PP2Q== X-Gm-Message-State: AOAM530Gg4wFpOO5HF2FDfCIduP1x40oX5pn8leay0FuFYVBOT/LNeA1 gVzJZOz7ggJU1wt/juPNfCj0+djUa2vP4AmcVWHQU9LNhzSqaA== X-Google-Smtp-Source: ABdhPJy+tY1/HLOOVNYqInflmZow7QMDJOfqjpedD7seO8Y4wtRcjCqS8SpeIdaUxYAFpCvAmN/5Cgxz8gc75iAP1Y4= X-Received: by 2002:ab0:74c7:: with SMTP id f7mr1022525uaq.109.1644216436021; Sun, 06 Feb 2022 22:47:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Nelson Chu Date: Mon, 7 Feb 2022 14:47:05 +0800 Message-ID: Subject: Re: [RFC PATCH v2 0/2] gdb, opcodes: Add isa disassembler option to RISC-V To: Tsukasa OI Cc: Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 07 Feb 2022 06:47:18 -0000 On Sun, Feb 6, 2022 at 10:11 AM Tsukasa OI via Binutils wrote: > > *** NOTE *** > PATCH 1 contains non-RISC-V (GDB-related) changes. > > > This patchset adds support for isa=ISA diassembler option to RISC-V. > > - objdump: -M isa=rv[32|64]... Not sure why we need it, but it would be better to discuss with the community (gcc and llvm) for something new like this first. You could try to create new issues on riscv psabi (https://github.com/riscv-non-isa/riscv-elf-psabi-doc) or riscv asm manual (https://github.com/riscv-non-isa/riscv-asm-manual). If the issues should be discussed elsewhere, I believe someone will tell you there. > - gdb: set disassembler-options isa=rv[32|64]... You should also send the gdb patch to gdb-patches@sourceware.org. There will be more gdb experts over there. > This patchset is version 2. Version 1 is here: > > > > My development branch on GitHub: > > > > [Changes between RFC PATCH v1 and RFC PATCH v2] > > The only functional change in the RFC PATCH v2 is that we reset `xlen' > variable to `0' before parsing ISA string. It has no effect on objdump > but on GDB, it stops preserving last XLEN value before setting invalid > ISA string (not starting with "rv32" or "rv64"). > > Rest of the changes are editorial. My language got broken while writing > v1 but I think most of them are fixed in v2. Also, most "-M isa" > (objdump-only) references are replaced with just "isa" to indicate > both objdump and GDB options. > > Renamed `xlen_set_by_option' to `xlen_by_isa' for clarity (meaning XLEN > set by "ISA string" option). > > > > > Tsukasa OI (2): > gdb, opcodes: Add non-enum disassembler options > RISC-V: Add isa disassembler option > > gdb/disasm.c | 4 ++++ > include/dis-asm.h | 3 ++- > opcodes/arc-dis.c | 2 ++ > opcodes/mips-dis.c | 2 ++ > opcodes/riscv-dis.c | 35 ++++++++++++++++++++++++++++------- > 5 files changed, 38 insertions(+), 8 deletions(-) > > > base-commit: 94e57f287f96af6af97dd086e4a04ddf55b7cf60 > -- > 2.32.0 >