From patchwork Fri May 19 03:48:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liao Shihua X-Patchwork-Id: 9549 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp963941vqo; Thu, 18 May 2023 20:49:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76WUErIf5VncWeAI+YRkiiFomEVJbOh+VCml2E26woZGM5yIhmIyuCxVGFQKluH6E3uXYB X-Received: by 2002:a17:907:3fa8:b0:969:9fd0:7cf2 with SMTP id hr40-20020a1709073fa800b009699fd07cf2mr392562ejc.10.1684468191643; Thu, 18 May 2023 20:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684468191; cv=none; d=google.com; s=arc-20160816; b=zR43AkoX4MbQEtbWIJDdqP+7Vvtt5X76yCS1Ryk+BxzkEJJDHieISNYW0OcM6uCVCj F0bBHdVgesqe2mPGwd97E39mwlGs0z6DubuKQI/2sVG57236UksLKCzoOYH0y+p8PtKU VLw9RTnaezSa2dHLyR6WB0PBgn/v5Grjmp0G/PFynHH+zk7H03OhEtJs4uFiLHjQvxID aAarGk69qYk5DjmGUHY1bpVH5elCTwEV1m6NmdENYje3xSuRyx1EQrjj0fAQq2qakpTg u2iMGAaE4UhtZliZfpytJqxwSf3dPTBaXM6qdaoSa0wB7jR++CgLW3FH/3qJRtF5FI4/ MHDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dmarc-filter :delivered-to; bh=ZDhF+kaeRZ7aERkGfhEZ9/0IgXi83b46dZy1r3q+EiQ=; b=eakR0LGRXqJ6Gmjw0kpeJlBXmyR0RB+75G1Usf/FPUk55bxTFbpl3t0NbWgULBuq1J tHi/V+56o41k/xhSa4sYxiVUZYBRGhFDHfjKX+7mLT3Qv/qGBBH3d93LYjv/szJVNwUH 5m1YrAxhRrKjIwZCUeda/RHwbndL4CVHHx2GQUCGSUWZ3OZvXymU0ULBOEu9MqhkpbPC 3y6FFwD9kuWQ8U6ia8sCfvAFgvgQR6bd6H4m3HFU3qVgRr6+6KYc1qYVR8UKY6lIIFfc Zr6zRxRXjTvr3nIMqmnVzVxaRdXgB2VuVrmeMc6VffYGC8PI/bcWHkBo2wI7goqMKwYP qw7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v15-20020a1709064e8f00b0096a2eba9b1csi13156eju.497.2023.05.18.20.49.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 20:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C9D313846440 for ; Fri, 19 May 2023 03:49:24 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from cstnet.cn (smtp25.cstnet.cn [159.226.251.25]) by sourceware.org (Postfix) with ESMTPS id 766EB3846036 for ; Fri, 19 May 2023 03:49:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 766EB3846036 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from localhost.localdomain (unknown [39.170.88.238]) by APP-05 (Coremail) with SMTP id zQCowAAHuxGt8WZk_iYmAQ--.24085S2; Fri, 19 May 2023 11:49:02 +0800 (CST) From: Liao Shihua To: binutils@sourceware.org Cc: kito.cheng@sifive.com, jiawei@iscas.ac.cn, palmer@dabbelt.com, guoren@kernel.org, wuwei2016@iscas.ac.cn, shiyulong@iscas.ac.cn, chenyixuan@iscas.ac.cn, Liao Shihua Subject: [RFC PATCH V2 0/4] RISC-V : Support ilp32 abi on rv64 isa Date: Fri, 19 May 2023 11:48:31 +0800 Message-Id: <20230519034835.664-1-shihua@iscas.ac.cn> X-Mailer: git-send-email 2.38.1.windows.1 MIME-Version: 1.0 X-CM-TRANSID: zQCowAAHuxGt8WZk_iYmAQ--.24085S2 X-Coremail-Antispam: 1UD129KBjvdXoWrKF45uryrGr48Cr47Wr43trb_yoWktFgEk3 s7C347W34xXayUtFZ8GryfKry5trZ2v3s5XFW7Kw4kGay5ur15J3yjyr1YgF1UZFWxtrWS yas7Cr4Sgr4DZjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbz8FF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVWxJr 0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l42xK82IYc2Ij64vI r41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8V AvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E 14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUF9a9DUUUU X-Originating-IP: [39.170.88.238] X-CM-SenderInfo: xvklx33d6l2u1dvotugofq/1tbiCQoQEWRmyJedfgAAs8 X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, 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: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766292918211647560?= X-GMAIL-MSGID: =?utf-8?q?1766292918211647560?= These patches support ilp32 abi on rv64 isa. In these patches, I add a new bfd_mach, a new e_flags and a new riscv_gdbarch_features. The difference between rv64 ilp32 and rv64 lp64 are pointer type_size, long type_size, and link spec. The series kernel support in this link. https://lore.kernel.org/linux-riscv/20230518131013.3366406-1-guoren@kernel.org/ Liao Shihua (4): Remove checking when -march=rv64XX and -mabi=ilp32X Add support for rv64 arch using ilp32 abi Add rv64 ilp32 support in disassemble Add rv64 ilp32 support in gdb bfd/archures.c | 1 + bfd/bfd-in2.h | 1 + bfd/cpu-riscv.c | 2 ++ bfd/elfnn-riscv.c | 33 ++++++++++++------- binutils/readelf.c | 3 ++ gas/config/tc-riscv.c | 23 ++++++++++--- .../gas/riscv/mabi-fail-rv64iq-ilp32.d | 3 -- .../gas/riscv/mabi-fail-rv64iq-ilp32.l | 2 -- gdb/arch/riscv.h | 10 +++++- gdb/riscv-tdep.c | 20 ++++++++--- include/elf/riscv.h | 3 ++ opcodes/riscv-dis.c | 6 ++-- 12 files changed, 78 insertions(+), 29 deletions(-) delete mode 100644 gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.d delete mode 100644 gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.l