From patchwork Thu Nov 3 13:58:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 1097 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp547316wru; Thu, 3 Nov 2022 06:58:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5NHUi8Py0RYiJsd8WgdberaRGJQ3srxZ0B/c9ubOYG4s2HoHKYlsbgrUU0UuJT2WgW/mfW X-Received: by 2002:a17:907:a047:b0:7ac:ff72:977c with SMTP id gz7-20020a170907a04700b007acff72977cmr29887305ejc.260.1667483911600; Thu, 03 Nov 2022 06:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667483911; cv=none; d=google.com; s=arc-20160816; b=bMEjnrZHXtB465M/GsriUdHhFzGADyt3hKZpF3ERsQAzzVjJ7TOCM0dQ7oUqs63uf3 734EGQQcFrvrlcMCXYbjk05d6DSUDMQSGdIPdP824UuV/T5yB+rbgfY5GZXB2279xnud zvhdSwSqCsXMyKDgwwKvZtj8DLmisza+nw37UMw0rkDaopErS9QC/9mDL0sxluwyP4p2 JHctrKfK3+1fxjhPcDkJThJGH07gs6qd1NEWTYCyf30C13Mfo0qx/b+58qeDDmJYtAYR gc8p7czHnBDLTjkqUP4Uv0PrJTb/jLBadnWZUkjJrqciwQL/Q6h7Wt8UzGDkwKFUH2Sz xvzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=Lz9xzwVv4oeaCYTyGWXVY+XRyoSI0+hBq/Ez/lPLHW4=; b=Yar/fU8n1DMfHdGPAswJftwQXJb1GiyhM9ulKAMHVswofJ9fMmNlCh6RGZS6VEzOir lj0HOXnmMi1CXakp1ySH+O/Im0TFmKsxcdBS4h6qU8xtGqh0TxWIh1J4bXLio0GCL5FP Q9gsrlk2j66uxbjK5VjFVVqdl8HAYZOBw97P0w4gDrH3aqgPJpMcC6kTXIlNH9KFKCLW BcZMMOCj7Uf+wQ2toOQJzv1PeGNPyb0lAiLdNVLgooXfav5rmLCplwi3B6eSchZx+W59 gNBATk0zezf5a7U8X2krQs7GDH31xU7+2Bn+nQSGtLlUMvrceIHRxg3Ijd78tzBDDQAT fhQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="QCpYX/DD"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id l21-20020a170906795500b007ae0e8f59a6si1423277ejo.821.2022.11.03.06.58.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:58:31 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="QCpYX/DD"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DC63D3857362 for ; Thu, 3 Nov 2022 13:58:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC63D3857362 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667483909; bh=Lz9xzwVv4oeaCYTyGWXVY+XRyoSI0+hBq/Ez/lPLHW4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=QCpYX/DD5Q+ObqwtOcWDUkkn/FOKJX8q832tl8gdEUPPN2i7OGTvHGDF+f6DUupeK KR1aNmv8d+eIiGySHW1xSm8jIcdIeS0tLbm2UcJEnVcpwh8mKpsJjMSHB6TFu1XJdI aTKVrd7PvAroXJQLV4z8V+/K/Z2ORYzzSb65s4eU= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 9AF823857C79 for ; Thu, 3 Nov 2022 13:58:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9AF823857C79 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-207-Kp8qobN0M9yNbGVtM6yAeg-1; Thu, 03 Nov 2022 09:58:18 -0400 X-MC-Unique: Kp8qobN0M9yNbGVtM6yAeg-1 Received: by mail-wm1-f70.google.com with SMTP id i128-20020a1c3b86000000b003cf4ff1b917so895925wma.2 for ; Thu, 03 Nov 2022 06:58:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Lz9xzwVv4oeaCYTyGWXVY+XRyoSI0+hBq/Ez/lPLHW4=; b=K+EYQXc7WZaTxWLJgbl6ToZ6lF5DGxDIMEpWYyjcYtiFM+k7EBcQ3I4nBbEAZdvyeo kSQHb1NCKfMgPHEXCP3S2fEFkMxA19S7BKbgDp0ox2ogsTvfV4va56ISyQuaaD90vORS d57T+mxuoS/RvIl6J7z8FEDrCut+RPcbFV9r0Oxrh5MOOQNB4RQ1D7Ucyjwf1ZtZkdgn 6y2EnsWaNZHfr3ZqJoHy7PscluUK2ES/elIlrJI+gGU2ocO6eW0wB9zpD5Whm31M1Dmr C6d4dRs5UBECe7GLuY/6h/Aoc5gBjfU2bZ70LZhQan4zv1uaA6PAs2EF7rojUciosWw+ Hmqw== X-Gm-Message-State: ACrzQf3uyImucaAkcB76IWpKuLBMeIkf3eirdKaqzqIcjCT8ZvPQCOgy S4P5jPEGdAjdvIcISiseG9eulJB2S5dqZV4o5hGPFFIuas3BjuLxd7nsV78Hllfe6+/wfTfxfPm XS18q/3SixysJufZCJCM5Z2RtarmZlDPwb87K2DyGohRqC6cIjLwByA5LUfnzXAxRXqsJdg== X-Received: by 2002:a05:6000:22e:b0:236:6e38:4d9b with SMTP id l14-20020a056000022e00b002366e384d9bmr19602395wrz.4.1667483897317; Thu, 03 Nov 2022 06:58:17 -0700 (PDT) X-Received: by 2002:a05:6000:22e:b0:236:6e38:4d9b with SMTP id l14-20020a056000022e00b002366e384d9bmr19602373wrz.4.1667483896976; Thu, 03 Nov 2022 06:58:16 -0700 (PDT) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id bh6-20020a05600005c600b00228692033dcsm1240249wrb.91.2022.11.03.06.58.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:58:16 -0700 (PDT) To: binutils@sourceware.org Subject: [PATCH 0/2] MIPS disassembler styling Date: Thu, 3 Nov 2022 13:58:11 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 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-Patchwork-Original-From: Andrew Burgess via Binutils From: Andrew Burgess Reply-To: Andrew Burgess 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?1748483610055503526?= X-GMAIL-MSGID: =?utf-8?q?1748483610055503526?= This commit adds disassembler styling for MIPS. Patch 1/2 changes the disassembler to make use of the assembler directives .word and .short. This isn't a requirement, but I think is an improvement. There's a lot of updated tests in this commit, it's possible that this patch might be too large to reach the mailing list. In case of this, I've pushed my work to the branch: users/aburgess/try-mips-disasm-styling Patch 2/2 is where I actually add disassembler styling. If patch #1 is not wanted then I can easily rebase this second patch, removing the use of .word and .short, just let me know. Thanks, Andrew --- Andrew Burgess (2): opcodes/mips: use .word/.short for undefined instructions libopcodes/mips: add support for disassembler styling .../testsuite/binutils-all/mips/mips-ase-1.d | 2 +- .../binutils-all/mips/mips-xpa-virt-1.d | 4 +- .../binutils-all/mips/mips-xpa-virt-2.d | 4 +- .../binutils-all/mips/mips-xpa-virt-3.d | 2 +- .../binutils-all/mips/mips1-branch-alias.d | 4 +- .../binutils-all/mips/mips1-branch-noalias.d | 4 +- .../binutils-all/mips/mips16-extend-noinsn.d | 24 +- .../binutils-all/mips/mips16-pcrel.d | 16 +- .../binutils-all/mips/mips32r6-branch-alias.d | 4 +- .../mips/mips32r6-branch-noalias.d | 4 +- gas/testsuite/gas/mips/interaptiv-mr2@mcu.d | 112 ++--- .../gas/mips/mips16-32@mips16-asmacro.d | 6 +- gas/testsuite/gas/mips/mips16-32@mips16-sub.d | 436 +++++++++--------- .../gas/mips/mips16-32@mips16e-64-sub.d | 4 +- .../gas/mips/mips16-32@mips16e-sub.d | 66 +-- gas/testsuite/gas/mips/mips16@save-sub.d | 68 +-- gas/testsuite/gas/mips/mips1@isa-override-1.d | 16 +- gas/testsuite/gas/mips/mips1@save-sub.d | 68 +-- gas/testsuite/gas/mips/mips2@isa-override-1.d | 12 +- .../gas/mips/mips32@isa-override-1.d | 14 +- .../gas/mips/mips32r2@isa-override-1.d | 14 +- gas/testsuite/gas/mips/set-arch.d | 208 ++++----- gas/testsuite/gas/mips/tls-o32.d | 4 +- opcodes/disassemble.c | 5 + opcodes/mips-dis.c | 306 +++++++----- 25 files changed, 751 insertions(+), 656 deletions(-)