Message ID | 20230510141829.2748105-1-aleksandar.rikalo@syrmia.com |
---|---|
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3660863vqo; Wed, 10 May 2023 07:19:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5+S9V/lNuWGI+0EIf08A11nv+gaaSCTQ60ByC5353zHTwwUc9Xj/xx/IrAGdr8Fsn6Iixv X-Received: by 2002:a17:907:9415:b0:94f:395b:df1b with SMTP id dk21-20020a170907941500b0094f395bdf1bmr14393018ejc.21.1683728341262; Wed, 10 May 2023 07:19:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683728341; cv=pass; d=google.com; s=arc-20160816; b=jlbFe3wqW9FihAPyhLK/Hvhlgio5LVRvBH2rsURFDeama7SI7+PfocJHoQz7tnHz5z Kqq5vtH6yeOQxW8OTNzPCBeTQahmiUD2EZS/R6KKugaPa/18tF5BTV8VGP4jzy6tgXeM 7LxmTvqy2Kg0vwv4n2T3BLB4K1chKgbts9cSNdrp4o2Mlm9f00grKexJ8ofZSvPoYM7+ ok/ZCx2GOfvNP8bZsgrZ0llTkKXRRdHyukNv4sQofOrRX0Rfc4ReIBR3fd+OT+kbxhjF eNun/lzqUUuRDmigaa6fnMnUABVLtMugdoi2+WatAbuRS41pKrthqeFl7RZpLrQoJR+C UFIw== ARC-Message-Signature: i=2; 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:mime-version :content-transfer-encoding:message-id:date:subject:cc:to:from :dkim-signature:dmarc-filter:delivered-to; bh=tAuZMZ2QPUq4GtbOpuYxHKsxzwM3c7c3jh3igvMQDZI=; b=0hoxPZID3C5/2oefhIuJTHhNSXWcVJDVowAyEJvNbxHh4+I9IIRU3tQJ1RSvn9o8IX 3iwkN7ec/GI+opQ9eVACmlk2i+oZx+kgIu+32W4lvhDKbVCQXo+d3zxoEu3srhVrwm12 dn8CxMFDdLpdB3GGyNI1aNupi3In1mtTUSKHdBYP5EqWpIFmrfzY7GwkKnjyZ/LYXHZm 61TluqczHaqdzvlcEWKcuRewvnJ/xi87DbeYkUAZk/9M4Ud9F6ty7yqDfdS1TW4eGvrz cichGknIFHQGNmgCsuvYxZAVfPn/xfdDhnhLHV/NbcXvK+g8EkFy6Zl57tp1vBwjPXy7 44eQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@syrmia.com header.s=selector1 header.b=zBUoPMQk; arc=pass (i=1 spf=pass spfdomain=syrmia.com dkim=pass dkdomain=syrmia.com dmarc=pass fromdomain=syrmia.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 g10-20020a056402114a00b0050572338dc4si3142874edw.244.2023.05.10.07.19.00 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 07:19:01 -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; dkim=pass header.i=@syrmia.com header.s=selector1 header.b=zBUoPMQk; arc=pass (i=1 spf=pass spfdomain=syrmia.com dkim=pass dkdomain=syrmia.com dmarc=pass fromdomain=syrmia.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 7918B385416E for <ouuuleilei@gmail.com>; Wed, 10 May 2023 14:18:56 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2101.outbound.protection.outlook.com [40.107.21.101]) by sourceware.org (Postfix) with ESMTPS id EE3CA38560A9 for <binutils@sourceware.org>; Wed, 10 May 2023 14:18:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE3CA38560A9 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=syrmia.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=syrmia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IS1bWa5LWTOERP7XYF2ar4iETzVu+FeliLQs+Uo2Tpp/tcRHMT8Itple7FCFfgO9cswHgMdlSmDfK07SGLrgAejFDNUeIIcKemI6vc54iOrFEJe+ayxwriyh29TtAs0i4D8cDLWhfAR/taLwYo0eCgH79RuD+8IbbEbUvNSB7B7u6Hs78oopVFxLb4wMnfRrAj5jQF/toS3DXHXrQPzCcopPpstU7nzVAwkGyCsPusVicrsw2zqqNQjTWUSCjlBP4S/io2WFc5BW7FkFl9xhpxNXdxxyCetOuneaxV3NaWCyu+CKHKpZZHDiBMv3Z7aC0scz9lIcIMQY2gBeUdOkSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tAuZMZ2QPUq4GtbOpuYxHKsxzwM3c7c3jh3igvMQDZI=; b=DiicMgANK5pA+oF4+SnOquyh79YnB0KmQUqKaDwPrqXpJhH+3unPPIjkuoTdhORQZgb43RLrnBjoncafJg30IDAXY/RjBREMSyux7AYtDvBKTt3SQ3LsW1F+VcxB5EgFdVn+1GWK30SMHC3Du5C2yLRcKSPNFRN67iOzG2GhoVjpZph3rUPdgvKtZvciu+68xoxpz8FJ259/fQSTcAt3nWFFY3sf1gvbt7CCIReiLP+Di3GFQi9mOXXbJQifUhTMBcPiksI8iR87XLELvyCLdN+WEXUU7jTXMRFUxfBaBKA5Uc4K9Q8qM1Suf0+4VR1gZgy8bOnID4EnOushIrOg2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=syrmia.com; dmarc=pass action=none header.from=syrmia.com; dkim=pass header.d=syrmia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syrmia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tAuZMZ2QPUq4GtbOpuYxHKsxzwM3c7c3jh3igvMQDZI=; b=zBUoPMQkTGvwYFwlJgfhm0NY2Spagzlb0JT+lx5L+HUcs4YZzb5SVpGojYLSIqrRnV4Fc1HGA4y7/NPP7xpIcUc7DTMFMyzANCy6370xCybbiql+Z1jMZOppU5ERHB3XilORxWrFgnAMgn40yoz+SZR0JZsDdKqVrL7Ia/+30xc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=syrmia.com; Received: from VI1PR0302MB3486.eurprd03.prod.outlook.com (2603:10a6:803:1e::32) by DB9PR03MB9784.eurprd03.prod.outlook.com (2603:10a6:10:456::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.31; Wed, 10 May 2023 14:18:46 +0000 Received: from VI1PR0302MB3486.eurprd03.prod.outlook.com ([fe80::82b5:25de:e5b:9914]) by VI1PR0302MB3486.eurprd03.prod.outlook.com ([fe80::82b5:25de:e5b:9914%4]) with mapi id 15.20.6387.018; Wed, 10 May 2023 14:18:46 +0000 From: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> To: binutils@sourceware.org Cc: nickc@redhat.com, macro@orcam.me.uk, dragan.mladjenovic@syrmia.com, lei.wang@oss.cipunited.com Subject: [PATCH v6 0/3] Add support for nanoMIPS architecture Date: Wed, 10 May 2023 16:18:26 +0200 Message-Id: <20230510141829.2748105-1-aleksandar.rikalo@syrmia.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1PR0501CA0030.eurprd05.prod.outlook.com (2603:10a6:800:60::16) To VI1PR0302MB3486.eurprd03.prod.outlook.com (2603:10a6:803:1e::32) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0302MB3486:EE_|DB9PR03MB9784:EE_ X-MS-Office365-Filtering-Correlation-Id: 325c4dcc-f89a-42aa-6fc1-08db5161775d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RgqGUz8wwapO+vfI4FH0wQLEec12FppWHM+XmpdvoEUyy4X/VTUp55MfOtZGU+vqkVPetfyXtnprjXXvnEg+q33BbQYwxhYMKgDtSsjhXnSWmhM5kQNCk0nYUxFZNvnui+iEtdYwlHUTh+KeQ0Unxff68Wn9zHsolHuFdPjbS2mSjFtswwr+OsjH3vJZktV6Pdi3hIH1mGhxj0rCuhUT3XT5Ureawv+wW5wpmR+bqYxDDBsz31xPmkUDoyKjdyWjMSkYx7ZdGUT0KEY697X1RHAmI66wtPMz8IKp8YgwA8Zo5OXHcw+fC9CR+AGSwTtqr3i01g4om+AxMLTCFgl95oL1FM/W7EPC8Q4sHF9dddiBCGyoXQDdMvInOA3WJ2S/esTl/KH7oKAP7cH0NPwJp3G7xIFsZdRvCJEdBLK2Ig8LGj9RBjRdjei36QlQE4qn8+d3ySYvBrDKDspR0F81auMaeV+Npg8KWl9Y6vvK4maNdDNz0MZavmnh1UxSW2KT+v4oaoIJPtSwafOOMW8lkTEkSPcgHbuf1xc6yJGr5ttG5sVleXpeOGfcYen4ajsKSRpeCyQiPnuGkvYnF6l+kYQbeGCaqqhp8Yxn2k/8+MgZKIYaE9A5HrYuN+UEl0iT X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0302MB3486.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39840400004)(396003)(366004)(346002)(376002)(136003)(451199021)(8676002)(36756003)(66556008)(83380400001)(38350700002)(44832011)(2906002)(38100700002)(316002)(86362001)(66946007)(6916009)(66476007)(41300700001)(4326008)(5660300002)(8936002)(52116002)(6506007)(26005)(186003)(6512007)(1076003)(2616005)(6666004)(478600001)(6486002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WAMw0WLJQxg9fIMdlBKKS/XLxVkN9eElL4YDNnvamCXHshfiJrKTq6ykp5bE+mHtogG7BP1GsaKB2XLlLbLslhT9vquxrBwg6aLVYIK3TXyQSjUhB8BgH+zEI/Rkr+5tMkYcmlxKmflky0plrvQIaCpTbF7AdO77zm9mQI45ASrshNUThP29Nx356Oe7349iquq0uxjUPLn0MyiLI21fS2SnxurUuUvH0yGxA5o5s857vCmx+pZ3A6v/bOVThQQIjZ/s5ak32r4OV3twXTshGuge0n1fFLaLX36Q6fUzlhdH7881jIqLZfJH96gEm5UxI0vsGm9PChHGWZknk0pvquZXPqagmsC0AwMnOdmUDHNHdKLGHkCM1cNAONSQw++zEYRDjme7dsMjH71B4xs63ubjyu/C75I2I1FGA22o3pPNLbO2ybs5IYFZcz1aND3ykZk4EmAAwu9lecFGieNiXrJdtNRRqxLQ521zx/Yjq/tv0i2CjXIJgmsCpydMrUgNLbCeLtlVazsjbBuiI9Aa5ACF6T3g/TvLtmFUCwIebq0C7L6tl58SLACEeviGvq4ttMQhyTAjYEDkDBSj6UE/Y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4dcc-f89a-42aa-6fc1-08db5161775d X-MS-Exchange-CrossTenant-AuthSource: VI1PR0302MB3486.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2023 14:18:46.1360 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 19214a73-c1ab-4e19-8f59-14bdcb09a66e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WqFEE4osDgNQ8M+xFsJlP1qOG4Xgke4c4tAy1IG9DBGiqTrzAZXSHLdAM6+sIMSuDf6gm5gHwHBzhQEILm5QzU3g+xn6IcFAgcf0yyCE4DM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR03MB9784 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765517129283533930?= X-GMAIL-MSGID: =?utf-8?q?1765517129283533930?= |
Series |
Add support for nanoMIPS architecture
|
|
Message
Aleksandar Rikalo
May 10, 2023, 2:18 p.m. UTC
This series introduces a subset of nanoMIPS functionalities. It's a pre-requirement for nanoMIPS support for GDB/SIM. Almost complete series is a "green patch" - it adds things, so the probability of making regressions of existing functionalities is minimal. Compared to the previous series version (v5), there are no functional impacts but changes are split into smaller parts. Patches can be safely merged one at a time while respecting the existing order. Aleksandar Rikalo (3): BFD changes for nanoMIPS support Opcodes changes for nanoMIPS support Readelf for nanoMIPS bfd/Makefile.am | 19 + bfd/Makefile.in | 22 + bfd/archures.c | 5 + bfd/bfd-in2.h | 74 ++ bfd/config.bfd | 6 + bfd/configure | 4 + bfd/configure.ac | 4 + bfd/cpu-nanomips.c | 61 ++ bfd/elf-bfd.h | 1 + bfd/elfnn-nanomips.c | 1423 ++++++++++++++++++++++++++++++++++ bfd/elfxx-mips.h | 5 + bfd/elfxx-nanomips.c | 794 +++++++++++++++++++ bfd/elfxx-nanomips.h | 54 ++ bfd/libbfd.h | 69 ++ bfd/reloc.c | 140 ++++ bfd/targets.c | 11 + binutils/readelf.c | 502 +++++++++++- include/dis-asm.h | 11 + include/elf/common.h | 2 +- include/elf/nanomips.h | 262 +++++++ include/opcode/nanomips.h | 1453 +++++++++++++++++++++++++++++++++++ opcodes/Makefile.am | 2 + opcodes/Makefile.in | 10 + opcodes/configure | 1 + opcodes/configure.ac | 1 + opcodes/dis-buf.c | 9 + opcodes/dis-init.c | 1 + opcodes/disassemble.c | 13 + opcodes/nanomips-dis.c | 1466 ++++++++++++++++++++++++++++++++++++ opcodes/nanomips-formats.h | 265 +++++++ opcodes/nanomips-opc.c | 1073 ++++++++++++++++++++++++++ 31 files changed, 7761 insertions(+), 2 deletions(-) create mode 100644 bfd/cpu-nanomips.c create mode 100644 bfd/elfnn-nanomips.c create mode 100644 bfd/elfxx-nanomips.c create mode 100644 bfd/elfxx-nanomips.h create mode 100644 include/elf/nanomips.h create mode 100644 include/opcode/nanomips.h create mode 100644 opcodes/nanomips-dis.c create mode 100644 opcodes/nanomips-formats.h create mode 100644 opcodes/nanomips-opc.c
Comments
Hi. I can confirm these patches can compile and could be run normally. But the tests were omitted in this patch, so I could not confirm if the patches work. Do we need to add `#define ARCH_nanomips` in the front part like the official one? If so, definitions of `ARCH_nanomips` should be added in the `opcodes/disassemble.c` file. Comparing with the patch v5, I can see you have deleted the file `include/elf/mips-common.h` and moved its main contents to `include/elf/nanomips.h`. This should be fine, but in my opinion, the two FIXMEs in file `opcodes/nanomips-dis.c` should be kept: "/* FIXME: These should be shared with gdb somehow. */" and "/* FIXME: Should probably use a hash table on the major opcode here. */" as these behaviors were not fixed. Thanks. Tsing >This series introduces a subset of nanoMIPS functionalities. It's a pre-requirement for nanoMIPS support for GDB/SIM. > >Almost complete series is a "green patch" - it adds things, so the probability of making regressions of existing functionalities is minimal. > >Compared to the previous series version (v5), there are no functional impacts but changes are split into smaller parts.