From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iWS4ETmBFmYBHSoAWB0awg (envelope-from ) for ; Wed, 10 Apr 2024 08:08:25 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=HOTMAIL.DE header.i=@HOTMAIL.DE header.a=rsa-sha256 header.s=selector1 header.b=p5MhJpha; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 18F8A1E0C0; Wed, 10 Apr 2024 08:08:25 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 519281E092 for ; Wed, 10 Apr 2024 08:08:18 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ABAAA3858404 for ; Wed, 10 Apr 2024 12:08:17 +0000 (GMT) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04olkn2047.outbound.protection.outlook.com [40.92.75.47]) by sourceware.org (Postfix) with ESMTPS id A21FA3858D20 for ; Wed, 10 Apr 2024 12:07:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A21FA3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hotmail.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A21FA3858D20 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.92.75.47 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712750876; cv=pass; b=aIICdGXZ/b0pa3qtRVPEHCbVhjmAGg939UMw0+digfzbeK4+Mgh00JvrvLYM4LUJfGiaHmcq0Jh1tUI3XNMuazCfSC2mgAXNoQiJfewlXFKnTSXED8oOf0ONMu5TwIuYBpJB40UvplLZX7TWxs5Y7pa/OZmAlgzAQTR0GL3LQs8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712750876; c=relaxed/simple; bh=42OOgb6oI9N3hb5HWe4mEJ0ia0FmHI09wSJxDy82wFE=; h=DKIM-Signature:Message-ID:Date:To:From:Subject:MIME-Version; b=UHNf8dAnkdagxPkov9ilL0iY7ZU/KCBXpBkwpPC8tM8R/Rv0f152Fgh5UuUqBO/yXEPjn3zzifOeGhtoVnV/WazV5W5N+ZO0hoMwEYMCdmK9sKLgV9NLJkPG4lZMjPPXpb4r9iiyIFM3JiuibsbVOu15fjHS072G//dCm15+dOw= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mpqw117CWWYqswLnUBYugc3hzDa6GJW+lByQ7IyZlZ9wIBwWmcsjlj3+/G0a1SqeEavGmLx6LstI0mVxxY7o/H3wmbF2P30hK5zX/+F6c/YOBpwwJV4KUExcW4ZiA8cW7Pfu1SblvFXQnFRuYtThn/7mOfellWO1LJYEiDx5SdsZ3H2n0ap3k11/XORWcfv50hqXlQYh9nIylHsfJts+rsLQjhnwRK5dtIODNEImh+MgLbP8ykXl+pPMhYBcYpqBbB6ZZrJI0vEbn0iDDVCNV1vB5WYF/+9YPipfuVkzIiu7PsFCGSCslGALU67+E0R1Ik0J38C+ax38Swyh/xZ9hQ== 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=ggz2gWRtB7fchmShIAurTtaVVltE5Sk/rvI642FqbF4=; b=ObzNy12fjV4kskbefAfvlz88EWBYa1W/mUKSje6L59BiaifYpDgP3Z9fBWILFHDUdMAvrhaHEzG0CrXzXmABfTvNoPpeqgtDLjgjt1X501l3pva7Ht/CtA2c9aqtGky50P1M+akPHitlhYQUKTtuKaIH49UqORUnaRDEb1G0Oj5ovEoI9aiUtto5zI3l/UXk7XCqD2GtTYAM0nBwoQEvkIlmRINDvgJLg0uoqPBGtV5eFqWSJ8y5SQefzbZYsi9J9k9QRuCcIxsiT2stA4/nat8jYqE9HvU1ixVmIj8qty2tLDGD8n9l4/1zRvzfDOj8AuWrkVihBsGWloFkdTzU+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=HOTMAIL.DE; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ggz2gWRtB7fchmShIAurTtaVVltE5Sk/rvI642FqbF4=; b=p5MhJphaMBjPfGjg/qss2VjcLX7LT/34+BiogKpmWhE2AMaRlJDLiwiNvdEw+HsJh9zJus6JULQFSYNko4lgW5BdCbDIybQDmO+CJK1efsvVpT2kDApmgO5p8kupFEzveDhDZk5Cod6Hfesx5IDkdE06s4LEaSWtWyxKeX92imJ0EUu4jibimDRG/B6qeCqPFFGrZHyEptBOqOHSh2gGgEbRnc1GbDqX8LU1q9KqE3o1wHECRhTtf+bfBlLGU44Z14OhTSVSkx4UIkCp2x/A2bHy1n8nslQFGQNJ5AC12Eres7sPDmkJuz6win7IeRgrYs+dlA64990Hpl/j1NailA== Received: from PAXP193MB1296.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:15a::24) by AM0P193MB0580.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:16f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Wed, 10 Apr 2024 12:07:52 +0000 Received: from PAXP193MB1296.EURP193.PROD.OUTLOOK.COM ([fe80::9cd3:f742:8663:6ee]) by PAXP193MB1296.EURP193.PROD.OUTLOOK.COM ([fe80::9cd3:f742:8663:6ee%7]) with mapi id 15.20.7409.042; Wed, 10 Apr 2024 12:07:52 +0000 Message-ID: Date: Wed, 10 Apr 2024 14:09:41 +0200 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "gdb-patches@sourceware.org" From: Bernd Edlinger Subject: [PATCH] sim: riscv: Make stack 16-byte aligned Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TMN: [JCtaI1plqlOBozRxN5xd/uVtmJ5CJ3UX+YBAYOVfiELAI7nvhXiWgo4PVSqdrpBC] X-ClientProxiedBy: PR0P264CA0061.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1d::25) To PAXP193MB1296.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:15a::24) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXP193MB1296:EE_|AM0P193MB0580:EE_ X-MS-Office365-Filtering-Correlation-Id: 2aa2612b-5ee7-4803-07a7-08dc5956d8f6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W89/E3ufxUh18IMovhNcAkjj1l0Ut4lR/HCYbO4z96ORFCuQqa+1WUiXObFvZafPbVO+6wibPT23AlIPOcDcTFThDb4wqRJcFUjf6eoBEyMACIz9w/24fVKdz5xlcyqf8IfRb/RiDYV4cRy1j/EMReRSwzNXom7dbaEm+gTbXoJt0PvHujNoD2/74k9nUEXV6BZQxH+NINTIa4O2dB+8BHjo9iW8Qpz9MZjIIlxfV23a6lTQ0Ajr21t2g9a/BqaziBhwor/QJTsDlFLfLctwraao6Z+/QtdOGsVIpJ9zxD3CPpxSATV31No5P+LsZH26NHVuAOoQSAhGMjnBEeg5IJrREI1yQQBB4MeRoX5L0ZfesN7HVmE683KSkD6ofQRlonXW2+p4BzdjKJtfrbgn6Gm51gD/ynrX+NuXqj0XDHWM3dHSJs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sejc5NFBYbk1u?= =?utf-8?B?cnpzWnh6dlNvRjdHWC9JTG9MVnZNbGJReDdwajdHNXZvend2b2Y3UVNxalVn?= =?utf-8?B?amVHSGU4SC9QRStzQko0MXI3NW1nUXlSNEVxTXIwb1N2SEpMcUN3ZGdnZXhI?= =?utf-8?Q?w6TY5dXV6wWPC+SVIxmTyuVCcWu2WkcCDVPlNSe?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-80ceb.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 2aa2612b-5ee7-4803-07a7-08dc5956d8f6 X-MS-Exchange-CrossTenant-AuthSource: PAXP193MB1296.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2024 12:07:52.5149 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P193MB0580 X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Various gcc test cases fail due to the stack alignment of 16 bytes is expected by gcc, causing issues mostly with vararg functinos; e.g. FAIL: gcc.c-torture/execute/nest-align-1.c -O0 execution test FAIL: gcc.c-torture/execute/nest-stdar-1.c -O0 execution test FAIL: gcc.c-torture/execute/va-arg-12.c -O0 execution test FAIL: gcc.c-torture/execute/va-arg-15.c -O0 execution test FAIL: gcc.c-torture/execute/va-arg-16.c -O0 execution test FAIL: gcc.c-torture/execute/va-arg-17.c -O0 execution test FAIL: gcc.c-torture/execute/va-arg-20.c -O0 execution test FAIL: gcc.c-torture/execute/va-arg-26.c -O0 execution test ... --- sim/riscv/sim-main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sim/riscv/sim-main.c b/sim/riscv/sim-main.c index 4e3672505c6..0876d455570 100644 --- a/sim/riscv/sim-main.c +++ b/sim/riscv/sim-main.c @@ -1586,6 +1586,8 @@ initialize_env (SIM_DESC sd, const char * const *argv, const char * const *env) sp = sp_flat - ((argc + 1 + envc + 1) * sizeof (address_word)); /* Then the argc. */ sp -= sizeof (unsigned_word); + /* Align to 16 bytes. */ + sp &= ~(address_word)15; /* Set up the regs the libgloss crt0 expects. */ riscv_cpu->a0 = argc; -- 2.25.1