From patchwork Mon Nov 20 08:06:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 166969 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp2045064vqn; Mon, 20 Nov 2023 00:06:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHIzLoQryiZ1H2YUn3xyAhwVcdeTPtthbGC6dgF7IpTKK42Vyg/yYO25CRa6hJBObOPTTB9 X-Received: by 2002:a81:7e50:0:b0:5ca:d5b9:9da3 with SMTP id p16-20020a817e50000000b005cad5b99da3mr704027ywn.41.1700467612304; Mon, 20 Nov 2023 00:06:52 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1700467612; cv=pass; d=google.com; s=arc-20160816; b=b4WxnmeGcDSYw43DxJku035sFj1ZnZdTeKuF0zFQwwftMZn6H7Cib9kAf1QAIRyjTi aN0CecfrmYBHF1CJXMz1U4r92fDzYjQdjLkKsjIGXXgVMRL+uMN+K5qJ5KuBjFAJ+2WA W984VXo3zp+05yTJvVcq6y21q1PrPwI/gD77P58R/lgXHM5IjOzH+LMpTxYC1KATuLKT X0cZBwLmKxm3Zyk+Rrat3+n9p67PDWWHEDj3mWHVfFaAtpfzFTNsnCw+FZVwd/elP5/e y9pj2/35ojTwAuFSeh6cAWLFulZ+GhshQvFXp6pKwtv0nvkUqKXJYMusgKyt4O+Pq3NC RqaQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:autocrypt:subject:from:cc:to :content-language:user-agent:date:message-id:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=z5f9E7Tm8xnDc2HlcdHRxrLsLTk8vzs/B5TVkuE+S7w=; fh=8WW8/k0o0G2vlJiZAQKLzwZ5FShsw2CjyMds4OH6804=; b=g0gVLjKoSknt6ak9g/VUUvIo7XZjF7BN3Z9VRDnWhKJTPC+6tPN4LPhmtGjfLvMWfn 601a8SnTfjsO5MmT3OqkLKM+wYgDYzkR4HFgP5wsQHB4hSpeQe1//HarUAA5XagcZIDC K3Dgn8DgoRhtDaSgqeQP0HHKXBLKZs+6+7al1PilkCx8m0MF1u4s9ulAS6QngjXwYHjm rdgfapOuhYnV8SahI9wIx2fjbTbNdjlJ3djKPd5/IIIleLPtBDEwqtFvV+L6kUPkl75M W4RmqabsKLvczh6hW5Nt7OLAjuDvTgi+FF7V8GEpHrmh0RpgTbJ/5ezhVBEteC8vyKnX LAVw== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=mBnqSgEW; arc=pass (i=2); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id p11-20020ad451cb000000b0065af2f79da7si6867070qvq.114.2023.11.20.00.06.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 00:06:52 -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=@suse.com header.s=selector1 header.b=mBnqSgEW; arc=pass (i=2); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 12F023858437 for ; Mon, 20 Nov 2023 08:06:52 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2053.outbound.protection.outlook.com [40.107.249.53]) by sourceware.org (Postfix) with ESMTPS id 8C1C73858D3C for ; Mon, 20 Nov 2023 08:06:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C1C73858D3C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8C1C73858D3C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.249.53 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700467607; cv=pass; b=RzaAejfmok0fj30qa0VqBXG+wnqxc1LlVGIcNk0yVGza0PeGAo1nSr3w9+N6jom6Wld9Z2QTPWKDG8mmm75RR8/SAc25AbPyQFW/OU0h+e+gMEfF1yCiz3SNex6VoqVUdVQTPGajcC63McBWiaxv3s7ruNO9j/riQVMLDkFt5lo= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700467607; c=relaxed/simple; bh=u8xHPpDlwHi3gGygo1iU39nJuPPv3H8oAhLkD90WGzs=; h=DKIM-Signature:Message-ID:Date:To:From:Subject:MIME-Version; b=AuCdYCyLatI8/ISe03z4CrEdUA9tjNxHTIu9ovZzGzaZqCkKzheFDB/mGFprCGe6iwX82U96q3O+3aUSrCfB1UzAlGhW8SFa9OvTQu9e0/F1AH8e7oVY2/YU0+ud0NVX6ppPX7AssO7Sc0QjCfw3zpPsogsBh2PfhjTnspOZok0= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CbkErfuBU2DUsUXwC3iTtaq/WYErDV6Lcn9VWHsBvKf6D039OUicMXqvWzgNnzfikiolviyMOz6dLD1h6Hv/Y10gA6NOtNc8C4Cf4CqBwWPoPfh2MZh/5b5emHb8gsDtk12LMJ9djUsLZMW1EAoy6R+cBBx4Cb1UeH9Z5Dc11s2/DxAzjLdu27B0jxrC2Bx6nMh+XmKD/bdkyg+6MxNSvdhZMw/w9cEsyQtVJ7htZUKLQ5xTCsxiV6LVGP9WdfUzbPM3+KcGaWPEJdXcAFR1Zlc57OT6t0jvF4WZ4+4oxSBtwx+XeNe8ZIzeWkJ3ax0GCI9nWmYlkO+rlb6fj/gcFg== 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=z5f9E7Tm8xnDc2HlcdHRxrLsLTk8vzs/B5TVkuE+S7w=; b=WzMgwP/n/ZhXJn3QswGAPZNSiHy83GSm2KgJHMLay/XbSfAaM5pnxhU4+cu0Sl0SrfmvKfqi0t+tQza+uqHDBRePKMozv/9IncLDjKxUsmWDSRBCS4GNcY93ijx7Tx7S5rWc5tc1JVf8YDV996FDT0wasD2b2KKwKj4JgUI4X4iqrMqp3A4tu5r0GwIX11vXuNEGWteP+Z0xJtc02CMPgJxgYE7sS2SfS0Zf/4wV2ZOP0DZmfok8Ik8c03xx9XTWWWggCRlbUfgUJObcCWaG/XohdHfvzLUgBSRO/bQSTFTnufNd8Ah/z1DJ0LS09V8OjbFn3Fb5K4ETmw+XEW+CvQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z5f9E7Tm8xnDc2HlcdHRxrLsLTk8vzs/B5TVkuE+S7w=; b=mBnqSgEWvxPmMxyzEyLdv+khG5scJt7dHR8+nlYmVSqUcg2zXnPvvapQ6pLdYkxaJUsYRWvM6SH07NTF5amncWqBum6wdJHESHo3xK5zPxXhQeGH9HDOQD6L0KHJ+KRBh2w6YaG6eoVUOzwSiIDy3z+VdWM3jdkSyMeQ2FMfeEhfmBchoM/ELKBFBm3SluN6VyzKCD/BKEMQicK3UOFWG5GnMCqgW/M7zVyYNKlqwSTMLFfoS7iBmEWye82Lp4a7hF0QIfxtfSD5Y/wy3thMlh/pKUKTvoWinZg3+XNCBysVUf0CjWs14tF8APYLDqy5OBsYM4v66VLfgyOq045auA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by DB9PR04MB9866.eurprd04.prod.outlook.com (2603:10a6:10:4ef::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.16; Mon, 20 Nov 2023 08:06:40 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::eb8e:fa24:44c1:5d44]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::eb8e:fa24:44c1:5d44%3]) with mapi id 15.20.7025.015; Mon, 20 Nov 2023 08:06:40 +0000 Message-ID: <665887a6-44f2-44a7-91e5-e8194db11758@suse.com> Date: Mon, 20 Nov 2023 09:06:41 +0100 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Binutils Cc: "H.J. Lu" From: Jan Beulich Subject: [PATCH] x86: shrink opcode sets table Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL X-ClientProxiedBy: FR0P281CA0041.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::6) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|DB9PR04MB9866:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d0efb84-64fe-46f2-5bc4-08dbe99fa053 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3s/bELuzGyjLglyTuJIHaoehG6m7q9yECckPitcaJMb46G72VI89PLLFw9RLMYavKnb8G/jpjuyyrM4n0aHz9dzDZ2FdwZ7fXfIVhpWK70Io2hE1OJTsshAG7Sz6ISOKrJ1CXqcpfttNlJJTtU3AWiwZINsDQXX0kt6KC2j+xCRKiNTZpp02I3qA3dTP8tEseR3YldeXuXHvrJnqDaU7m0M+OEXzk79iuJ+r5WiR1fNAP4BcJTaPbk7NhiUfmRUhzL10Qr6FQVWcwsEWQzaJeHHlzHlzwKWe3OGSnRjtH28i8zxN0VqW+sjVyNQ6M5Do/yiXnGyBg5JwaSn0cEkpFtXtqsoyPrkjegv4stkNfRe6sR2WCnKqOcC764EhrqT8ZJ7T6irz2i+K9BcbUfpzMud2y+ASphmpekJCtPGHiEfnceT3Jm1TSTSDNAG5RM2tPyPbBUNk1jnmQJrjQqVSNhfks0KPOSOHLmqGER9WncyWpvoiYYLqA7NkNUrfkc6Pzvia6mMjKv/l+6l7psZk8cELh7dAjBL7HYdOJRJFFXnTSezFRyD//EkpFaGgQBRvY//U1FKCVotA2E56XMbKUeBETqwK6/6PrXY9/YO7I6lEqrx/POCWeh34sFINwX8bkPS0/FMar6mQ7WjAbXe7lA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8790.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(366004)(39860400002)(396003)(346002)(376002)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(41300700001)(66899024)(36756003)(31696002)(5660300002)(86362001)(2906002)(30864003)(83380400001)(6506007)(478600001)(6486002)(26005)(6512007)(2616005)(4326008)(38100700002)(8676002)(8936002)(66476007)(6916009)(66556008)(66946007)(316002)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?k3I1TaEVQR9iQkcAOyoRB1g8TQSm?= =?utf-8?q?AWFIM/dnWhVT4/YhHbfxBGmJ6FL+fKmGNVW1hoS9YO1Dq5DCczBc7MftT7IosVZ6W?= =?utf-8?q?yBhRw1q3LrhXdyk+uh/BLlKfnMB94JUi6aRFstMMHWAl+a8Dve1fUhtljqEa51HWK?= =?utf-8?q?VxFtKg01/pqmesTXvKaE7c7fjFCQHKzrWxUeF3fk9CoeSdbrhedvhLw5kqFB3B/rB?= =?utf-8?q?yd/rE0OrGr/C0lAC7+pQAxfYeFSqk+vIwa1aSjJPUIoMHMJhVPiD1InjDU3ymIfxS?= =?utf-8?q?NN9YTFnkii7z4e8VACJ893rOA6+TFFt1tQhDeRwrX2L0UYdxPj8rQOtVlrmREPU64?= =?utf-8?q?VfYImD+5x/Gb5hKkDvUIInbRg7z4XuY1i1CNj+GHyNES+UbP+92Ea1pGegsn6Iz0O?= =?utf-8?q?WvFip4mhVeN7S7Q3g/oFw4IZCytCgWzdKPiFAegvGd1EoAQ3kS1LSkP3v54p9ysrt?= =?utf-8?q?dTi1gw5AtnHx+Pp6+3TaP5rppn7D5JUwJr+HeNsimYk5/otITYxb+hv6gqdf4AgMK?= =?utf-8?q?b04osAtzG9mJ8Sda1SqZNSc0xb8TUtTQjC7QDt6B8FoO8qpGCJPrnSr4GZRcnuY3N?= =?utf-8?q?41zBSDBsEpq7E6x74ZikaWzwDB9+xzfzf9/B//EbofkEc+zr+PRzDNeIAIUkzBlGY?= =?utf-8?q?yB7rraJj0D6odMhzV5TQe5z9aQfw4rTtcgrUbyaixOFtq0WXOrYFoeLCcQqRRoMC8?= =?utf-8?q?H/2J44BKCiOlzyCCxfCJpsVUslJHV8hJTZ6XxvCC7RTCEHQcZN0CnVD/xq06uokHo?= =?utf-8?q?VtW+qP+Bz+MHFV4Cd1T8p1GgSJDZkeUYtkUsJu2PH5E/ZuD0i4t0AXusQNQ1R9yez?= =?utf-8?q?BRCyOVPMVOINbniwLn4uRKXUMRCpS7UwgOqkKShGCzSa0oWyqGFTzDvCxpRUVBlVo?= =?utf-8?q?jD4fGpNe8CRqpbAfly4iGSb2Qt9CGt2BMqdB5lR+LTfQS2LfltPhln5H4UNgwIIsh?= =?utf-8?q?ivmnORgYuseUPI/vwA1ZNgxB3QesWcgYq4E14YTgvEpkOh6lsHHagpRazpE4XdwCh?= =?utf-8?q?i/s7duIfXakLQAFKLtMcT/Qt5q6Z9RHzyTKLDG1cFnIeU239yHoY8CV39aNnC3fUZ?= =?utf-8?q?Kyk4M9bwezCxitZqxt/zAP9URjczRFw9kpg3N55irdSzNPQ4Qqgtkx/Bg11JICJI/?= =?utf-8?q?C0sSpGc0JPL7t+ihFHedcWvWqvalisIhywbPykscMODrQGQvw/RiysvwvUpqiSxh7?= =?utf-8?q?y7hEz7+CW7afJnF9uV0UsgtX3Q1K4qjB8n5617RXd6Py5Aa+nh/CmTspMdYRT/80N?= =?utf-8?q?8c5KBWqkPNWL+FPQMIGMBrNMgzt+OMQCfJsMlAsNihGQq/9kwvVqfa2hf/k9J2nRc?= =?utf-8?q?QkpxlvAsRo7yyfWurtM+fbW8vOla9GFq8vhGplndE/I5XnnXOVnBeWvIdgdku23C5?= =?utf-8?q?oFMCpVaOtr6Qn6G4i6uPEhpM5iP5powX984wNH3Do31Nmn9Afx/MkkDNzAhJ2Wlxn?= =?utf-8?q?eRG4vM77oaHp4SMMhY2AVNHKpw6C9pQeZpC4Wd3FFQpgjVa8LX05RaJcxskWLiLtM?= =?utf-8?q?ByMFJ98wWi0C?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d0efb84-64fe-46f2-5bc4-08dbe99fa053 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2023 08:06:40.3166 (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: Ptvaaqh5ZP3UdflDzo9rIUT+upmn+BjE/gdZZ6TgiYwcT251iDNS0IJU4XINgev7ifgiVBZB1/XcZg1nHEYF4w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9866 X-Spam-Status: No, score=-3026.4 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.30 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783069527078457563 X-GMAIL-MSGID: 1783069527078457563 Have i386-gen produce merely the offsets into i386_optab[]. Besides allowing to shrink the table even on 32-bit builds, this results in removing a level of indirection from the frequently accessed current_templates, in return for adding a level of indirection when looking up mnemonics (commonly happening just once per insn). Plus for PIE builds of gas it also reduces the number of relocations by about two thousand. Finally a somewhat ugly static variable can also be eliminated from i386_displacement(). --- This is assumed to go on top of "x86: also prefer VEX encoding over EVEX one for VCVTNEPS2BF16 when possible" sent a few minutes earlier. --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -569,7 +569,7 @@ static char *save_stack_p; static i386_insn i; /* Possible templates for current insn. */ -static const templates *current_templates; +static templates current_templates; /* Per instruction expressionS buffers: max displacements & immediates. */ static expressionS disp_expressions[MAX_MEMORY_OPERANDS]; @@ -3101,6 +3101,20 @@ i386_mach (void) #include "opcodes/i386-tbl.h" +static void +op_lookup (const char *mnemonic) +{ + i386_op_off_t *pos = str_hash_find (op_hash, mnemonic); + + if (pos != NULL) + { + current_templates.start = &i386_optab[pos[0]]; + current_templates.end = &i386_optab[pos[1]]; + } + else + current_templates.end = current_templates.start = NULL; +} + void md_begin (void) { @@ -3111,16 +3125,12 @@ md_begin (void) op_hash = str_htab_create (); { - const insn_template *const *sets = i386_op_sets; - const insn_template *const *end = sets + ARRAY_SIZE (i386_op_sets) - 1; + const i386_op_off_t *cur = i386_op_sets; + const i386_op_off_t *end = cur + ARRAY_SIZE (i386_op_sets) - 1; - /* Type checks to compensate for the conversion through void * which - occurs during hash table insertion / lookup. */ - (void) sizeof (sets == ¤t_templates->start); - (void) sizeof (end == ¤t_templates->end); - for (; sets < end; ++sets) - if (str_hash_insert (op_hash, insn_name (*sets), sets, 0)) - as_fatal (_("duplicate %s"), insn_name (*sets)); + for (; cur < end; ++cur) + if (str_hash_insert (op_hash, insn_name (&i386_optab[*cur]), cur, 0)) + as_fatal (_("duplicate %s"), insn_name (&i386_optab[*cur])); } /* Initialize reg_hash hash table. */ @@ -5121,7 +5131,7 @@ md_assemble (char *line) const insn_template *t; /* Initialize globals. */ - current_templates = NULL; + current_templates.end = current_templates.start = NULL; retry: init_globals (); @@ -5136,8 +5146,8 @@ md_assemble (char *line) goto match_error; if (i.error != no_error) { - gas_assert (current_templates != NULL); - if (may_need_pass2 (current_templates->start) && !i.suffix) + gas_assert (current_templates.start != NULL); + if (may_need_pass2 (current_templates.start) && !i.suffix) goto no_match; /* No point in trying a 2nd pass - it'll only find the same suffix again. */ @@ -5146,7 +5156,7 @@ md_assemble (char *line) } return; } - t = current_templates->start; + t = current_templates.start; if (may_need_pass2 (t)) { /* Make a copy of the full line in case we need to retry. */ @@ -5204,7 +5214,7 @@ md_assemble (char *line) 32-bit immediate and 64-bit operand size use sign-extended immediates (imm32s). Therefore these insns are special-cased, bypassing the normal handling of immediates here. */ - if (is_cpu(current_templates->start, CpuUSER_MSR)) + if (is_cpu(current_templates.start, CpuUSER_MSR)) { for (j = 0; j < i.operands; j++) { @@ -5233,7 +5243,7 @@ md_assemble (char *line) copy = NULL; no_match: pass1_err = i.error; - pass1_mnem = insn_name (current_templates->start); + pass1_mnem = insn_name (current_templates.start); goto retry; } @@ -5276,11 +5286,11 @@ md_assemble (char *line) break; case unsupported: as_bad (_("unsupported instruction `%s'"), - pass1_mnem ? pass1_mnem : insn_name (current_templates->start)); + pass1_mnem ? pass1_mnem : insn_name (current_templates.start)); return; case unsupported_on_arch: as_bad (_("`%s' is not supported on `%s%s'"), - pass1_mnem ? pass1_mnem : insn_name (current_templates->start), + pass1_mnem ? pass1_mnem : insn_name (current_templates.start), cpu_arch_name ? cpu_arch_name : default_arch, cpu_sub_arch_name ? cpu_sub_arch_name : ""); return; @@ -5289,21 +5299,21 @@ md_assemble (char *line) { if (flag_code == CODE_64BIT) as_bad (_("`%s%c' is not supported in 64-bit mode"), - pass1_mnem ? pass1_mnem : insn_name (current_templates->start), + pass1_mnem ? pass1_mnem : insn_name (current_templates.start), mnem_suffix); else as_bad (_("`%s%c' is only supported in 64-bit mode"), - pass1_mnem ? pass1_mnem : insn_name (current_templates->start), + pass1_mnem ? pass1_mnem : insn_name (current_templates.start), mnem_suffix); } else { if (flag_code == CODE_64BIT) as_bad (_("`%s' is not supported in 64-bit mode"), - pass1_mnem ? pass1_mnem : insn_name (current_templates->start)); + pass1_mnem ? pass1_mnem : insn_name (current_templates.start)); else as_bad (_("`%s' is only supported in 64-bit mode"), - pass1_mnem ? pass1_mnem : insn_name (current_templates->start)); + pass1_mnem ? pass1_mnem : insn_name (current_templates.start)); } return; case no_vex_encoding: @@ -5350,14 +5360,14 @@ md_assemble (char *line) break; case unsupported_vector_size: as_bad (_("vector size above %u required for `%s'"), 128u << vector_size, - pass1_mnem ? pass1_mnem : insn_name (current_templates->start)); + pass1_mnem ? pass1_mnem : insn_name (current_templates.start)); return; case internal_error: err_msg = _("internal error"); break; } as_bad (_("%s for `%s'"), err_msg, - pass1_mnem ? pass1_mnem : insn_name (current_templates->start)); + pass1_mnem ? pass1_mnem : insn_name (current_templates.start)); return; } @@ -5710,7 +5720,7 @@ parse_insn (const char *line, char *mnem { const char *l = line, *token_start = l; char *mnem_p; - bool pass1 = !current_templates; + bool pass1 = !current_templates.start; int supported; const insn_template *t; char *dot_p = NULL; @@ -5771,47 +5781,47 @@ parse_insn (const char *line, char *mnem } /* Look up instruction (or prefix) via hash table. */ - current_templates = (const templates *) str_hash_find (op_hash, mnemonic); + op_lookup (mnemonic); if (*l != END_OF_INSN && (!is_space_char (*l) || l[1] != END_OF_INSN) - && current_templates - && current_templates->start->opcode_modifier.isprefix) + && current_templates.start + && current_templates.start->opcode_modifier.isprefix) { - supported = cpu_flags_match (current_templates->start); + supported = cpu_flags_match (current_templates.start); if (!(supported & CPU_FLAGS_64BIT_MATCH)) { as_bad ((flag_code != CODE_64BIT ? _("`%s' is only supported in 64-bit mode") : _("`%s' is not supported in 64-bit mode")), - insn_name (current_templates->start)); + insn_name (current_templates.start)); return NULL; } if (supported != CPU_FLAGS_PERFECT_MATCH) { as_bad (_("`%s' is not supported on `%s%s'"), - insn_name (current_templates->start), + insn_name (current_templates.start), cpu_arch_name ? cpu_arch_name : default_arch, cpu_sub_arch_name ? cpu_sub_arch_name : ""); return NULL; } /* If we are in 16-bit mode, do not allow addr16 or data16. Similarly, in 32-bit mode, do not allow addr32 or data32. */ - if ((current_templates->start->opcode_modifier.size == SIZE16 - || current_templates->start->opcode_modifier.size == SIZE32) + if ((current_templates.start->opcode_modifier.size == SIZE16 + || current_templates.start->opcode_modifier.size == SIZE32) && flag_code != CODE_64BIT - && ((current_templates->start->opcode_modifier.size == SIZE32) + && ((current_templates.start->opcode_modifier.size == SIZE32) ^ (flag_code == CODE_16BIT))) { as_bad (_("redundant %s prefix"), - insn_name (current_templates->start)); + insn_name (current_templates.start)); return NULL; } - if (current_templates->start->base_opcode == PSEUDO_PREFIX) + if (current_templates.start->base_opcode == PSEUDO_PREFIX) { /* Handle pseudo prefixes. */ - switch (current_templates->start->extension_opcode) + switch (current_templates.start->extension_opcode) { case Prefix_Disp8: /* {disp8} */ @@ -5860,21 +5870,21 @@ parse_insn (const char *line, char *mnem else { /* Add prefix, checking for repeated prefixes. */ - switch (add_prefix (current_templates->start->base_opcode)) + switch (add_prefix (current_templates.start->base_opcode)) { case PREFIX_EXIST: return NULL; case PREFIX_DS: - if (is_cpu (current_templates->start, CpuIBT)) - i.notrack_prefix = insn_name (current_templates->start); + if (is_cpu (current_templates.start, CpuIBT)) + i.notrack_prefix = insn_name (current_templates.start); break; case PREFIX_REP: - if (is_cpu (current_templates->start, CpuHLE)) - i.hle_prefix = insn_name (current_templates->start); - else if (is_cpu (current_templates->start, CpuMPX)) - i.bnd_prefix = insn_name (current_templates->start); + if (is_cpu (current_templates.start, CpuHLE)) + i.hle_prefix = insn_name (current_templates.start); + else if (is_cpu (current_templates.start, CpuMPX)) + i.bnd_prefix = insn_name (current_templates.start); else - i.rep_prefix = insn_name (current_templates->start); + i.rep_prefix = insn_name (current_templates.start); break; default: break; @@ -5890,7 +5900,7 @@ parse_insn (const char *line, char *mnem if (prefix_only) return token_start; - if (!current_templates) + if (!current_templates.start) { /* Deprecated functionality (new code should use pseudo-prefixes instead): Check if we should swap operand or force 32bit displacement in @@ -5926,12 +5936,12 @@ parse_insn (const char *line, char *mnem goto check_suffix; mnem_p = dot_p; *dot_p = '\0'; - current_templates = (const templates *) str_hash_find (op_hash, mnemonic); + op_lookup (mnemonic); } - if (!current_templates || !pass1) + if (!current_templates.start || !pass1) { - current_templates = NULL; + current_templates.start = NULL; check_suffix: if (mnem_p > mnemonic) @@ -5948,8 +5958,7 @@ parse_insn (const char *line, char *mnem case QWORD_MNEM_SUFFIX: i.suffix = mnem_p[-1]; mnem_p[-1] = '\0'; - current_templates - = (const templates *) str_hash_find (op_hash, mnemonic); + op_lookup (mnemonic); break; case SHORT_MNEM_SUFFIX: case LONG_MNEM_SUFFIX: @@ -5957,8 +5966,7 @@ parse_insn (const char *line, char *mnem { i.suffix = mnem_p[-1]; mnem_p[-1] = '\0'; - current_templates - = (const templates *) str_hash_find (op_hash, mnemonic); + op_lookup (mnemonic); } break; @@ -5971,8 +5979,7 @@ parse_insn (const char *line, char *mnem else i.suffix = LONG_MNEM_SUFFIX; mnem_p[-1] = '\0'; - current_templates - = (const templates *) str_hash_find (op_hash, mnemonic); + op_lookup (mnemonic); } /* For compatibility reasons accept MOVSD and CMPSD without operands even in AT&T mode. */ @@ -5980,12 +5987,11 @@ parse_insn (const char *line, char *mnem || (is_space_char (*l) && l[1] == END_OF_INSN)) { mnem_p[-1] = '\0'; - current_templates - = (const templates *) str_hash_find (op_hash, mnemonic); - if (current_templates != NULL + op_lookup (mnemonic); + if (current_templates.start != NULL /* MOVS or CMPS */ - && (current_templates->start->base_opcode | 2) == 0xa6 - && current_templates->start->opcode_space + && (current_templates.start->base_opcode | 2) == 0xa6 + && current_templates.start->opcode_space == SPACE_BASE && mnem_p[-2] == 's') { @@ -5995,7 +6001,7 @@ parse_insn (const char *line, char *mnem } else { - current_templates = NULL; + current_templates.start = NULL; mnem_p[-1] = 'd'; } } @@ -6003,7 +6009,7 @@ parse_insn (const char *line, char *mnem } } - if (!current_templates) + if (!current_templates.start) { if (pass1) as_bad (_("no such instruction: `%s'"), token_start); @@ -6011,8 +6017,8 @@ parse_insn (const char *line, char *mnem } } - if (current_templates->start->opcode_modifier.jump == JUMP - || current_templates->start->opcode_modifier.jump == JUMP_BYTE) + if (current_templates.start->opcode_modifier.jump == JUMP + || current_templates.start->opcode_modifier.jump == JUMP_BYTE) { /* Check for a branch hint. We allow ",pt" and ",pn" for predict taken and predict not taken respectively. @@ -6046,7 +6052,7 @@ parse_insn (const char *line, char *mnem /* Check if instruction is supported on specified architecture. */ supported = 0; - for (t = current_templates->start; t < current_templates->end; ++t) + for (t = current_templates.start; t < current_templates.end; ++t) { supported |= cpu_flags_match (t); @@ -6313,7 +6319,7 @@ optimize_imm (void) /* A more generic (but also more involved) way of dealing with the special case(s) would be to go look for DefaultSize attributes on any of the templates. */ - && current_templates->start->mnem_off != MN_push)) + && current_templates.start->mnem_off != MN_push)) guess_suffix = LONG_MNEM_SUFFIX; for (op = i.operands; --op >= 0;) @@ -6387,7 +6393,7 @@ optimize_imm (void) than those matching the insn suffix. */ { i386_operand_type mask, allowed; - const insn_template *t = current_templates->start; + const insn_template *t = current_templates.start; operand_type_set (&mask, 0); switch (guess_suffix) @@ -6410,7 +6416,7 @@ optimize_imm (void) } allowed = operand_type_and (t->operand_types[op], mask); - while (++t < current_templates->end) + while (++t < current_templates.end) { allowed = operand_type_or (allowed, t->operand_types[op]); allowed = operand_type_and (allowed, mask); @@ -7034,7 +7040,7 @@ match_template (char mnem_suffix) found_reverse_match = 0; addr_prefix_disp = -1; - for (t = current_templates->start; t < current_templates->end; t++) + for (t = current_templates.start; t < current_templates.end; t++) { addr_prefix_disp = -1; found_reverse_match = 0; @@ -7483,11 +7489,11 @@ match_template (char mnem_suffix) Vxy / Exy constructs: There are 3 suffix-less EVEX forms, the latter two of which may fall back to their two corresponding VEX forms. */ j = t->mnem_off != MN_vcvtneps2bf16 ? 1 : 2; - if ((t == current_templates->start || j > 1) + if ((t == current_templates.start || j > 1) && t->opcode_modifier.disp8memshift && !t->opcode_modifier.vex && !need_evex_encoding () - && t + j < current_templates->end + && t + j < current_templates.end && t[j].opcode_modifier.vex) { i386_cpu_flags cpu; @@ -7515,7 +7521,7 @@ match_template (char mnem_suffix) #undef progress - if (t == current_templates->end) + if (t == current_templates.end) { /* We found no match. */ i.error = specific_error; @@ -10942,7 +10948,6 @@ s_insn (int dummy ATTRIBUTE_UNUSED) unsigned int j; valueT val; bool vex = false, xop = false, evex = false; - static const templates tt = { &i.tm, &i.tm + 1 }; init_globals (); @@ -10960,7 +10965,8 @@ s_insn (int dummy ATTRIBUTE_UNUSED) } line += end - line; - current_templates = &tt; + current_templates.start = &i.tm; + current_templates.end = &i.tm + 1; i.tm.mnem_off = MN__insn; i.tm.extension_opcode = None; @@ -12177,8 +12183,8 @@ i386_displacement (char *disp_start, cha operand_type_set (&bigdisp, 0); if (i.jumpabsolute || i.types[this_operand].bitfield.baseindex - || (current_templates->start->opcode_modifier.jump != JUMP - && current_templates->start->opcode_modifier.jump != JUMP_DWORD)) + || (current_templates.start->opcode_modifier.jump != JUMP + && current_templates.start->opcode_modifier.jump != JUMP_DWORD)) { i386_addressing_mode (); override = (i.prefix[ADDR_PREFIX] != 0); @@ -12199,24 +12205,18 @@ i386_displacement (char *disp_start, cha dependent upon data size, but is never dependent upon address size. Also make sure to not unintentionally match against a non-PC-relative branch template. */ - static templates aux_templates; - const insn_template *t = current_templates->start; + const insn_template *t = current_templates.start; bool has_intel64 = false; - aux_templates.start = t; - while (++t < current_templates->end) + while (++t < current_templates.end) { if (t->opcode_modifier.jump - != current_templates->start->opcode_modifier.jump) + != current_templates.start->opcode_modifier.jump) break; if ((t->opcode_modifier.isa64 >= INTEL64)) has_intel64 = true; } - if (t < current_templates->end) - { - aux_templates.end = t; - current_templates = &aux_templates; - } + current_templates.end = t; override = (i.prefix[DATA_PREFIX] != 0); if (flag_code == CODE_64BIT) @@ -12389,7 +12389,7 @@ i386_finalize_displacement (segT exp_seg } #endif - else if (current_templates->start->opcode_modifier.jump == JUMP_BYTE) + else if (current_templates.start->opcode_modifier.jump == JUMP_BYTE) i.types[this_operand].bitfield.disp8 = 1; /* Check if this is a displacement only operand. */ @@ -12413,7 +12413,7 @@ i386_addressing_mode (void) if (i.prefix[ADDR_PREFIX]) addr_mode = flag_code == CODE_32BIT ? CODE_16BIT : CODE_32BIT; else if (flag_code == CODE_16BIT - && is_cpu (current_templates->start, CpuMPX) + && is_cpu (current_templates.start, CpuMPX) /* Avoid replacing the "16-bit addressing not allowed" diagnostic from md_assemble() by "is not a valid base/index expression" when there is a base and/or index. */ @@ -12486,7 +12486,7 @@ i386_index_check (const char *operand_st { const char *kind = "base/index"; enum flag_code addr_mode = i386_addressing_mode (); - const insn_template *t = current_templates->end - 1; + const insn_template *t = current_templates.end - 1; if (t->opcode_modifier.isstring) { @@ -12553,7 +12553,7 @@ i386_index_check (const char *operand_st } else { - t = current_templates->start; + t = current_templates.start; if (addr_mode != CODE_16BIT) { @@ -12678,7 +12678,7 @@ i386_att_operand (char *operand_string) /* We check for an absolute prefix (differentiating, for example, 'jmp pc_relative_label' from 'jmp *absolute_label'. */ if (*op_string == ABSOLUTE_PREFIX - && current_templates->start->opcode_modifier.jump) + && current_templates.start->opcode_modifier.jump) { ++op_string; if (is_space_char (*op_string)) @@ -12710,7 +12710,7 @@ i386_att_operand (char *operand_string) /* Handle case of %es:*foo. */ if (!i.jumpabsolute && *op_string == ABSOLUTE_PREFIX - && current_templates->start->opcode_modifier.jump) + && current_templates.start->opcode_modifier.jump) { ++op_string; if (is_space_char (*op_string)) @@ -12767,7 +12767,7 @@ i386_att_operand (char *operand_string) if (i.rounding.type == RC_NamesTable[j].type) break; as_bad (_("`%s': misplaced `{%s}'"), - insn_name (current_templates->start), RC_NamesTable[j].name); + insn_name (current_templates.start), RC_NamesTable[j].name); return 0; } } @@ -12789,7 +12789,7 @@ i386_att_operand (char *operand_string) if (i.rounding.type != rc_none) { as_bad (_("`%s': RC/SAE operand must follow immediate operands"), - insn_name (current_templates->start)); + insn_name (current_templates.start)); return 0; } } @@ -12802,7 +12802,7 @@ i386_att_operand (char *operand_string) && i.op[0].regs->reg_type.bitfield.class != Reg)) { as_bad (_("`%s': misplaced `%s'"), - insn_name (current_templates->start), operand_string); + insn_name (current_templates.start), operand_string); return 0; } } --- a/gas/config/tc-i386-intel.c +++ b/gas/config/tc-i386-intel.c @@ -345,7 +345,7 @@ i386_intel_simplify_register (expression intel_state.base = i386_regtab + reg_num; else if (!intel_state.index) { - const insn_template *t = current_templates->start; + const insn_template *t = current_templates.start; if (intel_state.in_scale || i386_regtab[reg_num].reg_type.bitfield.baseindex @@ -614,7 +614,7 @@ i386_intel_operand (char *operand_string if (i.imm_operands) { as_bad (_("`%s': RC/SAE operand must precede immediate operands"), - insn_name (current_templates->start)); + insn_name (current_templates.start)); return 0; } @@ -687,7 +687,7 @@ i386_intel_operand (char *operand_string return 0; if (intel_state.op_modifier != O_absent - && current_templates->start->mnem_off != MN_lea) + && current_templates.start->mnem_off != MN_lea) { i.types[this_operand].bitfield.unspecified = 0; @@ -702,22 +702,22 @@ i386_intel_operand (char *operand_string i.types[this_operand].bitfield.word = 1; if (got_a_float == 2) /* "fi..." */ suffix = SHORT_MNEM_SUFFIX; - else if (current_templates->start->mnem_off != MN_lar - && current_templates->start->mnem_off != MN_lsl - && current_templates->start->mnem_off != MN_arpl) + else if (current_templates.start->mnem_off != MN_lar + && current_templates.start->mnem_off != MN_lsl + && current_templates.start->mnem_off != MN_arpl) suffix = WORD_MNEM_SUFFIX; break; case O_dword_ptr: i.types[this_operand].bitfield.dword = 1; - if ((insn_name (current_templates->start)[0] == 'l' - && insn_name (current_templates->start)[2] == 's' - && insn_name (current_templates->start)[3] == 0) - || current_templates->start->mnem_off == MN_bound) + if ((insn_name (current_templates.start)[0] == 'l' + && insn_name (current_templates.start)[2] == 's' + && insn_name (current_templates.start)[3] == 0) + || current_templates.start->mnem_off == MN_bound) suffix = WORD_MNEM_SUFFIX; else if (flag_code != CODE_32BIT - && (current_templates->start->opcode_modifier.jump == JUMP - || current_templates->start->opcode_modifier.jump + && (current_templates.start->opcode_modifier.jump == JUMP + || current_templates.start->opcode_modifier.jump == JUMP_DWORD)) { i.far_branch = true; @@ -731,11 +731,11 @@ i386_intel_operand (char *operand_string case O_fword_ptr: i.types[this_operand].bitfield.fword = 1; - if (current_templates->start->mnem_off == MN_les - || current_templates->start->mnem_off == MN_lds - || current_templates->start->mnem_off == MN_lss - || current_templates->start->mnem_off == MN_lfs - || current_templates->start->mnem_off == MN_lgs) + if (current_templates.start->mnem_off == MN_les + || current_templates.start->mnem_off == MN_lds + || current_templates.start->mnem_off == MN_lss + || current_templates.start->mnem_off == MN_lfs + || current_templates.start->mnem_off == MN_lgs) suffix = LONG_MNEM_SUFFIX; else if (!got_a_float) { @@ -747,7 +747,7 @@ i386_intel_operand (char *operand_string case O_qword_ptr: /* O_mmword_ptr */ i.types[this_operand].bitfield.qword = 1; - if (current_templates->start->mnem_off == MN_bound + if (current_templates.start->mnem_off == MN_bound || got_a_float == 1) /* "f..." */ suffix = LONG_MNEM_SUFFIX; else @@ -759,10 +759,10 @@ i386_intel_operand (char *operand_string if (got_a_float) break; if (flag_code == CODE_64BIT - && (current_templates->start->operand_types[0].bitfield.fword - || current_templates->start->operand_types[0].bitfield.tbyte - || current_templates->start->opcode_modifier.jump == JUMP_DWORD - || current_templates->start->opcode_modifier.jump == JUMP)) + && (current_templates.start->operand_types[0].bitfield.fword + || current_templates.start->operand_types[0].bitfield.tbyte + || current_templates.start->opcode_modifier.jump == JUMP_DWORD + || current_templates.start->opcode_modifier.jump == JUMP)) suffix = QWORD_MNEM_SUFFIX; /* l[fgs]s, [ls][gi]dt, call, jmp */ else i.types[this_operand].bitfield.byte = 1; /* cause an error */ @@ -794,8 +794,8 @@ i386_intel_operand (char *operand_string i.far_branch = true; /* FALLTHROUGH */ case O_near_ptr: - if (current_templates->start->opcode_modifier.jump != JUMP - && current_templates->start->opcode_modifier.jump != JUMP_DWORD) + if (current_templates.start->opcode_modifier.jump != JUMP + && current_templates.start->opcode_modifier.jump != JUMP_DWORD) { /* cause an error */ i.types[this_operand].bitfield.byte = 1; @@ -814,11 +814,11 @@ i386_intel_operand (char *operand_string REX.W) is going to be derived from it. For this we check whether the given suffix is valid for any of the candidate templates. */ if (suffix && suffix != i.suffix - && current_templates->start->mnem_off != MN_bound) + && current_templates.start->mnem_off != MN_bound) { const insn_template *t; - for (t = current_templates->start; t < current_templates->end; ++t) + for (t = current_templates.start; t < current_templates.end; ++t) { /* Operands haven't been swapped yet. */ unsigned int op = t->operands - 1 - this_operand; @@ -879,7 +879,7 @@ i386_intel_operand (char *operand_string break; } - if (t == current_templates->end) + if (t == current_templates.end) suffix = 0; } @@ -893,9 +893,9 @@ i386_intel_operand (char *operand_string } /* Operands for jump/call need special consideration. */ - if (current_templates->start->opcode_modifier.jump == JUMP - || current_templates->start->opcode_modifier.jump == JUMP_DWORD - || current_templates->start->opcode_modifier.jump == JUMP_INTERSEGMENT) + if (current_templates.start->opcode_modifier.jump == JUMP + || current_templates.start->opcode_modifier.jump == JUMP_DWORD + || current_templates.start->opcode_modifier.jump == JUMP_INTERSEGMENT) { bool jumpabsolute = false; @@ -1005,7 +1005,7 @@ i386_intel_operand (char *operand_string if (i.rounding.type == RC_NamesTable[j].type) break; as_bad (_("`%s': misplaced `{%s}'"), - insn_name (current_templates->start), RC_NamesTable[j].name); + insn_name (current_templates.start), RC_NamesTable[j].name); return 0; } } @@ -1031,9 +1031,9 @@ i386_intel_operand (char *operand_string ljmp 0x9090,0x90909090 */ - if ((current_templates->start->opcode_modifier.jump == JUMP_INTERSEGMENT - || current_templates->start->opcode_modifier.jump == JUMP_DWORD - || current_templates->start->opcode_modifier.jump == JUMP) + if ((current_templates.start->opcode_modifier.jump == JUMP_INTERSEGMENT + || current_templates.start->opcode_modifier.jump == JUMP_DWORD + || current_templates.start->opcode_modifier.jump == JUMP) && this_operand == 1 && intel_state.seg == NULL && i.mem_operands == 1 --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -1883,23 +1883,26 @@ process_i386_opcodes (FILE *table) /* Generate opcode sets array. */ fprintf (table, "\n/* i386 opcode sets table. */\n\n"); - fprintf (table, "static const insn_template *const i386_op_sets[] =\n{\n"); - fprintf (table, " i386_optab,\n"); + fprintf (table, "typedef unsigned short i386_op_off_t;\n"); + fprintf (table, "static const i386_op_off_t i386_op_sets[] =\n{\n "); for (nr = j = 0; j < i; j++) { struct opcode_entry *next = &opcode_array[j]->entry; + if ((j + 1) % 8 != 0) + fprintf (table, "%5u,", nr); + else + fprintf (table, "%5u,\n ", nr); do { ++nr; next = next->next; } while (next); - fprintf (table, " i386_optab + %u,\n", nr); } - fprintf (table, "};\n"); + fprintf (table, "%5u\n};\n", nr); /* Emit mnemonics and associated #define-s. */ qsort (opcode_array, i, sizeof (*opcode_array), mnemonic_cmp);