From patchwork Fri Sep 15 08:59:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 140262 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp902550vqi; Fri, 15 Sep 2023 01:59:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYkY2DubneCmAwnSNK31gvSzVv4PTDNxFW3Baef8DiHpicDyoU7h/D4bnXbk/k73Q76HbJ X-Received: by 2002:a17:907:7847:b0:9a9:f136:3aa4 with SMTP id lb7-20020a170907784700b009a9f1363aa4mr821539ejc.38.1694768397108; Fri, 15 Sep 2023 01:59:57 -0700 (PDT) Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a6-20020a1709065f8600b0098e48ad11e8si2624055eju.902.2023.09.15.01.59.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 01:59:57 -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=Gdz3n8Ug; 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 DFAD43858288 for ; Fri, 15 Sep 2023 08:59:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFAD43858288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694768392; bh=6ysXwf95WRIwbjwRfsA9PxhzMqlzOcD0slkZ9BPkcVc=; 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=Gdz3n8UglCt0FFMoF8Jpz94SXLGQKfyT/hDAogmYd+latGCMXCLmVBkIHO5T54ybh 9yCcUWsWJRkelGPr3Ob0LaFMifxzPMrgLjMDrdQAkBqq9hIiZmW+ICkoweIDB5aBbV ksYaHzFPd1v4BrwUS7zTRQlorfwMQ2+JKijh1k/s= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2056.outbound.protection.outlook.com [40.107.22.56]) by sourceware.org (Postfix) with ESMTPS id 3EEE238582BC for ; Fri, 15 Sep 2023 08:59:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3EEE238582BC ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TJWcPnIMCcEpt+9Iw7cK5gX+t+9VdviGPv9A2huj737s7nCQOZvz94ERCYDbNjy7oOjcptOJSxiNpD+nfeh/X4ico+pF49hQ+8cbuUJOpOKUDWFRbbs1+8yvlAdzBTFpN916Gv2v3Ey3o/bV83WaGiy8ra1sKBK8bJNAnf7EJtPtRZzT9jEIa+jbdHxC+e9Sfz7k6u3LhGM8WPpHyPy/A6DIbpfKiKxM6fWgrI6lT5axuioayRredmayT0RECfghW/jni6pGnEhtKNZBQ3Z6vhEOzg8zID4tkTUfbYkSoI4p87/8D6mVCKHUaq1DzhUd52IZ52ahKL/jkndpW3pAbQ== 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=6ysXwf95WRIwbjwRfsA9PxhzMqlzOcD0slkZ9BPkcVc=; b=ePcfdn4i/o6FmWGh2JGT0cA9EY9E5xYhjF35hnNBPpmmV63aY/hnqa47FWsGNs22z/uSsdA5XjriHHxgvQ6THdwa0PsXmQB+wu7dzmGgoEpKxgCwghosqS99TcSU3u+hQp/qNaMbQKwa00aBSH/O6ZFzWXzwqQeePMeyaiFmqNi5dDGr05b8YXfEw5N0fMfSWRIOv7VpOuIQ/jPhQJwwv2RO+1IcFaciokfLOmgdNN7/TFec9mxbuY6Khajvm1Bgo/bfXju+2WTkxdZnDmo1duiKzZWVgdU4sgAyYm3okneyPIKklHnwYR5sDGcfnJZErqDLcqgb8rA10+yNx4qU7A== 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 DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by AS8PR04MB8530.eurprd04.prod.outlook.com (2603:10a6:20b:421::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.21; Fri, 15 Sep 2023 08:59:41 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::f749:b27f:2187:6654]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::f749:b27f:2187:6654%6]) with mapi id 15.20.6792.020; Fri, 15 Sep 2023 08:59:40 +0000 Message-ID: <635f1462-9704-efca-c034-f4bc39e706f2@suse.com> Date: Fri, 15 Sep 2023 10:59:39 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: [PATCH 2/3] x86: drop cpu_arch_tune_flags Content-Language: en-US To: Binutils Cc: "H.J. Lu" References: <8d21b532-7a4a-da25-3e95-d1aea76f75a3@suse.com> In-Reply-To: <8d21b532-7a4a-da25-3e95-d1aea76f75a3@suse.com> X-ClientProxiedBy: FR0P281CA0173.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b4::20) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|AS8PR04MB8530:EE_ X-MS-Office365-Filtering-Correlation-Id: 10814b3f-a0ec-4c9f-2433-08dbb5ca18d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kzhHERjCGY0/pTTNp3yKjVf0E4wqC+RcYgh5+P3tq4GW7VWembjDJN5mrHmolJ76+DC14XdYmNbKIskStAI2gf/VDYYX6gLxRsBHS3oe9G5lLVAzObDvLa124/O1+D1fy+qZL/8RPGhq3e+HRmsTYFNtnQ9sj+zcYClIGF0aCnSLsS+sEToGZAKqbB6zNqBjoM7P6Na1C0yycoe8OQvCXybkvqk/hGa8Pu0ShLb/djxh2guqgUGDJJUyA072mgwh+vKaJ6p+xKrlqsrhf1qA+ZwYU849oMdC7i3QrYyvgbm7/X0w+xb0v/EdCCU+cXzurp5JzL0hh/1zn01GawI1fQP/SSVwVc8Rznpk0Nj4o10ZJfcZI0GX+3yNcrqZhNMNCsc4qc2BYNELDs58GhLcUfeEFkGbMToyQ99MqllttjdsHXWTW3GJfMoAIJJoQtVUioANlhLMLHku8KWda7H7Hyg9mUjLqy8+EcQheA0fqcnUxaKMF5SD/FIahf4AgK4zS10pify5KRLRCq2CwfxCOk68eEKsDMS95Eb/pM+a7O9oQXtsZ8NPRBUO3YDVSj1gX6HvGEIZN6aIxlrdobVKBKbYCmjKPs2at9b4NnRyV/xphxLKIAUoCwUiF9FWLbCTGiR5Ykp8jK+4V9FB9nSLGA== 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)(396003)(136003)(376002)(366004)(346002)(39860400002)(451199024)(1800799009)(186009)(6506007)(6486002)(6512007)(2906002)(26005)(66556008)(5660300002)(38100700002)(36756003)(66476007)(66946007)(4326008)(6916009)(316002)(41300700001)(8936002)(8676002)(2616005)(478600001)(31686004)(86362001)(31696002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?3frbr+5+zCA8uHaeOEs2pcItEue/?= =?utf-8?q?l1VLIbeuQjUEiNbE5aIr7bZ6vY+IjP+f1iPLCQkZFl5X3OWoqoY214fb973wfNMyP?= =?utf-8?q?VjV6xVx//iyUqO6WnmEjXGcL7kIKk/igI4T86RANXCDy/Dq0Hf3DoqTx4YO7hSTHw?= =?utf-8?q?gbH5ov6js3cO7slwM1KA5lmFQ1FDrlE0NuK4aQ23WbMQ0u3hCKuB48lx/pGk19wsZ?= =?utf-8?q?3yrqgedWRUxXKBt7jNjQlAWbt43UGFwQLuTFy9eogIOcLq3Vsl9bYbCHMXx+cdRcy?= =?utf-8?q?SZox4srdY9tUTWThnUIWiv8vnks+T+r5HPxGlN7h9vKOxUOE51Pjnks2YMsiyqNmt?= =?utf-8?q?w1i5Vx+IJyJsVuvAJB+qPIuVtoNJOX0PEMmx9WPEtYmsfVmVTcrPUbmTXm7NWFqhl?= =?utf-8?q?goso/iL53/0ED6/m+zZzwCwmEHsR+HJEAIQkhufJimNMxZyIQo2RIH635UlfAF/VE?= =?utf-8?q?EW/o8xTKfEZomihFJ0AX4BSCH4MXEktlsklNLEG91QFFC7sQbKv+0vFgVCNL9fAk1?= =?utf-8?q?Ib8Pg3I+13p3KycL/kOq5LA8gIHjHLcs+kn6h6Q62J+nxlETodGWLqtr8+n56Cu3l?= =?utf-8?q?R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m1IQ81091khmzQscnFeK2QOQf80EVYahVCS/q6owKmm74y/8?= =?utf-8?q?n8JPHQskHrJq?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10814b3f-a0ec-4c9f-2433-08dbb5ca18d1 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2023 08:59:40.8235 (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: tLeGQS+iyla38rgdWStBsVaFLbzvy5ZTM9JFQ+B6dPJEI+9Nckyks3XSsp4bKIw6mXN8TZRWaIm2RKIe+QTV0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8530 X-Spam-Status: No, score=-3026.9 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.30 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: INBOX X-GMAIL-THRID: 1777093466686111393 X-GMAIL-MSGID: 1777093466686111393 Apparently from its introduction the variable was only ever written (the only read is merely to determine whether to write it with another value). (Since, due to the need to re-indent, the adjacent lines setting cpu_arch_tune need touching anyway, switch to using PREOCESSOR_* constants where applicable, to make more obvious what the resulting state is going to be.) --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -816,9 +816,6 @@ static int cpu_arch_tune_set = 0; /* Cpu we are generating instructions for. */ enum processor_type cpu_arch_tune = PROCESSOR_UNKNOWN; -/* CPU feature flags of cpu we are generating instructions for. */ -static i386_cpu_flags cpu_arch_tune_flags; - /* CPU instruction set architecture used. */ enum processor_type cpu_arch_isa = PROCESSOR_UNKNOWN; @@ -2955,10 +2952,7 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED cpu_arch_isa = PROCESSOR_UNKNOWN; cpu_arch_isa_flags = cpu_arch[flag_code == CODE_64BIT].enable; if (!cpu_arch_tune_set) - { - cpu_arch_tune = cpu_arch_isa; - cpu_arch_tune_flags = cpu_arch_isa_flags; - } + cpu_arch_tune = PROCESSOR_UNKNOWN; vector_size = VSZ_DEFAULT; @@ -3000,10 +2994,7 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED cpu_arch_isa = cpu_arch[j].type; cpu_arch_isa_flags = cpu_arch[j].enable; if (!cpu_arch_tune_set) - { - cpu_arch_tune = cpu_arch_isa; - cpu_arch_tune_flags = cpu_arch_isa_flags; - } + cpu_arch_tune = cpu_arch_isa; vector_size = VSZ_DEFAULT; @@ -14597,10 +14588,7 @@ md_parse_option (int c, const char *arg) cpu_arch_isa = cpu_arch[j].type; cpu_arch_isa_flags = cpu_arch[j].enable; if (!cpu_arch_tune_set) - { - cpu_arch_tune = cpu_arch_isa; - cpu_arch_tune_flags = cpu_arch_isa_flags; - } + cpu_arch_tune = cpu_arch_isa; vector_size = VSZ_DEFAULT; break; } @@ -14678,7 +14666,6 @@ md_parse_option (int c, const char *arg) { cpu_arch_tune_set = 1; cpu_arch_tune = cpu_arch [j].type; - cpu_arch_tune_flags = cpu_arch[j].enable; break; } } @@ -15284,10 +15271,7 @@ i386_target_format (void) cpu_arch_isa = PROCESSOR_IAMCU; cpu_arch_isa_flags = iamcu_flags; if (!cpu_arch_tune_set) - { - cpu_arch_tune = cpu_arch_isa; - cpu_arch_tune_flags = cpu_arch_isa_flags; - } + cpu_arch_tune = PROCESSOR_IAMCU; } else if (cpu_arch_isa != PROCESSOR_IAMCU) as_fatal (_("Intel MCU doesn't support `%s' architecture"), @@ -15298,8 +15282,6 @@ i386_target_format (void) if (cpu_flags_all_zero (&cpu_arch_isa_flags)) cpu_arch_isa_flags = cpu_arch[flag_code == CODE_64BIT].enable; - if (cpu_flags_all_zero (&cpu_arch_tune_flags)) - cpu_arch_tune_flags = cpu_arch[flag_code == CODE_64BIT].enable; switch (OUTPUT_FLAVOR) {