Message ID | 4eed4c72-002f-268e-b5cd-0929bc57d6d2@suse.com |
---|---|
State | Accepted |
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 b10csp2824976vqo; Tue, 4 Apr 2023 00:03:31 -0700 (PDT) X-Google-Smtp-Source: AKy350ZhohDaoCCr3/bLFen4WxiCGHs+qrjCt4WQtomFP60xlJZ23ORt4Ivk/HFiBMIZ8NTIjHtj X-Received: by 2002:a05:6402:558:b0:500:50f6:dd33 with SMTP id i24-20020a056402055800b0050050f6dd33mr1606884edx.2.1680591811750; Tue, 04 Apr 2023 00:03:31 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u25-20020aa7d999000000b004fb3426ea95si10005329eds.322.2023.04.04.00.03.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 00:03:31 -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=@sourceware.org header.s=default header.b=ZJN3kVGu; arc=fail (signature failed); 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"; 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 B2A99387689F for <ouuuleilei@gmail.com>; Tue, 4 Apr 2023 07:02:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2A99387689F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680591723; bh=xkfqYloa/PDiwlCbb1vyR9GZmXPsT1zKijns1eXwzQs=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ZJN3kVGuOn+VqaIYMatdquY4/RUg8QJL9A72A95Lx5REnfkrsVyOFm00Yqm7yORVq Frtg1Mtx/oGJi9NzeDSyTQby/gIqpzAeqjnfT917zuwLwikssgKVdH2lGRYJvRZalm 8X3FZYyY8J5YiH2KeTYqyTLcb0IW4FCiBvmkhmsc= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2041.outbound.protection.outlook.com [40.107.241.41]) by sourceware.org (Postfix) with ESMTPS id 023E9387089E for <binutils@sourceware.org>; Tue, 4 Apr 2023 07:01:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 023E9387089E ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i+WNI3VBJSBF7ivtG9sb+At5zyiyXmYRTZty6h7b+FOyQBx5UuzwMAW1kSdgoTXPjE36V42/A7m56tLk6mpmP1vkXbbSEIEost66avaxroK1MbYDq0/ttQGk9KTCS0ozsO5+maGW90SkV1RkzWc2iapVMXpGeBv76U+oGpaTSIQ683abxPy9fYcdtWHqpYqaeOqRkpwQnKZOBQWY3+s+ksYA0JjXnKCxyxNB+84poOd8nd7m5rIe+nngqnjKyoeeGNTJsGw6zgso9rpx1znkYmInEwq0hfSRD5B+WkbDHK9nM95tk4pNRyUTGkCY53NJ5c2z5DRWvhqpGkNdlnGicw== 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=xkfqYloa/PDiwlCbb1vyR9GZmXPsT1zKijns1eXwzQs=; b=Zlue9a3PI/o/wp85cV52hSEDXEuAx4+NfcORVlE/noH8w1bcqmqDiu6C59EzmjgaihLAfXaSiHRZSTSOnvTsYiT4WpfyJSDmeAIfenbhAOfdwmbmj1mSRJHb/aVJPu3bR9YuW/SGt4hYSbi6068hHd6ren/dbYaUxTTYetHUSxOuXSWv4XkmPGRGrYPTLSOKXnUlbyflQ7AMqNNuU+7TnlLk8cVCq908tCCnqChN+9//7sbjuCSVCi9PAUEuieYiY1Y7WROz4YN1jp6kJh1+ctx9onhehfQ5fq9m/M1TVxDNly82dBNvuSr84EQo2r6OXlxm4WWXIOc7gOSmOMv8Uw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by AS8PR04MB8609.eurprd04.prod.outlook.com (2603:10a6:20b:424::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.35; Tue, 4 Apr 2023 07:01:33 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::154e:166d:ec25:531b]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::154e:166d:ec25:531b%6]) with mapi id 15.20.6254.035; Tue, 4 Apr 2023 07:01:33 +0000 Message-ID: <4eed4c72-002f-268e-b5cd-0929bc57d6d2@suse.com> Date: Tue, 4 Apr 2023 09:01:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: [PATCH 8/8] x86: drop (explicit) BFD64 dependency from disassembler Content-Language: en-US To: Binutils <binutils@sourceware.org> Cc: "H.J. Lu" <hjl.tools@gmail.com>, Alan Modra <amodra@gmail.com> References: <5dac45a8-cd5f-ee4d-52fc-7d283fc29ec4@suse.com> In-Reply-To: <5dac45a8-cd5f-ee4d-52fc-7d283fc29ec4@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0040.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:92::7) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|AS8PR04MB8609:EE_ X-MS-Office365-Filtering-Correlation-Id: 88bc02e5-45d0-43bc-f7c6-08db34da6c62 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LXhv1G5cbivlM9B+UjogR6rCii/idR0ARCX5fxQ46r+4QJHpt7PFLyO8V9rzNJ5c1FppQEjCEkl5H/ZYDLnpyc5CPksZoLtAdmu9IBzRBnNEJVn9nDT3mwHuYdLmBI1rvmbAitFrMdSREdBDipw5abqEDXjs2SE+JeaIZxB8bWG1+EzPcWhrw65mgOEu+N1ZiREgzAkjTAQTaxS4wVe7crQYe3H4ifiJRzR7yqVhIPsj9hRL11gZdpUYKhAHijoarwC/jcZt4SusGC5GN2zitdlqYAigVZnC0L2XKzDEgi5CuzA//lS/znbC2W9nPqzc5Ngl81tC/aaNix3Xc6fVhCXlGN9NPS4TEX6y2tIDBwkFvJzo32YW87CET6ol4o7k1NjVtfZCXecWlU4Rtqu/6GEPo7/RahPrk3KHI/FaTUIUWmmJsHp5tFtuC/lEM31fa1Pu7hBT9nHHOST00DIgkjKtf9aQGSjhvDmb1vycJXsGoJwaHgdaAIJBPQKTo+qejM2dk3bGD4SvXY10oU8gEue+jpHtmcoqk7EmbKPbOQIqTWpiL3CmTmxChWKfhwVA00umRjIxuV3tFEz+C8eOr9haxtvSGakX8hoU9rLiJJvDjdTu1hEaJ5G1C+LNzpzvAwqjXM+Vzfvd890b0GU0Kw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6560.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(136003)(376002)(366004)(346002)(396003)(451199021)(31686004)(6486002)(54906003)(66476007)(66556008)(66946007)(8676002)(41300700001)(6916009)(4326008)(31696002)(36756003)(478600001)(316002)(86362001)(38100700002)(6506007)(6512007)(186003)(2616005)(8936002)(2906002)(5660300002)(26005)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/U+6aLJr59/wXGAHLhR9AeAx4PjX?= =?utf-8?q?OsnCziPCpPRAc9GLilGJHTuWL/lyB8kv/OIu+3vIUBWiOUGTom32hVwQgHsFFfX2V?= =?utf-8?q?1v2fYFK5bb7rR6rtMYWmbBqlN2x3xsY91og7P3p1ccMOX/NkV5tNvs6jjI2eRZFg2?= =?utf-8?q?eMCaTJ/pqP9rc8CgCcFXGNbtvNGBRA9RmOID0XR1igwDxJyLr+rvKBd0/g2DCYTm6?= =?utf-8?q?C6tS4f++P9aePMJhYDZJgTAjEfvbIfYcmCDaI1exkAbtX90o7NQ8KWpoHpyjGeq8L?= =?utf-8?q?aL62d48byCb4B6iojbv2UZoX2r2+iupC9P6X/vyM6qhST9OUar53gKfWAg28NUX68?= =?utf-8?q?spQZTyN5RQleqEL/YHQqynvLgpZ6/7Aykbg84Wp+Ox7X0285ilbeYTih95BX10AJn?= =?utf-8?q?QJu5iWaOsoSqRwsXllNs/nSP5ruICy/rJB09c5rDpvp5BASFXdlZbcolu+m+ajHqf?= =?utf-8?q?gtVhvWPcG/yX+2Koov4Li63+6ApMJVaEeww9aGtU8daJ3qITZzvsVaHO9IDT9LYsw?= =?ut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= =?utf-8?q?cuJuk2lQcM+sOakpRjeXTPEi8LYagGw3GWDl8p+YHOOBVp22lWahQ+iYYLKBqVd5y?= =?utf-8?q?w/zRoii/2Tb00osoXOCy+sovRCbiF1pNEEdzgHaHMPAcZmlc0DDw+GjwW5J3w2fQ1?= =?utf-8?q?Pfl8SGKrWQGH?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88bc02e5-45d0-43bc-f7c6-08db34da6c62 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2023 07:01:33.1319 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: P0eOX82Mb+lFtZ+2dw2huVRciBLCwIVyizFO+3r5TsNkKkt2RG/qe0V5DgjtmNHrkiE+nMoMcjudqP6S8L3Yfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8609 X-Spam-Status: No, score=-3027.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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> From: Jan Beulich via Binutils <binutils@sourceware.org> Reply-To: Jan Beulich <jbeulich@suse.com> 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?1762228239833062523?= X-GMAIL-MSGID: =?utf-8?q?1762228239833062523?= |
Series |
x86: do away with (ab)using setjmp/longjmp for error handling
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Jan Beulich
April 4, 2023, 7:01 a.m. UTC
x86: drop (explicit) BFD64 dependency from disassembler get64() is unreachable when !BFD64 (due to a check relatively early in print_insn()). Let's avoid the associated #ifdef-ary (or else we should extend it to remove more dead code).
--- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -12329,9 +12329,8 @@ OP_G (instr_info *ins, int bytemode, int return true; } -#ifdef BFD64 static bool -get64 (instr_info *ins, bfd_vma *res) +get64 (instr_info *ins, uint64_t *res) { unsigned int a; unsigned int b; @@ -12346,17 +12345,9 @@ get64 (instr_info *ins, bfd_vma *res) b |= (*ins->codep++ & 0xff) << 8; b |= (*ins->codep++ & 0xff) << 16; b |= (*ins->codep++ & 0xffu) << 24; - *res = a + ((bfd_vma) b << 32); + *res = a + ((uint64_t) b << 32); return true; } -#else -static bool -get64 (instr_info *ins ATTRIBUTE_UNUSED, bfd_vma *res ATTRIBUTE_UNUSED) -{ - abort (); - return false; -} -#endif static bool get32 (instr_info *ins, bfd_signed_vma *res) @@ -12571,7 +12562,7 @@ OP_I (instr_info *ins, int bytemode, int static bool OP_I64 (instr_info *ins, int bytemode, int sizeflag) { - bfd_vma op; + uint64_t op; if (bytemode != v_mode || ins->address_mode != mode_64bit || !(ins->rex & REX_W)) @@ -12785,7 +12776,7 @@ OP_OFF (instr_info *ins, int bytemode, i static bool OP_OFF64 (instr_info *ins, int bytemode, int sizeflag) { - bfd_vma off; + uint64_t off; if (ins->address_mode != mode_64bit || (ins->prefixes & PREFIX_ADDR))