From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15287 invoked by alias); 20 Aug 2018 09:29:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15276 invoked by uid 89); 20 Aug 2018 09:29:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=detection, extends, topic, 22943 X-HELO: EUR03-AM5-obe.outbound.protection.outlook.com Received: from mail-eopbgr30043.outbound.protection.outlook.com (HELO EUR03-AM5-obe.outbound.protection.outlook.com) (40.107.3.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Aug 2018 09:29:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DZfqfVZN5vzcZPvhXaNYrHz+4xYKV38IqghN8ko5Is0=; b=I4qheWICqcUActNEwWPBJYXPR81UDx7Q8hD3h4ZTQaUV8xvwDU4YpnTaH2FxnEtDOfUVA2PFzzCmJJc3lTQT05S5eclG0r0e/gzwc/wBFn4GQg6R/wq3qwp+5AiVJB15aUuL2G5Zq43elW3XMzXvNJ+Uhg30CwP7D8TkQeYWWr0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Received: from C02TF0U7HF1T.manchester.arm.com (217.140.106.32) by AM4PR0802MB2131.eurprd08.prod.outlook.com (2603:10a6:200:5c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.21; Mon, 20 Aug 2018 09:29:46 +0000 From: Alan Hayward To: gdb-patches@sourceware.org Cc: nd@arm.com, Alan Hayward Subject: [PATCH 0/4] Aarch64: Correctly support args passed in float registers. Date: Mon, 20 Aug 2018 09:29:00 -0000 Message-Id: <20180820092933.83224-1-alan.hayward@arm.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: alan.hayward@arm.com Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00454.txt.bz2 GDB currently does not adhere to the AAPCS spec when passing structures that contain float arguments. It works for simple structures but does not correctly detect nested structures. This is shown by the failing tests in the recently added infcall-nested-structs.exp. See PR gdb/22943. Patch 1 contains a new function for correctly detecting float args. I wrote this by taking the equivalent function in GCC and modifying it until it fit into GDB, then simplified and cleaned up. Patches 2 and 3 then use this function. Patch 4 extends the infcall-nested-structs test to cover structures with 4 and 5 fields - 4 fields is the maximum number of fields that can be passed via float args. For the full spec see: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042f/IHI0042F_aapcs.pdf Alan Hayward (4): Aarch64: Add function to detect args passed in float registers Aarch64: Float register detection for _push_dummy_call Aarch64: Float register detection for return values. infcall-nested-structs: Test up to five fields gdb/aarch64-tdep.c | 444 ++++++++++++---------- gdb/testsuite/gdb.base/infcall-nested-structs.c | 168 +++++--- gdb/testsuite/gdb.base/infcall-nested-structs.exp | 5 +- 3 files changed, 366 insertions(+), 251 deletions(-) -- 2.15.2 (Apple Git-101.1)