From patchwork Fri Nov 18 09:12:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 22215 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp79365wrr; Fri, 18 Nov 2022 01:12:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf5yPcEWUBIOXVmMGNADw5j7cGRzBVljTRDMmGZQrH8jqi1fubqB4n5nn6D98vh/0lfC/7Ht X-Received: by 2002:a17:906:2693:b0:7aa:57c3:3f26 with SMTP id t19-20020a170906269300b007aa57c33f26mr5254381ejc.195.1668762748768; Fri, 18 Nov 2022 01:12:28 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f17-20020a0564021e9100b0046627848e1fsi3395776edf.630.2022.11.18.01.12.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 01:12:28 -0800 (PST) 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=biG2spYs; 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 3B9A2384F6FB for ; Fri, 18 Nov 2022 09:12:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B9A2384F6FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668762744; bh=b1v47YXEeNVBtOKjpH+o47V6lSr/4dKT+Encjojca1U=; 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=biG2spYsARl/gXike/a7nAmNNGwBn+DVklO5yMq1wrcW0m4gwmbXYw1XVMWgxxcsj 9OpjIHntA8Mh4f54FwD/GnjO3S9AAGqPpZjlOFS9ds45fWcc+8HEzFZ1bnCG/wb/nY BduGBDiLeVCg53vMZnQDqg9/maAlZz8qrBWj8ZkY= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80071.outbound.protection.outlook.com [40.107.8.71]) by sourceware.org (Postfix) with ESMTPS id 927D03852C47 for ; Fri, 18 Nov 2022 09:12:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 927D03852C47 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TtZbCjpJlO3k09r7mfD1YgFVjmcjK3cUuM8RcSBEmh7Wb/uwBOseScvbcWFWxCk1orFEyfAOfpJflsZmf6J9oqnXPHEXut05tVphTdaCiEeDqJ5zaOgripmQCRd3J9mLW6Wx7xXqnsMIXyzD8FJQMbafGDAMwsUwRyf09eIGd3ITUhpV9KCB6LuBMTAHN7/36/Rq6M4LH3JSU4xdu8apyJ534kyIz+Mu2Uk/yPnxPilOpdfCpJLLbWDqid69pDjkpQbSPa0XGrVASye7BkPwoFbAT0/GNTFQ9HRDZCVbzoRDzRuEJWvgYUsyg/rqcCBkk0tQndKM8dqGqwTdhaJ/mw== 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=b1v47YXEeNVBtOKjpH+o47V6lSr/4dKT+Encjojca1U=; b=ErNlFkaYlQCPYlGzzul1Natw6Obf104qM9IYeVM/hANw+dLzT8uj8hnjG/GFZ5XNxduCfbi7lCyQsocAFIcI4f9biwd3Of1VxRmcRidNNuUM1qAec0taSz2C8SfyzwuDuDl38cSTyp/PlH25vucKcZjVsxjDEO9hPQhtlJMbrn64BbakZgcJErqFVPXEiPbhRjkUWxaFooB+caEKv8577DuW/BVFNkeeYLee11Z/Ari9bwluPP0AwmgN9y3FDez+C2QJlh1iWRSnWVpaqNMCEL6n7q8SLLUOj7YSqIOZZI19uaaEHga3VllYmDxid9zDakp9wGNwbGLawO1tS7VveA== 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 AS8PR04MB9094.eurprd04.prod.outlook.com (2603:10a6:20b:445::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Fri, 18 Nov 2022 09:12:12 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8%4]) with mapi id 15.20.5813.018; Fri, 18 Nov 2022 09:12:12 +0000 Message-ID: <028280ab-56ad-2380-6bdd-3c944695ec5f@suse.com> Date: Fri, 18 Nov 2022 10:12:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: [PATCH v2 1/4] x86: instantiate i386_{op, reg}tab[] in gas instead of in libopcodes Content-Language: en-US To: Binutils Cc: "H.J. Lu" References: <7a1ee76a-5b54-32a6-6301-a1741b5c1883@suse.com> In-Reply-To: <7a1ee76a-5b54-32a6-6301-a1741b5c1883@suse.com> X-ClientProxiedBy: FR0P281CA0123.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:97::9) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|AS8PR04MB9094:EE_ X-MS-Office365-Filtering-Correlation-Id: 847bc68c-6bb3-4982-2925-08dac944fa46 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lKoS0Gv65xC/07A/pdQXUOINWFFnkfg4lV62eMl1EvbSAKWgfaTKOvcS4KJK/QFprG0lHLjiZAEVY+BAk0XlyAPJzUGyjVouflSgNRcsPU2RgDslhP2JL53Iu+wJAUbe2HepF98ukXcUP27YHcArz8enChlvgo7pzFdaYLAaM4UGm9QkSWCFXFU4iRekDLPFQjZ4zV706Xdfg7O0kNrxWrvBhKhVjsYwgMRzhUaRPicqxUKKi25N1BjSKSkuiGOrFfU8UcvyaggSU2VkJ4Mlbdhr9hupXONdIpZFZhkZFpAgGdfJEuRaTk1L4AIYPaQlJgazykaioymNj2OEeS7Sych10qwOcy6fDsuhumqEj+oV/alddSTgn/N+d1DhuXwSXQv03w+v+HUlA6/9ZtezfXTJRcRNTxU4nsNu8ZJ/3c8m77Cj70dfDoHE8i8a0K2NNYAbRXvnt9JTUMx2kR3kpDGjl8GQeL/LSW6oix8x04udcmzMUS+oFBYPLLh0LA8KjCG+uY9+OAwIzQb/wCMCIuEx4NtwsfY9nQg4uILQuNTnq2jUQhATwAQXS/CEdVzCCVgE2mdK2DOMLkT82cJYg41J8RLALLN5v+YLxRABWbNhx3Bgr91lSQ9aaiubz7S/YaqfsBMGxKQB581TRt2nMlCWCuUCU2KGvHAQEkpiyKn0MmW7jUvGfKCCu+H4BbJHT1DrsEpu2JfKyVb0N74E9wVvNP313HnbtcuBPBhxUUA= 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:(13230022)(136003)(366004)(39860400002)(376002)(346002)(396003)(451199015)(316002)(6916009)(31696002)(6512007)(26005)(8676002)(38100700002)(4326008)(66476007)(86362001)(66556008)(66946007)(83380400001)(2906002)(36756003)(2616005)(41300700001)(5660300002)(186003)(8936002)(31686004)(478600001)(6486002)(6506007)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?zl4vBRZrVqzkvL39hjJVWfLJel6T?= =?utf-8?q?kQS1n5oOmUaemDSXW52vzj4AYxMg8znVQMz7MOK1HZt9QomjIH8Wt1ch6nXySbnHx?= =?utf-8?q?jotprZfRVg39eCbTaGWy57HbIaZQgs4mv8p8skFzLbpowp+Z0/ELZuiS6PUhmCY0q?= =?utf-8?q?+lUE8RxDZagBjzVhOhcqLnZKP8sEoxRdvgutQkh0SUp06Vu2sgEeyr5uDq4xNwFOE?= =?utf-8?q?vZ26qTTe+XQDRaWBSOezoJiN+eGpddhq42ZsccHhIz654of/+rBvDF5IO/AjDaXUt?= =?utf-8?q?KvKDD1EusYXpa2ENA79F8MDY0cMx+smDnx3qvWL+AGST2qOzs/ho175yKtzj42iI0?= =?utf-8?q?K1J56oNNBz9WnYI+xgvgLZqVcBY9bvP1QFN73N5CkGnp4juY66BR3pLWYdpWt2286?= =?utf-8?q?dZQu14MyjOsv+0au4xdFV3rVHRtGkJ/+7eO9XMyh/go7GTqkIVbWy4pvKn13BoonG?= =?utf-8?q?5odA3TIt/9j8IcvodzTuEoNwa2lOwfckYP4R6YNqZ805I8UhewM/ZuHDlcc6H8ukg?= =?utf-8?q?K3N+gbajlPjobaYfApCPTiPMzbZ4fL+DAPNPRlANQuBs4D/q2ePVQ9sFFs4mviM3P?= =?utf-8?q?3WO0lqYgO6QlcXuAEI8hWCHLBoBZJrCNOY3fL598GQZj55Q5vMhBEO1A8jPFGZ8yp?= =?utf-8?q?u7oNsyQq64lcuIZLLNnXTOUe/tNlyI2mCQN16J0ByldVadAL7gJ1YijfzrCw9d4Lm?= =?utf-8?q?gwaYgiIqWCB3SV1QlsUNRbH0Z8OkyJ2OCEetw5aUDT5G09sauRZsPvoo5yZoCrEG4?= =?utf-8?q?o3pxw3F78LnVHZRI6YfciZpp49ew8p+nfL5bX3CsY/QTLecnR8kD7HMidqqjjxPyb?= =?utf-8?q?hQFZGm4/efQu5F4vYPZaC1CvqjSkUBOYDufVwifBlwS+CM22h6ZmzlvxqkIAHJIZR?= =?utf-8?q?qaIavsW70NBSBobjmfuou1DovHExoyVhedM2O8LVTLRR48DQ+LTdRoJAsy5eED7Ja?= =?utf-8?q?Ve2Z7HyrPIX9RtGWKrB6EyQ8HHWc9jqssAJqAf8v1e9g2s8tF3jOHvVwY3a/skPBZ?= =?utf-8?q?vE+SeDt4p3YJ0o1LBlY8RjvwmMU6Y7zjvQb0LJkUPkh35ohCW6mUT1yGAbevgJwz/?= =?utf-8?q?o19X+psKhT3JNHVQkYpiuNqenZSOyXwuFky5IaLLsn7URo4/mPUDzKAljeq8s/umr?= =?utf-8?q?ZDfwWcoJGOKsqhMD5hpF+os4Vl7Nv6/z/cqZ4tlFrcnLUWJPUpkz36Pik/a5b6/mK?= =?utf-8?q?ev5+4mdqmaeTruKI32BVxlnudWMRihckJYZFNlOvZGXCIWdJ6mmHVjc1HBhTugkwD?= =?utf-8?q?KxK4ISz2kxLcmsHB7bOJITGO0nKF+YXpPiNMNQTbWG3G6WJetx6tCzdlEXbFMUNYV?= =?utf-8?q?jGDxTpjicnyoayE1OspMYrh/t1h04VV5BADu+VwH0XvvLzMM572QxIzd7fTDeh80t?= =?utf-8?q?1BspTUsluDpjhRMBhvQqljTj/cCW0Oc80yz6XS7Ah/fPuYW1JDAuiZTy+wulNU43X?= =?utf-8?q?3qqvR3Z6oY605ZztAPZkiwCzCqRB5YhrJt4iSR+XpokKgp/xUT0YQqg0ghqmWKbTz?= =?utf-8?q?JNJeFNirAETf?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 847bc68c-6bb3-4982-2925-08dac944fa46 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2022 09:12:12.1457 (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: GZS5ymSrxZq63b78OlyCMoB4ns8IXWV1v3gYfaYhRtozMDgyasZ8SH6VQzh+1xDB4NDY2GZd7NFwo/RJ1nluFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9094 X-Spam-Status: No, score=-3029.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, SPF_HELO_PASS, SPF_PASS, 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: Jan Beulich via Binutils From: Jan Beulich Reply-To: Jan Beulich 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?1749824568099145492?= X-GMAIL-MSGID: =?utf-8?q?1749824568099145492?= Unlike many other architectures, x86 does not share an opcode table between assembly and disassembly. Any consumer of libopcodes would only ever access one of the two. Since gas is the only consumer of the assembly data, move it there. While doing so mark respective entities "static" in i386-gen (we may want to do away with i386_regtab_size altogether). This also shrinks the number of relocations to be processed for libopcodes.so by about 30%. --- v2: Re-base over the (premature) moving of i386_seg_prefixes[]. Move inclusion point of opcodes/i386-tbl.h. --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2969,6 +2969,8 @@ i386_mach (void) as_fatal (_("unknown architecture")); } +#include "opcodes/i386-tbl.h" + void md_begin (void) { --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -1816,7 +1816,7 @@ process_i386_opcodes (FILE *table) xcalloc, free); fprintf (table, "\n/* i386 opcode table. */\n\n"); - fprintf (table, "const insn_template i386_optab[] =\n{\n"); + fprintf (table, "static const insn_template i386_optab[] =\n{\n"); /* Put everything on opcode array. */ while (!feof (fp)) @@ -1946,7 +1946,7 @@ process_i386_registers (FILE *table) xstrerror (errno)); fprintf (table, "\n/* i386 register table. */\n\n"); - fprintf (table, "const reg_entry i386_regtab[] =\n{\n"); + fprintf (table, "static const reg_entry i386_regtab[] =\n{\n"); while (!feof (fp)) { @@ -2009,7 +2009,7 @@ process_i386_registers (FILE *table) fprintf (table, "};\n"); - fprintf (table, "\nconst unsigned int i386_regtab_size = ARRAY_SIZE (i386_regtab);\n"); + fprintf (table, "\nstatic const unsigned int i386_regtab_size = ARRAY_SIZE (i386_regtab);\n"); } static void --- a/opcodes/i386-opc.c +++ b/opcodes/i386-opc.c @@ -21,4 +21,3 @@ #include "sysdep.h" #include "libiberty.h" #include "i386-opc.h" -#include "i386-tbl.h" --- a/opcodes/i386-opc.h +++ b/opcodes/i386-opc.h @@ -924,7 +924,7 @@ typedef union i386_operand_type typedef struct insn_template { /* instruction name sans width suffix ("mov" for movl insns) */ - char *name; + const char *name; /* Bitfield arrangement is such that individual fields can be easily extracted (in native builds at least) - either by at most a masking @@ -990,8 +990,6 @@ typedef struct insn_template } insn_template; -extern const insn_template i386_optab[]; - /* these are for register name --> number & type hash lookup */ typedef struct { @@ -1011,6 +1009,3 @@ typedef struct #define Dw2Inval (-1) } reg_entry; - -extern const reg_entry i386_regtab[]; -extern const unsigned int i386_regtab_size; --- a/opcodes/i386-tbl.h +++ b/opcodes/i386-tbl.h @@ -20,7 +20,7 @@ /* i386 opcode table. */ -const insn_template i386_optab[] = +static const insn_template i386_optab[] = { { "mov", 0xa0, 2, None, { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, @@ -59958,7 +59958,7 @@ const insn_template i386_optab[] = /* i386 register table. */ -const reg_entry i386_regtab[] = +static const reg_entry i386_regtab[] = { { "al", { { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, @@ -61114,4 +61114,4 @@ const reg_entry i386_regtab[] = 0, 0, { 39, 64 } }, }; -const unsigned int i386_regtab_size = ARRAY_SIZE (i386_regtab); +static const unsigned int i386_regtab_size = ARRAY_SIZE (i386_regtab); From patchwork Fri Nov 18 09:13:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 22216 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp79777wrr; Fri, 18 Nov 2022 01:13:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf79Mot1lLsXIRG2x6GeW/1ZCA1NUkCAetNKlw6ey558leJ9S2LgaH3bO2ZI2fst4yS3GZ0f X-Received: by 2002:a17:906:3ad6:b0:7ae:40b7:7fbe with SMTP id z22-20020a1709063ad600b007ae40b77fbemr4999415ejd.371.1668762825168; Fri, 18 Nov 2022 01:13:45 -0800 (PST) Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g12-20020a056402090c00b0046777d0ad16si3021080edz.394.2022.11.18.01.13.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 01:13:45 -0800 (PST) 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=t5Vuy6Un; arc=fail (signature failed); 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 3610D383F2F5 for ; Fri, 18 Nov 2022 09:13:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3610D383F2F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668762808; bh=MHn1TE6kMbeiaqDXyTxk9WIURBvLspspfD/a6tVpaug=; 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=t5Vuy6Unefng1vb5wT2UUO/7CCPogvWJo4iTBTzAQ2V1c+LiqkiswW7fHRWU9yySR HBsNrtanLhvqtewUMdwWKi9g5zxZJHNqI8izXOffmxd+69sUy9oBT+dwFd9pxL/4Et V7kknwsyfYGgzkeeROuLmISarjuKbxMHluKcGoAQ= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80053.outbound.protection.outlook.com [40.107.8.53]) by sourceware.org (Postfix) with ESMTPS id A52E8383F2E9 for ; Fri, 18 Nov 2022 09:13:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A52E8383F2E9 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lM8TlUzR1bq/v4NVrYnC81Z/zVRlRN945aqPLG/6Yz8ZGiw9RF9hKDGiLF73YSLDjDtN/EMaJ62VM4m/v40z4/bQTy8Znn2/DVIymrJMzpivB4Lw61tGfiRuLoKKey7IUkzF9axY7Oev0/Dz2RMkfLFg4nrrWdZj8QFDtfIvduT8gtrms+qWw0URk+f+PnX2ucq8jv/m6W96Na82Vvk1PxBiuwQoOQQOX88i6V64cTrJ9bjfi8vcrPNcun9QdTTpk+eFzV8QHlr9dkArjcl8PmeChmJsxUraK8N7xJJvHoUXVDAxbY+ZzpyHfHE+9udR2coH3Q4Ys61c5BQDi6loLA== 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=MHn1TE6kMbeiaqDXyTxk9WIURBvLspspfD/a6tVpaug=; b=gTsQIIVyFGbFjTt1PgKOreRsmA6F4Dm76+RDB/wQDPZkmPkzErzDsLLa7CplwDpwz1uuOzbkNSOta6kLTDi94Yghip+5+AZYar2iiIs75U2mDAvDX9pRNXtAQFetY6exTJX3Pijso4ZE8l2QL2SUp/ds8j9/L8NWshaWOJaocBIUAiWp33BVJ6ISApDN3U2PA3nj1eTQKk4xVmsFDAtYf6jXJeifSJ2Pm1zjxDv0M3wDjjel83nRPi98JiRfoswtzwwX5cQnhNsB4V0zkzIBydEWpY9FTfVIn96+DNlYjw8ZokoGV0TIAwMDUFnyALfjOCDy+jckm0yl9PzLc2l6QA== 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 AS8PR04MB9094.eurprd04.prod.outlook.com (2603:10a6:20b:445::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Fri, 18 Nov 2022 09:13:03 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8%4]) with mapi id 15.20.5813.018; Fri, 18 Nov 2022 09:13:03 +0000 Message-ID: Date: Fri, 18 Nov 2022 10:13:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: [PATCH v2 2/4] x86: remove i386-opc.c Content-Language: en-US To: Binutils Cc: "H.J. Lu" References: <7a1ee76a-5b54-32a6-6301-a1741b5c1883@suse.com> In-Reply-To: <7a1ee76a-5b54-32a6-6301-a1741b5c1883@suse.com> X-ClientProxiedBy: FR0P281CA0131.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:97::16) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|AS8PR04MB9094:EE_ X-MS-Office365-Filtering-Correlation-Id: d9f58e84-fe14-41b4-e155-08dac94518a6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eK0b1quGb5DbyktAmHhMNbtzZLT0/GbbG4WXn00sN7H9Z6LrcuDH+9Sv5dyPgY8IheEiF09nvWoXpdG9blmV3GRp9w9pAP42+mblRHIwUKStNIj9BIEjhL2Nwh56CoszQRzy3HsaOi/QcI9MaepeTSzkBwKqbWMNk9RNQIVnaowYLKN3djU50H29/Irl/o3jyGaYurWbOQzp/JPi/I9WrXRjng4ItaBhEmo0wnEZPHVyPAKM6pOZoqR28IfQoDlHgTdB159SW3knX96QM0uL3LwTh/s0hrqlO6aXQ7//4oGJKMc3xjzp7392tT/0DiXN5jUuiQ3y1sn8WlZYVYx+d3Qua+fqv7+zVcmC/BN1ffMAR3ka0TKXUWAuAAFomMr5yEbvxy5jvEg72fcjzmGwShZOsuaf2VR15ZBpXGagkyNR6vGP54EMj/p5DuJNJqmw4eO1Q77JI0NJXQXCBe/Htrgh680zIZfRD70Hig0/hm9Hloy6/Sb8SISENxTG+eG3mmhQXf6o1wDxR9llbZZN6a1q/mIhx+Z5rOncxiPYf2CsUx4kriJwqVNJLAkNU4FNJ5DTYgJBruZRxHkFUJIr9Mw6ne0RcBOcFX5VJXbhjQCJDaXxKh4puUi1U26AnYJtbmcEcwW1oJKH3Of72O4xU5HWioR69GHd0rzNep3cQDcXiSWJIAxKJ7JjpLzZUjTZxlbJChBa+hR5aKHEVxC4Y3GnPAtA19VDSJve4SlmC9AVyn6JeQCs1KhawZZA6vLT 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:(13230022)(136003)(366004)(39860400002)(376002)(346002)(396003)(451199015)(316002)(6916009)(31696002)(6512007)(26005)(8676002)(38100700002)(4326008)(66476007)(86362001)(66556008)(66946007)(2906002)(36756003)(2616005)(41300700001)(5660300002)(186003)(8936002)(31686004)(478600001)(6486002)(6506007)(2004002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?uM9WdqV+ncmAA3PvN1c3/1D9IgtO?= =?utf-8?q?9e+yvV282f437tk+E0+9XAvmUXnYM1lkcf4i7XdNjyNJNmUwNxTFy+AX+iBgtqt49?= =?utf-8?q?G/IYyv2DdDz2yrksRUoyU2Wlif8VueqPDH08w9LfBZKL8uh+7MWEdSb6ae9qV3Y8N?= =?utf-8?q?vUhcLbfptS8UpjuiYQTdBQooCwkoNXXx0ljWxNY1/N9RmIrdAMjKuFvh/nrvFq2cB?= =?utf-8?q?wOuXCfwMAmFvu/AOQNI6mrz2Rsw9/+wXFYBuep2kbHtFGCImnBaAf9YeQSPWBJNo+?= =?utf-8?q?t4mjm9w2s2b42IUzAf8ObDWBHh9nWSYWnSUV/K4tZnFTcEcimEGKdlzqs9SNNV/Nh?= =?utf-8?q?xXLN9T8DlAuoTmioO0BbsXFkZS++jXV9SbdX+JMAR2sh8+mbqDn4QELxBXT7csYn0?= =?utf-8?q?VVCrP/1imTIniN9geoiMYSh0sKxmkBNY9bn/oNJ5sjAvBfiYH7fOOIIPM1rsmxNWq?= =?utf-8?q?pdKA+63L4hZlZMPpkA3N0dhrAvPlAN6MWuhrV+OWgNoDKJz64p+20TneSZLhUbfyD?= =?utf-8?q?GCsdjRNCa8M2I45oqje/TZHsWWf4mfN2sj25BBPTiolec8fit1jnsokm7L2pjtxmA?= =?utf-8?q?eElbnTpz5gDhs7lcQNaR5To4w4MuBYcAkLagfiMqFlcgJCvWluf16EfyMqFzFb9B/?= =?utf-8?q?OB6gSzXIxWM1qUNTt8fasp8hCGCMdQCmE4jpOp/syubzegw6yeuUX2ApTvUcdk2Za?= =?utf-8?q?eAbwwpiymxo/rVXq7h1nzfF3SaHfIYsQtP3HvfdF4T2ictwNmrcWiZMDXynJ5ko3Z?= =?utf-8?q?paBZMGDw6hfPZZJ3bsif2Sapi2stUTlnA5jpzYCp382W8ujNOUwALHKF0VF7xBlB1?= =?utf-8?q?MRTMbX5euuwNO5QG8KBpxBziKjzJtNbtczu0/fFMT89kJwfinVz7xuRaQt4vekfgF?= =?utf-8?q?yHBo5T+SJcIAjCav/qxVsiG3M4n9e5N4JHfRew75WSaU3Ek/dh/HDbwTNsva6FePK?= =?utf-8?q?f050HNH+hGWHRKmyUrU8b3PbIgBISviy2addgFeYDeLEuWgkOYjiamwJjuqFAChdq?= =?utf-8?q?zah+HD/ZwQ6ONDz7Bq+AQ7/vX9xhqjq3+uyuxDi8P3mPhQohZlDxWP4v58K9woPwM?= =?utf-8?q?JKUtSNXAC40669wL+2Ui8M+3y42T8fo8kf2FLWQ5VojGs/k9Lzp+NBgxIUBcB+8yh?= =?utf-8?q?TBJZucguEQQvskz4PvCdMn25YvbaaKcH1tLXObynwyNmMa6d51NhW+ljLAquKk90p?= =?utf-8?q?6rkMYBC5Q1jKI3VIOG451NKvazShZwCNrxLrzFAYykzXkDCmaRxpSDTYukQexAaRV?= =?utf-8?q?Vv1mgwDlso1ya26EN5N4sjD6pBv8sJG7Pu6Igbc2rF8YxF6+QKlBdhb7URnlTpibR?= =?utf-8?q?5rMSi62+D4AqjZOC1UVXXe8nMcON2/JWRFEu1oI85da/T3mzNPSX4hF8AZTRplB5L?= =?utf-8?q?2B31TxyfUeReo8eynQEkltSUpDL21BbdpTo/4gYUtPVdgGAYXINY+plQKsNDVdm8h?= =?utf-8?q?4XrCds3016SttrfX1f0sTBdybt5uK1xzgiGjtrzavN+Ep1Zc6DMmkC7BJlDGxhHD1?= =?utf-8?q?1nWh+a2rMKnv?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9f58e84-fe14-41b4-e155-08dac94518a6 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2022 09:13:03.0956 (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: BI9NMycjL/DlR3hR6S+OlgZRgp4SEm73cFyMXrefWjl2i1DApc1d+UrygQ6nDQiOKD/BaHSKz7WNiX273m2JXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9094 X-Spam-Status: No, score=-3029.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, SPF_HELO_PASS, SPF_PASS, 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: Jan Beulich via Binutils From: Jan Beulich Reply-To: Jan Beulich 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?1749824647712051405?= X-GMAIL-MSGID: =?utf-8?q?1749824647712051405?= Remove the now empty i386-opc.c. To compensate, tie table generation in opcodes/ to the building of i386-dis.o, despite the file not really depending on the generated data. --- v2: Leftovers from earlier patch moving i386_seg_prefixes[]. --- RFC: Is there a better way to specify extra dependencies, such that table generation and compilation of i386-dis.c could be kept separate (and hence processable in parallel)? --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am @@ -162,7 +162,6 @@ TARGET32_LIBOPCODES_CFILES = \ h8300-dis.c \ hppa-dis.c \ i386-dis.c \ - i386-opc.c \ ip2k-asm.c \ ip2k-desc.c \ ip2k-dis.c \ @@ -562,10 +561,9 @@ $(srcdir)/i386%tbl.h $(srcdir)/i386%init < $(srcdir)/i386-opc.tbl \ | ./i386-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir) -i386-opc.lo: $(srcdir)/i386-tbl.h -# While not really a dependency, specify i386-init.h here as well to make sure -# it is generated even if i386-tbl.h is present and up-to-date. -i386-opc.lo: $(srcdir)/i386-init.h +# While not really dependencies, specify i386-{init,tbl}.h here as well to +# make sure they are re-generated as necessary. +i386-dis.lo: $(srcdir)/i386-tbl.h $(srcdir)/i386-init.h ia64-gen$(EXEEXT_FOR_BUILD): ia64-gen.o $(BUILD_LIB_DEPS) $(AM_V_CCLD)$(LINK_FOR_BUILD) ia64-gen.o $(BUILD_LIBS) --- a/opcodes/Makefile.in +++ b/opcodes/Makefile.in @@ -554,7 +554,6 @@ TARGET32_LIBOPCODES_CFILES = \ h8300-dis.c \ hppa-dis.c \ i386-dis.c \ - i386-opc.c \ ip2k-asm.c \ ip2k-desc.c \ ip2k-dis.c \ @@ -947,7 +946,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h8300-dis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hppa-dis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386-dis.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386-opc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-dis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-opc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip2k-asm.Plo@am__quote@ @@ -1537,10 +1535,9 @@ $(srcdir)/i386%tbl.h $(srcdir)/i386%init < $(srcdir)/i386-opc.tbl \ | ./i386-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir) -i386-opc.lo: $(srcdir)/i386-tbl.h -# While not really a dependency, specify i386-init.h here as well to make sure -# it is generated even if i386-tbl.h is present and up-to-date. -i386-opc.lo: $(srcdir)/i386-init.h +# While not really dependencies, specify i386-{init,tbl}.h here as well to +# make sure they are re-generated as necessary. +i386-dis.lo: $(srcdir)/i386-tbl.h $(srcdir)/i386-init.h ia64-gen$(EXEEXT_FOR_BUILD): ia64-gen.o $(BUILD_LIB_DEPS) $(AM_V_CCLD)$(LINK_FOR_BUILD) ia64-gen.o $(BUILD_LIBS) --- a/opcodes/i386-opc.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Intel 80386 opcode table - Copyright (C) 2007-2022 Free Software Foundation, Inc. - - This file is part of the GNU opcodes library. - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - It is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, - MA 02110-1301, USA. */ - -#include "sysdep.h" -#include "libiberty.h" -#include "i386-opc.h" From patchwork Fri Nov 18 09:13:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 22217 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp79917wrr; Fri, 18 Nov 2022 01:14:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf6F6cK33U+7l01QTQd1fAHnZttCwnSduWHFrs8G2OvULtNeoWLPwOD2Nic5mgRc0UD7b7aZ X-Received: by 2002:aa7:cc12:0:b0:462:79ec:55eb with SMTP id q18-20020aa7cc12000000b0046279ec55ebmr5295317edt.151.1668762846321; Fri, 18 Nov 2022 01:14:06 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ae6-20020a17090725c600b007309a570223si2829888ejc.609.2022.11.18.01.14.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 01:14:06 -0800 (PST) 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=O4Z5wqZo; 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 6D5FA383F2E1 for ; Fri, 18 Nov 2022 09:13:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D5FA383F2E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668762832; bh=ji/LybRXyJjUK2KXELvkS+6VfOHhokEgFDyUwu2WnYY=; 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=O4Z5wqZoO1D0JNWVDVoVwlBcrcseBPa5HSVIQQWr8YZHgUR7Op8kUb64qom6op67M H2HxWBSwrSa0w9jXD2hkLK70dPHm23UELU/mruwsfirbtaEio/Io8NritL/3kSXhVx gqnEZku4/B7t2SqEu9hrwZEpuO5tP38gsefIuF0w= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80070.outbound.protection.outlook.com [40.107.8.70]) by sourceware.org (Postfix) with ESMTPS id A663B383B2D9 for ; Fri, 18 Nov 2022 09:13:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A663B383B2D9 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HQLom8kXEbcXF0+Dt+bkdnxPrZKYw0Gws7+6nRaGXjap7D4n1q6+59Kr2m4rOQHWBiqN9eFC0lNjXCZWeD7RaTgvLcYa6ZFBMj/P4HzwrBQ+C6BH6W/VAPw/DBicaBXI0rbLoWLVS1K6KpSVroeyS6OHHSHhSSai3ctwUJgpii85zAs/8+7dpADIzeOacMMfxmvlhwwbLvDt6KaZiR9JN/vLX6ZvwuvY95h0UiE34P4D14n9xtIumd30cSa1yLgY+/ujLOfveUsCUGafBdWu6YNiGrBDGNmnImpwa6KZ+UiKL2eArymkxKH+ZLMSsMJiK0EblNtV4+QVbY5TQ4o8jg== 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=ji/LybRXyJjUK2KXELvkS+6VfOHhokEgFDyUwu2WnYY=; b=PDWjeIYg5ORnks2BeZ+lSH/Xb9FiZ4TCTTCsdK2KwNKscAYWMAsgqex6iEYmNPWVnmFBRHZC6bB74eu6W2rdiIbAHvKnRaZrAVF3DGh3ZM8EnB1R4M1Zp6rop5OqVXKd2GcYXLctuMr2vvtl6LwXVH95JNLnBjxC/4r6pQb5TrWQUUyL6jLpqzUBpjIQfwnq3SLq7fmDS7U7OGHMASupHD6DCz2edxRs0zGDWxhRTq4F91pU3HZGqAARiuTTJcr4v/LDHsmJAcBMAkJS+aBW/tNlQKJvYPJ/CetQZoV7EgkKaFehr9axK9T0eegntjpLJ/92Fj1e3XrX69VJLWZizw== 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 AS8PR04MB9094.eurprd04.prod.outlook.com (2603:10a6:20b:445::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Fri, 18 Nov 2022 09:13:25 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8%4]) with mapi id 15.20.5813.018; Fri, 18 Nov 2022 09:13:25 +0000 Message-ID: Date: Fri, 18 Nov 2022 10:13:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: [PATCH v2 3/4] x86: break gas dependency on libopcodes Content-Language: en-US To: Binutils Cc: "H.J. Lu" References: <7a1ee76a-5b54-32a6-6301-a1741b5c1883@suse.com> In-Reply-To: <7a1ee76a-5b54-32a6-6301-a1741b5c1883@suse.com> X-ClientProxiedBy: FR3P281CA0118.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a3::13) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|AS8PR04MB9094:EE_ X-MS-Office365-Filtering-Correlation-Id: e18779fd-0851-43ac-bcde-08dac9452608 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h6ulWXf6SZyO804FcGVAlB2fllGcQEw1YPnwt2eHn+7Zfh/Tlf4L5eJao7OROc2kji4Ue9astTK+5+/ye7rvRfK8UAvW5oiUul30yYa+znJgQS1WEjK6aE8bCcwZ8eQ7tKd4bOlmwatQe2UA+9/PwNDfVrzW1lIaBdjWQF0rUX1R2CxIE7SEQWhUbm1o0IyPt6YcKYLYTpq1QXa80h0Hw7WGZ+/1kqj7Uxj0XMpCXCZnS50xA+QWJrXWUmOxZGxkSSfda/44rW/EBE1h9pDEig7maLL8C7C/Aphaiy/+Th7+DQbBcNWgDuwfb5m/xS7SILAo30Z/jJ0GOAGT7Wjz59RmZPlJWaIjHFg2DAXasFNt4rvIb01bJv6naizUyDY2nUPH6cWwjH1tyxbiiCz1ribzjMRnOP2imjKVM6UeUKqNEvKXPv3sGoaVnMlo89PXSLCIE0GgNNdRhaEvnc3lcc3pWjYnGwjX4+mvpfRo9ixM2naWd6AYhJ/lncZMpk7wbHT/cXipshtlGXY5aB2xkn8zPsNoGj3tckI5YKT591R7r22XRcLRaW97ZJj4WwpvV1r0wmUEt3kDvggsfCecP6zbGp/d+cuBpA3UG6AuM5+7IeOg78GY4O2bjIILdWKh5s9l1249Ml9sV1eHBiH7FdXd3+qThifc2vJej3l/c0NzAblAHAkvmgw4Y2YykgbM1th+0LqWVu7YZ+YtkehPpjLIs1eXIPe0ng6PQQ6NBhA= 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:(13230022)(136003)(366004)(39860400002)(376002)(346002)(396003)(451199015)(316002)(6916009)(31696002)(6512007)(26005)(8676002)(38100700002)(4326008)(66476007)(86362001)(66556008)(66946007)(4744005)(2906002)(36756003)(2616005)(41300700001)(5660300002)(186003)(8936002)(31686004)(478600001)(6486002)(6506007)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fOuIp0cvfhxueFeGZfTZ7B7K/iNA?= =?utf-8?q?ZCgdRTR3UWzDSbNBXzkfUC+emzIAp36bDA69OWSWYwUq7BkVMCOOAkY61cJjM0qGN?= =?utf-8?q?Y3QG9VnR+cq+6KwrmO3bAZXVBBgNa1aR36pS8FlG1JXNHeFk/NWKpN8xZSMnNUDyz?= =?utf-8?q?WbhrgTjAfyGjA13RfC3HXhWF8qy0p8GITh12AqIqbg+L1k5B2PMTPysW7+Y1dSVc/?= =?utf-8?q?/fS2fC3jLuEdOSqkFO1UrNt7rGNg1IEuGlS5aOOVnOcDQsumCKRNVkTh6QmhhmibQ?= =?utf-8?q?BmsL9C0ERzuQcxdMvtbm1EPOWIRVWSDqM+XTH1utm3lH0EbK1J0l/nwEWfjzBys24?= =?utf-8?q?VBF6DLp9jshChsxojef8iSMQs3meagQwiCwSnXxv5ztFaonao4HxqHveJloVXXuh9?= =?utf-8?q?45oR9pZA1sHBJUvogKOc45dPMpiKDGV6GK2vAKGYyP5q33u73sGDU/uHf3sRokmiv?= =?utf-8?q?30p1p8pYsewPj707ecqewjlQeI6y0yPIyHGWe9zPPrS0wK1Lmrq7ZMBnP9Mh0u9sa?= =?utf-8?q?LE+5SPf6sQ93q7+Em4OAUab6bVfCR/ZDTbh9kXveETNbmoRdPOt4+svZ27YdpsEaV?= =?utf-8?q?cjyDj/9m/AYSNe5ruhfxOCtNJhFStcdjbI36t3YQD9uoUvgexCShJPkNIsT2lQEVC?= =?utf-8?q?2oi59KhzB58iBbfGIR9VGNG+fUFQ+8v18N37pGSBMBGKPIjE+GMDU5fnbDO8mfpWr?= =?utf-8?q?Vtl6b1vw+s9k6f/eR4b859gPOIag5VAm/mOQcyn3DAXhA+Vm3X0sn1MjYMacfCDdj?= =?utf-8?q?LJtdHIiFFBBtu/QTNdj22EMhB7iDuKP1ODlARZpYBnpqhychnSxJWfMjCREEG4GeA?= =?utf-8?q?WKBYvBETUrJj8p4FE2EEmwPb1TwyKduemeIH2IKe/QdnqDxjzguTTKjRgPFmQhW+9?= =?utf-8?q?j0YsXME/CkpRIWvYGneFIf5YiXom4+5TpTqBHVjEtCgRvO2tin8ZkAeOw9M/k2uqw?= =?utf-8?q?6IZoQWXQPjPB7Fg4SYe9JIE20r1JfWXxR+Njmq5fF6v6ZZLwIDPrsQd3kaFwyrA4v?= =?utf-8?q?XEbX2p2Z5cOXvMzbaPT3rwVWZgkUXwLp5pXoZDlBuspNMyTwmA2JbTNrJiGLUiSRI?= =?utf-8?q?axZvB8/zq2v0BGpygb3WkUOJIH5XfKr4lAVLsqNC5WivpTTIh9rPz+AxDuw48ZCBS?= =?utf-8?q?RgT4fkIMJ8tsGEttvbOgak2Q2MDnrGlZhLxsHOAX+DGfBiQY48Vs+Wj8j3JDQzEKJ?= =?utf-8?q?6iLDMKVExOwt0vhNYW/xLZ7RrRNBWg1dSS3DKYtIzZheZKsK2pSAlNec+KNudEFHY?= =?utf-8?q?ShY7PqoWqHsjVIkjfau1Qyw62wE8F55MfcqQ8EIefdZCf2LLm+bYHwQwpMkfDgnd0?= =?utf-8?q?rVwKmpHx0cegydsVEDE7POGaILPXz43P8R3vvdkkyCGPOGIKvONzbDGnq4ROePdDW?= =?utf-8?q?tgsKhLrEV1n6xFWwcNt7++AX7IqD6n9qOT1A4pYyFMm1rdqsFq6zjKPfhX4OXEAWQ?= =?utf-8?q?TU/XOjUoVh89DliLVMT/3ENjroxoaWacxoLEcW7qW042mGDIFGisPj0SdspqHG1xz?= =?utf-8?q?OpQpUHEb+vZ5?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: e18779fd-0851-43ac-bcde-08dac9452608 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2022 09:13:25.6254 (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: W0lTN53/p1Ndu/lQ/gm2/Bqdc5YfLVPv76/rVZr1dAPvVWaPD80C97dFXjuWmeq0FgCSiHisnYhPffMRbZzMwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9094 X-Spam-Status: No, score=-3029.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, SPF_HELO_PASS, SPF_PASS, 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: Jan Beulich via Binutils From: Jan Beulich Reply-To: Jan Beulich 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?1749750038739366062?= X-GMAIL-MSGID: =?utf-8?q?1749824670575845235?= gas doesn't use anything from libopcodes anymore - suppress linking in that library. --- v2: New, split off from larger earlier patch. --- a/gas/configure +++ b/gas/configure @@ -12263,7 +12263,7 @@ _ACEOF # Do we need the opcodes library? case ${cpu_type} in - vax | tic30) + vax | tic30 | i386) ;; *) --- a/gas/configure.ac +++ b/gas/configure.ac @@ -420,7 +420,7 @@ changequote([,])dnl # Do we need the opcodes library? case ${cpu_type} in - vax | tic30) + vax | tic30 | i386) ;; *) From patchwork Fri Nov 18 09:14:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 22218 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp80210wrr; Fri, 18 Nov 2022 01:14:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf4m01c9xmMMi0jv9yB/b9K/GtN3ZNnDVqT2rf/K94NpwPbZKyO0rsL6pX2DfYNWt4v73/le X-Received: by 2002:a17:907:6e12:b0:730:631c:40b7 with SMTP id sd18-20020a1709076e1200b00730631c40b7mr5199126ejc.336.1668762898126; Fri, 18 Nov 2022 01:14:58 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id tb26-20020a1709078b9a00b00741a16e8562si2406330ejc.826.2022.11.18.01.14.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 01:14:58 -0800 (PST) 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=WvcrtVBb; 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 281043839F71 for ; Fri, 18 Nov 2022 09:14:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 281043839F71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668762876; bh=o9B8ohx8JZ1kX4Oa16fVe5cglMOstwygd5/FedkPTS8=; 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=WvcrtVBbiJ+eypVJGAljHnDTA96byXVux/H/QAu4NKCO+Gs6WL9yvJV60y1ofZJkW LNNi8bWjeJn6mgUk0ogW+mrITryyjRxBpH8PsCa3bINW34MDs6io583hRxs1RJks/7 jnZGicQtPB6+MW3wx0Yv/vdSLbJB6+QG+cBjsZOY= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80048.outbound.protection.outlook.com [40.107.8.48]) by sourceware.org (Postfix) with ESMTPS id 33BC23860744 for ; Fri, 18 Nov 2022 09:14:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 33BC23860744 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jWCzaUcpV8ygf4HRvo67AmCDgKeMLkiOz6XVA8LP9enDFzy61synNF1l18xepN+njuR6eGZ6hUcoaAB4RTtP9nGi2DCaMZ7wVHZkfP1kKD8eqyOyzxTNDY5/chuegtY/BT6bx+1kBdg5YhKejzLJyUhllQGHlXNizaKCMKYRwm3VUd8twfIoudk4RCxFFhDu4tflKshcTzvOlfY+bxd6WZPX3l47B2fhagBn2Hi7jm6TqcHNF+nrmHv3o/jhJqf9JG3vxfUj45RsRugxu4tiU1aRX09hEw0tWG1oiwIkhKx5cciPuIg4hTUwQEJnT+ha9PYhxdA42fj4B9WPRH9ySw== 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=o9B8ohx8JZ1kX4Oa16fVe5cglMOstwygd5/FedkPTS8=; b=ShJq11FZyVoL3fSVHMKOJyKczGhiwe3GirWc2KKBzSTM4FM0pGephsmM4Kc2O5gLs/2t4TuORtkxNuBUtjSha9J1PbHXqrAQYfXR1DfyicC0Pr8sGBeOKgUxENM2IGHmrFFkwN/X5EuXm+pwZFc63JsCkAhqUfOGHs4AlvObDDGg/n3Uy+GBtQ3pwCst6Q7zxVKx8Xmc0Bc87rZ4nqf79JN3PsEyp6CNw0JNKV04rB01FEDpvUg+pJPMc3W4aQqqnlupn6u/mgCz5K0/xS5oDRPq3cfKc0Nue9t5kQ2zHYILOmfarhPR06y6Ems4nJUyj7r6f4UbDxIv5AUfbgMNzA== 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 AS8PR04MB9094.eurprd04.prod.outlook.com (2603:10a6:20b:445::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Fri, 18 Nov 2022 09:14:06 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8%4]) with mapi id 15.20.5813.018; Fri, 18 Nov 2022 09:14:06 +0000 Message-ID: Date: Fri, 18 Nov 2022 10:14:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: [PATCH v2 4/4] x86: drop sentinel from i386_optab[] Content-Language: en-US To: Binutils Cc: "H.J. Lu" References: <7a1ee76a-5b54-32a6-6301-a1741b5c1883@suse.com> In-Reply-To: <7a1ee76a-5b54-32a6-6301-a1741b5c1883@suse.com> X-ClientProxiedBy: FR3P281CA0149.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:95::20) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|AS8PR04MB9094:EE_ X-MS-Office365-Filtering-Correlation-Id: 72a928b4-a2fd-4fc1-c34b-08dac9453e48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LL0ZSqsG1bTJfi0wlxzmN/XsJ7TnurbJPYzYu7a+1PdQ4ujMuf6VXqlKS45p8QVu/S1aE/na6MrxneAnCaKhabwWX3LKs70ouJscy7M+XyqItn1iPY1xP08xhrQtkfxria22YE3qfE8mdDoWA1gQpuRi0B9c36pIJ/tAYVeWT6b0pCBFtTYqtNBlyL8yh2h+jZNCe8mbZ6RbxaNfBRvNXKX4Ah4wCigTIXL2+67wJqsmFBvQW7rZEX7iI368d71rJ9eedV74OxrRg1kFwnJK/HFgGg+fl8lT6lbW1yMfW2aw1Ng+kRe2cWe2pWKYWwwp/ctVjdVMcbnf0upPvYF0rePwuMnF74WIPxOsZebz6kSRkoVDV8jChVqEbe5DTg89BCKNkA7tiQTMgJM+DW0olgGAHsdtA3M/0TAZBAkfIuXuev0fbjAjqIvi57pE6fw0BBSSOOhuxyVhnHw20Pdirz7REb5xxcRVd9qzRk6wi8J6QfxqPMDe9mgpSVMA5r5sZFQchd5UaLyh9C/cmpvyPxxmLhgutzXa74pOw5jK0/fjl4e5aAW6e0grHdjHrAh3y8Murk0Cm8aOIGXfPk2Vn4+OGMY8EhNWmmOmwgTVW68HIAj1+zcg/cor/vAbbVcS0rcGa/sb0l1S3UaiOMlwQZ4WMeN4w9rlKDQOOMjiXjlFyC7YgLmj1CLWJfMa+joJyhhAQPJ5Vjyr3VsEhkNrklPxec9nQss+dwZi3QbbYKU= 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:(13230022)(136003)(366004)(39860400002)(376002)(346002)(396003)(451199015)(316002)(6916009)(31696002)(6512007)(26005)(8676002)(38100700002)(4326008)(66476007)(86362001)(66556008)(66946007)(83380400001)(2906002)(36756003)(2616005)(41300700001)(5660300002)(186003)(8936002)(31686004)(478600001)(6486002)(6506007)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6VnkuIVba9Gc0yR96dFoAr25SdnU?= =?utf-8?q?heiMpxwlgSt8E8cZ3J+BYVXmvvPtPvQLKGhOc46Ds5Lbi/KByy3hbB5ReQR9MMPI5?= =?utf-8?q?jmmnNMKqXLWrD7vioVF4QF8fGlRBADFeSfJ04ThIqeEaJ/RjyPuV0GudzISVY2xVp?= =?utf-8?q?kWfjGUXf6AeAg6Tl2tudn4qL9TQi9EJ91tLnGAzAOzKF27DQyaUwZMVSkIUYYyUm/?= =?utf-8?q?iFKzMf0o5J3gmQ1RkIZCEbiznju/Q7Jr1J7nQPR5bQOIh5yx9zddfT4fbUMdyie65?= =?utf-8?q?vIZ/3E5mKr3+uBuqQ0yjmS7T/qrB5BBLE4TqaWAlYmkktRdua6wO1wfrRZffRHvTF?= =?utf-8?q?0PkygE1n5cPhTiFs+zSUx/yHVJ65P2PAhnczGRzVzw8BYK3/RgBmQwycdX643+PEw?= =?utf-8?q?SREy4/zoKDidi1B1p9PtqWjn8mKTKJe2xTJu1EU6VnuGTSUJ1KjhPYp1CGsxD9TwM?= =?utf-8?q?ZA0+A+NRkYw1ItxmLx8bye6VxfzWB1TAETNN5wqBd/Pi8AKtut+8m6dY3ybPmS9gR?= =?utf-8?q?phZqjwEvmH55RXJeWDXjiuRcqjj7XJi04gY6UjHQWEgU141uUFSkKKYVTzoccGxog?= =?utf-8?q?TM4xmY+D07qC+G3Eo64cA9ARfIKjALJV5/n+kgBXhjlcAMU9G8YTh8NRuCq2S3giw?= =?utf-8?q?ZZwyWPNDlS/zSru0WNIIVjv3pMhJq2gnqnjKDuknRNDwxVAjF1p1/tKVxVNDEP85n?= =?utf-8?q?fLilr1DYBY2gh7c358yQf97fdmEN1tUtWCz6eLBDieI8vm6/dKrv7JdBW2+a5EL/O?= =?utf-8?q?UFmC2GAF23E2B1JP9/ocajdBsa9VzME0oWHpy1/kOZbMsMRbsUaqbnrrkNhTLTqWT?= =?utf-8?q?qREeix5urcVyvRNmQ/XjA08eub3+2y4ZqMEeKUUlnXENjc7bpEabDwI7juaWEOC1W?= =?utf-8?q?wEyEFeNYZnD0MHqSIxHstBeDFGku1/se88sUOWCdM2ks42O8N1XhV0OwnAyBHji8l?= =?utf-8?q?z2jRcsbYG+GlI2uUUXJ/Y+g6B5hVpwx6K/WoOVLXivT1yKgQ2wpQDwOJ9sxi1OIGB?= =?utf-8?q?S3THkTsJsEbqHjb2IlYgPKh/qa16cS/oBRZxF/nQxlEuthVFvuBM9lhlkB2JqIXtj?= =?utf-8?q?cjPoNtq3FLgWBVqM3pKQIt2zbNneWe/fEFlJRivw42KarSs/zNtqE3SG7PTlcRVBw?= =?utf-8?q?T11hxO48B3laS7Peqh+vp+OuNVd5jT/9reUft6ke0G+6J+PVAFDmrmueLQUgxiwVP?= =?utf-8?q?bTbnA0CSE02lHqlGR8iq4lfzt+MAd9DVUvSsv5G2M23yy6v/xX4BuJtldE3jZHsj/?= =?utf-8?q?CEAC0aCSuWIudFHOqRdjlfuMJHLaBcL6uqJT/q9SeozvOOsmtQKBlZG8UkDDeH4Qq?= =?utf-8?q?aYPi6c0qP8kyxdcd5uBrwAZL4uIyI6BJ6vQxClh9eRlh4p+Elik+3JYaS1wSsoe3t?= =?utf-8?q?tOutsHY9WGpW9RfieS4agUNCnput6WvAlX/rYU4+i6VPpNVixdiNu40ZveL0amjM5?= =?utf-8?q?IFhdRut9NrdQTj7eX2s4HPDuxR2PpiAM0D7EyHQ9QRZD15Ond+6tQVClZqEFQw9u9?= =?utf-8?q?2W70gbCWhilm?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72a928b4-a2fd-4fc1-c34b-08dac9453e48 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2022 09:14:06.2322 (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: fHskb09o+niBxrVa8w4L9N8401dbTmc7II/vbSpJTRuUDXDFSydrKs5FQzIZb0H9Ksxr+2LrJCVzcdtf5B/pRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9094 X-Spam-Status: No, score=-3029.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, SPF_HELO_PASS, SPF_PASS, 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: Jan Beulich via Binutils From: Jan Beulich Reply-To: Jan Beulich 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?1749824724848717466?= X-GMAIL-MSGID: =?utf-8?q?1749824724848717466?= Now that the table is local to gas, ARRAY_SIZE() can be used to determine the end of the table. Re-arrange the processing loop in md_begin() accordingly, at the same time folding the two calls to notes_alloc() into just one. --- v2: New. --- We may want to consider having i386-gen also produce a table of type "templates[]", which we could then iterate through without needing to do any allocations (and with fewer overall iterations). --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2981,31 +2981,20 @@ md_begin (void) op_hash = str_htab_create (); { - const insn_template *optab; - templates *core_optab; + const insn_template *optab = i386_optab; + const insn_template *end = optab + ARRAY_SIZE (i386_optab); - /* Setup for loop. */ - optab = i386_optab; - core_optab = notes_alloc (sizeof (*core_optab)); - core_optab->start = optab; - - while (1) + while (optab < end) { - ++optab; - if (optab->name == NULL - || strcmp (optab->name, (optab - 1)->name) != 0) - { - /* different name --> ship out current template list; - add to hash table; & begin anew. */ - core_optab->end = optab; - if (str_hash_insert (op_hash, (optab - 1)->name, core_optab, 0)) - as_fatal (_("duplicate %s"), (optab - 1)->name); + templates *core_optab = notes_alloc (sizeof (*core_optab)); - if (optab->name == NULL) - break; - core_optab = notes_alloc (sizeof (*core_optab)); - core_optab->start = optab; - } + core_optab->start = optab; + while (++optab < end) + if (strcmp (optab->name, optab[-1].name) != 0) + break; + core_optab->end = optab; + if (str_hash_insert (op_hash, optab[-1].name, core_optab, 0)) + as_fatal (_("duplicate %s"), optab[-1].name); } } --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -1916,16 +1916,6 @@ process_i386_opcodes (FILE *table) fclose (fp); - fprintf (table, " { NULL, 0, 0, 0,\n"); - - process_i386_opcode_modifier (table, "0", 0, 0, NULL, -1); - - process_i386_cpu_flag (table, "0", 0, ",", " ", -1); - - fprintf (table, " { "); - process_i386_operand_type (table, "0", stage_opcodes, "\t ", -1); - fprintf (table, " } }\n"); - fprintf (table, "};\n"); }