From patchwork Tue Sep 26 11:20:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 144823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp1834830vqu; Tue, 26 Sep 2023 04:21:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE9Iyv3AJtHbjBT4rR3AycP1Jub8X0G5or8/qhpF4qeVHqZJZ/Q5wsy2PTA42Ycjf1xqSs9 X-Received: by 2002:a17:906:ee8c:b0:99e:39d:4fa7 with SMTP id wt12-20020a170906ee8c00b0099e039d4fa7mr8376311ejb.22.1695727274611; Tue, 26 Sep 2023 04:21:14 -0700 (PDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id m26-20020a170906849a00b009ae52376573si10986364ejx.147.2023.09.26.04.21.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 04:21:14 -0700 (PDT) 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=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=sdDq1Baa; arc=fail (DNS record missing); 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 92D8A385CCA0 for ; Tue, 26 Sep 2023 11:21:12 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2090.outbound.protection.outlook.com [40.107.255.90]) by sourceware.org (Postfix) with ESMTPS id 200B83858D35 for ; Tue, 26 Sep 2023 11:21:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 200B83858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cipunited.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cipunited.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=REw9nF0YPkBIi4OT4kKJT8MiLqcl2coi7yIPn61dISqYiyRVHhOtj5mzLCEAHLY0CArnA5Tv3wAQKqzw6tYerAMe25fmqyhkP/4Nov/n85PoSAcbzHpE74oeF8HMmIRgSWrzuqGTnNp6DhApwF8wGYbHmXwSCVeCxZgSyb6ekS0wNSwm3/UNpSDa2ZTwJHFJjRIiSDjLw26CIoYlcQ0Cu5+Y0ERrIwpv80JdQ3c86DLIsaRAW7uq71aBGWogqdUFzuspN3xlTvrk/yvxhLsojqgNTyLTx3UCGrzpG7gdhHNYJ8j8Zodh7kbMtY3V5B4HwZ02URnybO2Ay79InAfNzg== 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=O5qVl0d3hEWU/LtEl7vuACyuT8xwF3zh1sGX9VcxGck=; b=ETgp7lC+LZgRhOyiaivdAhXRrzp8ACbIS0Wupwk3jEH8SmbJfCdooRYGE1SgqYqUlgb8aJLa8Ky0KULJcfJpajfTWyrpVdq9MkWhUb3FyCTkc2Mhu6oyze57gWO1og+PY33mBwVcQ3+oMy1wpmQyyKvskPgXj0weMwsvlHr2PxNwS/jxYVmoNe6YYgdd5bguvtpZzvOuGpxF8OH9NsXaSpHrj4cIurifveRb5LX/NJAioCr/liFa6KgZ4ogG0ejKUG3tRqBxyn38Pf7VfzuM9NYPrRiUW8EqQxaf+donLru4jqmmnuLgtFviOO1k6XtMdYdSAu7Td/T4lkAJNu/aPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cipunited.com; dmarc=pass action=none header.from=cipunited.com; dkim=pass header.d=cipunited.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cipunited.onmicrosoft.com; s=selector1-cipunited-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O5qVl0d3hEWU/LtEl7vuACyuT8xwF3zh1sGX9VcxGck=; b=sdDq1BaafBKwgjJCPQn9B6BufF6Y3+wTwmH54GFiKKeju2f1zzfrMv7QDkUA4WMkx2X+p+DdXTPphP87tcSNm9qFsbXh4tUiXNbl8HuKeWuD+cWzMvFqy/sYb1iAkgcCBXqjeVENW3bD6VDA3gcqakpPHFI98AkbUX0PX4dC5B8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cipunited.com; Received: from TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) by TYZPR04MB4414.apcprd04.prod.outlook.com (2603:1096:400:2e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.26; Tue, 26 Sep 2023 11:21:01 +0000 Received: from TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::b15:a53e:604e:a735]) by TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::b15:a53e:604e:a735%3]) with mapi id 15.20.6813.027; Tue, 26 Sep 2023 11:21:01 +0000 From: YunQiang Su To: macro@orcam.me.uk Cc: binutils@sourceware.org, YunQiang Su Subject: [PATCH v2] GAS/MIPS: Fix testcase module-defer-warn2 for r2+ triples Date: Tue, 26 Sep 2023 07:20:35 -0400 Message-Id: <20230926112035.2692284-1-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: X-ClientProxiedBy: SGXP274CA0001.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::13) To TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR04MB6117:EE_|TYZPR04MB4414:EE_ X-MS-Office365-Filtering-Correlation-Id: f1b57107-b61b-4b2a-bd7a-08dbbe82aa14 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SDZ5hupAJOuaZjzTpFvnJE9dz9YrghG5IntWdOl0PH5Tn0ccV9jLJAxWfkSuEtxX2/QBAe5jLgtrem/Qn0L7Guvx8N2Vuak0VJNRhG3DFxkxEYHnKT++IOlTgNLiZFRS8EO8/CARYACrgMT9XfzFUzNYasQ4TcaGS/lNYDUyfHbqmyGkc2eaYJrojMRAuvOOlZXodEonb+qBfOWqG2d8uOI28lrCwOzKJcEIb2laplfnl7i7I5Ql+dgqXAE00bf6uFLPgXx6TFv3EoVYQJqlqKZN0Hi/8skP9g9Rd/BYmi/zn+CIySGN2eUI12aoV28JV4mUhhjn8DPxPfEFfEA4Urefaiz+5yM8tcFaGeI9oGnSynbNpR5E4LSJfl9YWBHkELA0grwkGIMu5pMsvFLSY4rm9FXhfbCaH7t65LmSo8oagh/J94uBzq3h17f7097zLTdzE5ogEnYTfizibmV2jrrBQWfVswbOqbsrVA+YJxW/GDfrnJRVd1eCfBjx3ebXRxP1frRbBDVSnxo2/oNXYJqa6XF7XF8zwwUaVAXrJspDUCHYfjS9G0ulfFQ5CB8AuHFXpFZN5SmBF67aTDLhjwdKXQqVwRD1z3sMkwehG8VnSbNHdbtC0IERAu+4XMvY X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYZPR04MB6117.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(39830400003)(366004)(396003)(136003)(376002)(230922051799003)(186009)(451199024)(1800799009)(52116002)(2616005)(1076003)(26005)(38350700002)(38100700002)(36756003)(86362001)(107886003)(2906002)(83380400001)(6666004)(6512007)(6506007)(6486002)(478600001)(5660300002)(316002)(6916009)(41300700001)(4326008)(8676002)(66946007)(66476007)(66556008)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: THCpXTXStJ13aYKucab0JlqLF4fcHfHTCyDpq6ebGC2sv7W4UEZec92/DHziruckb5v/+Hjc6sBt3ze7BddExBqkepYXUileM5cwewctEonJRSREobATUjo289jlmBIMNfnIWop11Dsit7aavygheSQYVVDVRsMcslFWAoX31aSZYrNV0KqMpz8bszmlG58ocV/8Sxe4sitRAihbeZwZwcP3YnZ4RcZSvOxgshNQdgwom8UdN7Q/dl8q+we8ZODFeXsa+d/SRT+B4ES0bq+JrP5xbUCQIY+NrHryuH/gPmdPII/RqLK2r2dqs4rkCjKJqhdLA15EY5xAUeQeXiPICQSZcOCleFuezCiD75BJIxremzNqrTnfT0trzNJmNnwdqlKlerdNtw6pXSG4C1jNEVFktTa1AyyKd+BJKcPsW97uBSBuvhWslHgfhRKAF4KVXA2EMXWOPa0rNkDQVRih5sOH3WUr65HMIDlyaf5ItDdM6EoYfeFwrmGKXzHXqfM07XgXhSJb7fQgtnEx7mcJA0YxDCssVu4xfsNAPLQMTH8fYk3KGeRoBXiKm1DTXx5GJZFUguC9Mfde/QGX/b85uSu4+SmOoF7gFu//nSwGda/vCcLlgUgFEQqeZq92xUQUFGIB8taJBqvYxikBRmBqKiAC0s62O2V+IiJMWnqqvE1nKLadXLygixlHJBzNM+70mJzVhfVb6/fyI5Wi0mHeMGjYv11Z063c6n0oNuUCA6ahzIGHpT3sr2AQhubmxspLBhzkGWrcTZhnkEts4V4gGgtCs11g3r2cvivFVdV+f1YJxig+v+IkKO0bwlEZ1/m44nSH1Gb+j9yvQ4Ry6R0/tceH0hVDRwj8fpACWUaQ56RvimH1KsyDy27hGeO2nbIQhnKp5AwbMGccG3sRIakgvs05YdtNSfvoWVdIqwn3TRC0tFxbbIg/wBwEbFGibA+/1RnFjkVFsSvomRGyMhTOvAPsl369Ms3YUKdKIvDTnuEAbvVGgPr3MdOU0Od6HkPWrTBuKMLeP/xOTT9xdOIArPwFLb+YRka/p6ZiWF0bTttYBZrECcMjAEFaSDCicPwu+F67270fKygjKToFtaRWlEKsXPaeCIPd6FPoRyUcIJFhKnZ03zc4fpA5W0wISbUeIRx4vHJWOJAumkmjg3M/S6b+tLkzmCQDZcmW/49S9MVKEodVNlCweKWxs+TwVDiV89dybgalWRPFIVYDtLbvLUViyS9D0KOPUuCR/kDurkl4TcOTmC6bOloLqDkajco4lzxNfDUSOpG0mL76LpoGzsUrBFFCURx5Dnyk/26Gs3D9gTKUDe42u1fgNbWni6EJJc3h+6VoG7pvaDMmScMLC+BN6nU94wa73/mvJN38R1KFSgmWGKBgwfB3DiImn4YDsz1LRr3S0/1bQOPUUtiJ7vDuRnG0Gh1J8A5pFsgC7tOrqr65r9cJeZaDMCbdCn7Hjq9fEPtkHpIixnF0X2PQqUMP37z3nsQnyja5lIyd8PLUE9LbBlaUEN8ZyFwYggsbWyaM80WjP8LjysgLTAJnrp7V3xIRbcMSXSm7z4s2a7ukyJL4GBd648WpQt1uMb8fllAsEXQ5yOz/WFUt9S+D+g== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1b57107-b61b-4b2a-bd7a-08dbbe82aa14 X-MS-Exchange-CrossTenant-AuthSource: TYZPR04MB6117.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2023 11:21:01.4650 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e31cf5b5-ee69-4d5f-9c69-edeeda2458c0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 00MzAh7mqI8Js8ijrYwR77dPgkMNseN/QVy0CqR3ahlpMrCqBkt3nF9Ro9ssw34YDlYELGz5sBCYb+Eyw4MlalcWIOBxmJJvry9n3Q/Hu1c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR04MB4414 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775445957193889972 X-GMAIL-MSGID: 1778098922990514237 When gas is configured with --target=mipsisa32r2el-elf, module-defer-warn2 will fail: /binutils-gdb/gas/testsuite/gas/mips/module-defer-warn2.s: Assembler messages: /binutils-gdb/gas/testsuite/gas/mips/module-defer-warn2.s:2: Error: `gp=64' used with a 32-bit processor extra regexps in /binutils-gdb/gas/testsuite/gas/mips/module-defer-warn2.l starting with "^.*:2: .*: `fp=64' used with a 32-bit.*$" EOF from dump.out FAIL: mips module-defer-warn2 The reason is that fp64 is allowed for mips32r2 and onward, so the error message `Error: `fp=64' used with a 32-bit fpu` won't emit. Let's convert this testcase to `.d' format, and split it to module-defer-warn2-r2 module-defer-warn2-prer2, and use `skip/target` tags to select the right triples. --- gas/testsuite/gas/mips/mips.exp | 3 ++- gas/testsuite/gas/mips/module-defer-warn2-prer2.d | 5 +++++ .../{module-defer-warn2.l => module-defer-warn2-prer2.l} | 0 gas/testsuite/gas/mips/module-defer-warn2-r2.d | 5 +++++ gas/testsuite/gas/mips/module-defer-warn2-r2.l | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/mips/module-defer-warn2-prer2.d rename gas/testsuite/gas/mips/{module-defer-warn2.l => module-defer-warn2-prer2.l} (100%) create mode 100644 gas/testsuite/gas/mips/module-defer-warn2-r2.d create mode 100644 gas/testsuite/gas/mips/module-defer-warn2-r2.l diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 91cf8b11077..6e2b41d9e59 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -2059,7 +2059,8 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "module-override" run_dump_test "module-defer-warn1" - run_list_test "module-defer-warn2" "-32" + run_dump_test "module-defer-warn2-prer2" + run_dump_test "module-defer-warn2-r2" foreach testopt [list -mfp32 -mfpxx -mfp64 "-mfp64-noodd" \ -msingle-float -msoft-float] { diff --git a/gas/testsuite/gas/mips/module-defer-warn2-prer2.d b/gas/testsuite/gas/mips/module-defer-warn2-prer2.d new file mode 100644 index 00000000000..9b2b3c4b51a --- /dev/null +++ b/gas/testsuite/gas/mips/module-defer-warn2-prer2.d @@ -0,0 +1,5 @@ +#name: .module deferred warnings 2 (pre-R2) +#source: module-defer-warn2.s +#as: -32 +#skip: mipsisa32r?* mipsisa64r?* +#error_output: module-defer-warn2-prer2.l diff --git a/gas/testsuite/gas/mips/module-defer-warn2.l b/gas/testsuite/gas/mips/module-defer-warn2-prer2.l similarity index 100% rename from gas/testsuite/gas/mips/module-defer-warn2.l rename to gas/testsuite/gas/mips/module-defer-warn2-prer2.l diff --git a/gas/testsuite/gas/mips/module-defer-warn2-r2.d b/gas/testsuite/gas/mips/module-defer-warn2-r2.d new file mode 100644 index 00000000000..07504379d3b --- /dev/null +++ b/gas/testsuite/gas/mips/module-defer-warn2-r2.d @@ -0,0 +1,5 @@ +#name: .module deferred warnings 2 (R2+) +#source: module-defer-warn2.s +#as: -32 +#target: mipsisa32r?* mipsisa64r?* +#error_output: module-defer-warn2-r2.l diff --git a/gas/testsuite/gas/mips/module-defer-warn2-r2.l b/gas/testsuite/gas/mips/module-defer-warn2-r2.l new file mode 100644 index 00000000000..5f22ef4d413 --- /dev/null +++ b/gas/testsuite/gas/mips/module-defer-warn2-r2.l @@ -0,0 +1,2 @@ +.*: Assembler messages: +.*:2: Error: `gp=64' used with a 32-bit.*