From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2058.outbound.protection.outlook.com [40.107.22.58]) by sourceware.org (Postfix) with ESMTPS id 2BA86385E45D for ; Fri, 25 Aug 2023 12:47:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BA86385E45D 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-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gRGTu7TklMuweVjU9t45LR0m+lALCUomwKqZ7Q6CA8hpKnIfPoPvf+rzdgst9vf/8W/WsKPDlMC7cUwh5FRWIYhyr1vShJPnxIIHgYcLMQMmfFSYY2QDw+0nL70g9WoLrqPt40aHn3CNl0pKsfrISp18SBtinAyv3BnKMTkraJkre+w74J/q1n1NyB5kLaHD3gpL10MKS7Ha/6jOAELjSIX6E0uLMZeWfQfXzXpO8ut9YjEi5EiRDgRbz/qEYDvybDLVKBzmovhP9x3eVaZ8rGUwESYlSa8mr5X7US6P/5hWUHhQDC/3OJxyRzyMCCRVrYRbXWIHa0EctgHeRJZs/w== 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=ltKI9EjtiPqxFoFjR7lMYwFdUtqDc4+42KcAkefVHhs=; b=mMleiXdzJyojayeI3c/YrqktzaLMPQ1jCSkYvMF2IF7VE7hdCFjUKSQq2Upb1xxwMgXQy3OwVTVPJo/jVCbsVj6Qa1m++3vTN2kZu/kLyhzkD/0bEkUGuCe0vhhMCXJKAbiWzDv+fmmnqB5QqhnF3kqBhIgzSBDR9UNaBnkswG5wszWPkI06bc3qSuHF/RXfoIioRUPauExX9iwStY5+foOZjLhVKNtmgUb9VLfd8b6TUrfcVnQtXuFBaSbyw3zmCtoZqpcV3ZHIAniMQqaAtL9ezbrphl1rvZFGq+QveakXu1c+g8sUo5kbGJi4fbn2w2nFukkatCT9KJIMEL9CXQ== 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=ltKI9EjtiPqxFoFjR7lMYwFdUtqDc4+42KcAkefVHhs=; b=EE2g8aDZYmkqfgceBChxHj71BAIWx6dEH1t/N7+U+O+8OH/3Ct3o9eibH6DKcABYtDLrTeOfaQxFODUitj9dRVedT7GrBpx/I47u2BaquifpwapFjeX69de3YI4sARAUDJoxH3CJUU0VZ6D1wFVPsC8VA+N+b4q5yRjEw8n0ZeOhrFBxn+S2CDzgaBhTOvvlzjYQPiFw7Rbg1hP2PXuLVRL7YWLeTj1flLrOY7qBoIs6OnonPi+nvb/xyTb1HyNRm8sbFz61oYkfdN91N76oPgTKPpz6ag0NCgZmoksdnlGQBvmYscEkJ5UGzAKEKWkm0K94HwCOdVcaolDs096ePQ== 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 AS5PR04MB10018.eurprd04.prod.outlook.com (2603:10a6:20b:67e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.29; Fri, 25 Aug 2023 12:47:07 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::f749:b27f:2187:6654]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::f749:b27f:2187:6654%5]) with mapi id 15.20.6699.027; Fri, 25 Aug 2023 12:47:07 +0000 Message-ID: <999dae6f-d93f-7e4c-37e3-2c61da65f47e@suse.com> Date: Fri, 25 Aug 2023 14:47:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: [PATCH 4/5] x86: unindent most of set_cpu_arch() Content-Language: en-US To: Binutils Cc: "H.J. Lu" , "Jiang, Haochen" References: <6f819651-36c0-1c69-8224-fe21f0f96a3f@suse.com> From: Jan Beulich In-Reply-To: <6f819651-36c0-1c69-8224-fe21f0f96a3f@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0100.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::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_|AS5PR04MB10018:EE_ X-MS-Office365-Filtering-Correlation-Id: 011fa244-0f13-419e-1971-08dba56963e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0MVnE0XuF+tKQSFllzrhMOCIc8Wnkc1gsV1cYDaBe6x6KpLqBxsBpGTMupZ+LdOmVRz/xOjs/Yxf6ebTxg1BzLOtEFYj11YO1/paz2C71E+M1sAnSKlHwy1x1lRywID5Zcuvo6AdUmgvN6jhchS6kmJcriTzA8vYq1tFnaqIAr3q9Tg+Vf0GtIJzHJKLgPBBRIsNAk+5BIMY1ByKeIWfDxH7C+zECes/6+HAp5ffkY0k0/4ghsHY1jSFIIR1KSJ4oFpX3awQwy2BrIoYTlMZYuyVBe5oEYMunjzgBAKMGssLWrMTFwhuYm8ivK4plWlariS2/zlspSc+2OrR9YCuBSwt5bfflFl3TpX21LbVH4It/5g362CiwRxGz+x5hC0k4S0fhDHUpp1Fs/d5YSaj6T3+qte2+N4ufiwrLDiCp4mjRanof5rRdaKWqTB0/0gHZ0lR8XFv+MqiIi4w+Z4dW9L45la+EuxyQfPG/sbE00Az609s8Uo3VR8u6R2uRWNapdQuHF7X2xspJca7T+BFIbozqWAwnbWjRO4wqyMbN0h1mgq9DzEH7lPx6Tv7uRioSc3UP970Jb3uNUBx+PKZDhtNm4dZeLa5SATc8Ka04IW0Re1Tm+Da7FQCMvWpmPkYzWZF9CYXcHjXS0hwQhFOEA== 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)(366004)(346002)(136003)(376002)(39860400002)(1800799009)(451199024)(186009)(83380400001)(6512007)(478600001)(26005)(2616005)(5660300002)(31686004)(2906002)(8676002)(8936002)(4326008)(38100700002)(66556008)(66946007)(66476007)(6916009)(86362001)(41300700001)(54906003)(31696002)(6486002)(36756003)(6666004)(316002)(6506007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MEVzRlVja1JtZERhcTBXbXZ5VDUrNTc5VDNEa1lZQlpIV0dYcDhtdkpXUndz?= =?utf-8?B?V1F2dVFJYWlWWGR4dUdURUk4RW1IOUt0aXp2UnlCOHZoMHFQVEs1K0c4UG41?= =?utf-8?B?QW1Td1d0QWI1ZVpQOUlTb0JtZ2ZGWDB1MEtYcXNwdFY4OXNaVnVCL1BSSGRm?= =?utf-8?B?T1ovaHVHbWFrUXFmNW9vSWZQWFV2blJDaTlWaEtYeDVDWnBWZnhtSUxtRVRs?= =?utf-8?B?dEJNSThxcmo5bEhudGdYREZRMjJuTlAxdWlKbEptV2lpL2orWHdvN25qNFJw?= =?utf-8?B?RGh3eXJU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FGQ2xvbVo2ZEFBTjNzcnZxSTdl?= =?utf-8?Q?4RawV6Gv2ZCYVJV1NLG9A0K75?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 011fa244-0f13-419e-1971-08dba56963e0 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2023 12:47:07.0198 (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: oe2D63vu5TVfcWiFHkm1CDRHY7Ao28cb7sT5CpDS4OlFIhMLVGQS2Gtfzng/wV8+/JMGxbB8CS5Zw6ulCFdQow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS5PR04MB10018 X-Spam-Status: No, score=-3027.0 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 List-Id: Inverting the initial if()'s condition allows to move out the bulk of the function by a level, improving readability at least a bit. While doing that also pull the push/pop handling up first, such that "else if" after "return" isn't needed anymore; the order in which special cases are checked doesn't really matter. --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2794,29 +2794,134 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED bool no_cond_jump_promotion; } arch_stack_entry; static const arch_stack_entry *arch_stack_top; + char *s; + int e; + const char *string; + unsigned int j = 0; + i386_cpu_flags flags; SKIP_WHITESPACE (); - if (!is_end_of_line[(unsigned char) *input_line_pointer]) + if (is_end_of_line[(unsigned char) *input_line_pointer]) { - char *s; - int e = get_symbol_name (&s); - const char *string = s; - unsigned int j = 0; - i386_cpu_flags flags; + as_bad (_("missing cpu architecture")); + input_line_pointer++; + return; + } + + e = get_symbol_name (&s); + string = s; + + if (strcmp (string, "push") == 0) + { + arch_stack_entry *top = XNEW (arch_stack_entry); + + top->name = cpu_arch_name; + if (cpu_sub_arch_name) + top->sub_name = xstrdup (cpu_sub_arch_name); + else + top->sub_name = NULL; + top->flags = cpu_arch_flags; + top->isa = cpu_arch_isa; + top->isa_flags = cpu_arch_isa_flags; + top->flag_code = flag_code; + top->stackop_size = stackop_size; + top->no_cond_jump_promotion = no_cond_jump_promotion; + + top->prev = arch_stack_top; + arch_stack_top = top; + + (void) restore_line_pointer (e); + demand_empty_rest_of_line (); + return; + } + + if (strcmp (string, "pop") == 0) + { + const arch_stack_entry *top = arch_stack_top; + + if (!top) + as_bad (_(".arch stack is empty")); + else if (top->flag_code != flag_code + || top->stackop_size != stackop_size) + { + static const unsigned int bits[] = { + [CODE_16BIT] = 16, + [CODE_32BIT] = 32, + [CODE_64BIT] = 64, + }; + + as_bad (_("this `.arch pop' requires `.code%u%s' to be in effect"), + bits[top->flag_code], + top->stackop_size == LONG_MNEM_SUFFIX ? "gcc" : ""); + } + else + { + arch_stack_top = top->prev; + + cpu_arch_name = top->name; + free (cpu_sub_arch_name); + cpu_sub_arch_name = top->sub_name; + cpu_arch_flags = top->flags; + cpu_arch_isa = top->isa; + cpu_arch_isa_flags = top->isa_flags; + no_cond_jump_promotion = top->no_cond_jump_promotion; + + XDELETE (top); + } + + (void) restore_line_pointer (e); + demand_empty_rest_of_line (); + return; + } - if (strcmp (string, "default") == 0) + if (strcmp (string, "default") == 0) + { + if (strcmp (default_arch, "iamcu") == 0) + string = default_arch; + else { - if (strcmp (default_arch, "iamcu") == 0) - string = default_arch; + static const i386_cpu_flags cpu_unknown_flags = CPU_UNKNOWN_FLAGS; + + cpu_arch_name = NULL; + free (cpu_sub_arch_name); + cpu_sub_arch_name = NULL; + cpu_arch_flags = cpu_unknown_flags; + if (flag_code == CODE_64BIT) + { + cpu_arch_flags.bitfield.cpu64 = 1; + cpu_arch_flags.bitfield.cpuno64 = 0; + } else { - static const i386_cpu_flags cpu_unknown_flags = CPU_UNKNOWN_FLAGS; + cpu_arch_flags.bitfield.cpu64 = 0; + cpu_arch_flags.bitfield.cpuno64 = 1; + } + 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_name = NULL; + j = ARRAY_SIZE (cpu_arch) + 1; + } + } + + for (; j < ARRAY_SIZE (cpu_arch); j++) + { + if (strcmp (string + (*string == '.'), cpu_arch[j].name) == 0 + && (*string == '.') == (cpu_arch[j].type == PROCESSOR_NONE)) + { + if (*string != '.') + { + check_cpu_arch_compatible (string, cpu_arch[j].enable); + + cpu_arch_name = cpu_arch[j].name; free (cpu_sub_arch_name); cpu_sub_arch_name = NULL; - cpu_arch_flags = cpu_unknown_flags; + cpu_arch_flags = cpu_arch[j].enable; if (flag_code == CODE_64BIT) { cpu_arch_flags.bitfield.cpu64 = 1; @@ -2827,173 +2932,71 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED cpu_arch_flags.bitfield.cpu64 = 0; cpu_arch_flags.bitfield.cpuno64 = 1; } - cpu_arch_isa = PROCESSOR_UNKNOWN; - cpu_arch_isa_flags = cpu_arch[flag_code == CODE_64BIT].enable; + 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; } - - j = ARRAY_SIZE (cpu_arch) + 1; + pre_386_16bit_warned = false; + break; } - } - else if (strcmp (string, "push") == 0) - { - arch_stack_entry *top = XNEW (arch_stack_entry); - top->name = cpu_arch_name; - if (cpu_sub_arch_name) - top->sub_name = xstrdup (cpu_sub_arch_name); - else - top->sub_name = NULL; - top->flags = cpu_arch_flags; - top->isa = cpu_arch_isa; - top->isa_flags = cpu_arch_isa_flags; - top->flag_code = flag_code; - top->stackop_size = stackop_size; - top->no_cond_jump_promotion = no_cond_jump_promotion; + if (cpu_flags_all_zero (&cpu_arch[j].enable)) + continue; - top->prev = arch_stack_top; - arch_stack_top = top; + flags = cpu_flags_or (cpu_arch_flags, cpu_arch[j].enable); - (void) restore_line_pointer (e); - demand_empty_rest_of_line (); - return; - } - else if (strcmp (string, "pop") == 0) - { - const arch_stack_entry *top = arch_stack_top; - - if (!top) - as_bad (_(".arch stack is empty")); - else if (top->flag_code != flag_code - || top->stackop_size != stackop_size) + if (!cpu_flags_equal (&flags, &cpu_arch_flags)) { - static const unsigned int bits[] = { - [CODE_16BIT] = 16, - [CODE_32BIT] = 32, - [CODE_64BIT] = 64, - }; - - as_bad (_("this `.arch pop' requires `.code%u%s' to be in effect"), - bits[top->flag_code], - top->stackop_size == LONG_MNEM_SUFFIX ? "gcc" : ""); + extend_cpu_sub_arch_name (string + 1); + cpu_arch_flags = flags; + cpu_arch_isa_flags = flags; } else - { - arch_stack_top = top->prev; - - cpu_arch_name = top->name; - free (cpu_sub_arch_name); - cpu_sub_arch_name = top->sub_name; - cpu_arch_flags = top->flags; - cpu_arch_isa = top->isa; - cpu_arch_isa_flags = top->isa_flags; - no_cond_jump_promotion = top->no_cond_jump_promotion; - - XDELETE (top); - } + cpu_arch_isa_flags + = cpu_flags_or (cpu_arch_isa_flags, cpu_arch[j].enable); (void) restore_line_pointer (e); demand_empty_rest_of_line (); return; } + } - for (; j < ARRAY_SIZE (cpu_arch); j++) - { - if (strcmp (string + (*string == '.'), cpu_arch[j].name) == 0 - && (*string == '.') == (cpu_arch[j].type == PROCESSOR_NONE)) - { - if (*string != '.') - { - check_cpu_arch_compatible (string, cpu_arch[j].enable); - - cpu_arch_name = cpu_arch[j].name; - free (cpu_sub_arch_name); - cpu_sub_arch_name = NULL; - cpu_arch_flags = cpu_arch[j].enable; - if (flag_code == CODE_64BIT) - { - cpu_arch_flags.bitfield.cpu64 = 1; - cpu_arch_flags.bitfield.cpuno64 = 0; - } - else - { - cpu_arch_flags.bitfield.cpu64 = 0; - cpu_arch_flags.bitfield.cpuno64 = 1; - } - 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; - } - pre_386_16bit_warned = false; - break; - } - - if (cpu_flags_all_zero (&cpu_arch[j].enable)) - continue; - - flags = cpu_flags_or (cpu_arch_flags, - cpu_arch[j].enable); - - if (!cpu_flags_equal (&flags, &cpu_arch_flags)) - { - extend_cpu_sub_arch_name (string + 1); - cpu_arch_flags = flags; - cpu_arch_isa_flags = flags; - } - else - cpu_arch_isa_flags - = cpu_flags_or (cpu_arch_isa_flags, - cpu_arch[j].enable); - (void) restore_line_pointer (e); - demand_empty_rest_of_line (); - return; - } - } - - if (startswith (string, ".no") && j >= ARRAY_SIZE (cpu_arch)) - { - /* Disable an ISA extension. */ - for (j = 0; j < ARRAY_SIZE (cpu_arch); j++) - if (cpu_arch[j].type == PROCESSOR_NONE - && strcmp (string + 3, cpu_arch[j].name) == 0) + if (startswith (string, ".no") && j >= ARRAY_SIZE (cpu_arch)) + { + /* Disable an ISA extension. */ + for (j = 0; j < ARRAY_SIZE (cpu_arch); j++) + if (cpu_arch[j].type == PROCESSOR_NONE + && strcmp (string + 3, cpu_arch[j].name) == 0) + { + flags = cpu_flags_and_not (cpu_arch_flags, cpu_arch[j].disable); + if (!cpu_flags_equal (&flags, &cpu_arch_flags)) { - flags = cpu_flags_and_not (cpu_arch_flags, - cpu_arch[j].disable); - if (!cpu_flags_equal (&flags, &cpu_arch_flags)) - { - extend_cpu_sub_arch_name (string + 1); - cpu_arch_flags = flags; - cpu_arch_isa_flags = flags; - } - (void) restore_line_pointer (e); - demand_empty_rest_of_line (); - return; + extend_cpu_sub_arch_name (string + 1); + cpu_arch_flags = flags; + cpu_arch_isa_flags = flags; } - } - if (j == ARRAY_SIZE (cpu_arch)) - as_bad (_("no such architecture: `%s'"), string); - - *input_line_pointer = e; + (void) restore_line_pointer (e); + demand_empty_rest_of_line (); + return; + } } - else - as_bad (_("missing cpu architecture")); + + if (j == ARRAY_SIZE (cpu_arch)) + as_bad (_("no such architecture: `%s'"), string); + + *input_line_pointer = e; no_cond_jump_promotion = 0; if (*input_line_pointer == ',' && !is_end_of_line[(unsigned char) input_line_pointer[1]]) { - char *string; - char e; - ++input_line_pointer; - e = get_symbol_name (&string); + e = get_symbol_name (&s); + string = s; if (strcmp (string, "nojumps") == 0) no_cond_jump_promotion = 1;