From patchwork Fri Nov 11 15:37:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 81858 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1329076qge; Fri, 11 Nov 2016 07:39:20 -0800 (PST) X-Received: by 10.98.103.201 with SMTP id t70mr7928663pfj.99.1478878759950; Fri, 11 Nov 2016 07:39:19 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 130si10716201pgb.271.2016.11.11.07.39.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Nov 2016 07:39:19 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-441123-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-441123-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-441123-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=ckjsykcx5hK9aTdJ 8WTUrFDnR299QekR2qbLr8eXo8MwPtpxOEjE3LOOJtXOKe3Nlh5PUPTSJO7k0M00 Okj8kPDQxW4oZ+yBt2HsxzPZDkNaOQ+JCYpPpqXYToi0G6GcynOvWbVHDzeTpEbY +BhKm7tB1YFm4y0b8ksaKSXp0jw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=default; bh=oPIpnie4SIpM24qna+1VMF 5XH90=; b=VIK1Z+IhTFzeaVPWqE3G9MG2iDJqwnIbWUROKM0giVrmup/mb88872 YLC3h2cFVqy/QUhXHbYIC7NfhYk0uXgX0MmI7PnHI3iokFg27FnsqI1MFf3Z+D4u aiPVcW4Nni1lHbRq7W+yHqwmApfgSW2/Fvy2GkSF2i7KmHp8CGNvE= Received: (qmail 75529 invoked by alias); 11 Nov 2016 15:38:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 75428 invoked by uid 89); 11 Nov 2016 15:38:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=spotted X-HELO: EUR02-HE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr10070.outbound.protection.outlook.com (HELO EUR02-HE1-obe.outbound.protection.outlook.com) (40.107.1.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Nov 2016 15:38:15 +0000 Received: from VI1PR08CA0039.eurprd08.prod.outlook.com (10.164.95.49) by VI1PR0801MB1790.eurprd08.prod.outlook.com (10.168.67.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Fri, 11 Nov 2016 15:38:11 +0000 Received: from AM1FFO11FD001.protection.gbl (2a01:111:f400:7e00::133) by VI1PR08CA0039.outlook.office365.com (2a01:111:e400:597a::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6 via Frontend Transport; Fri, 11 Nov 2016 15:38:11 +0000 Authentication-Results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; codesourcery.com; dkim=none (message not signed) header.d=none; codesourcery.com; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 217.140.96.140 as permitted sender) receiver=protection.outlook.com; client-ip=217.140.96.140; helo=nebula.arm.com; Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD001.mail.protection.outlook.com (10.174.64.83) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.707.3 via Frontend Transport; Fri, 11 Nov 2016 15:38:11 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:879; Count:13 Received: from e107456-lin.cambridge.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.294.0; Fri, 11 Nov 2016 15:37:54 +0000 From: James Greenhalgh To: CC: , , Subject: [Patch 4/17] Implement TARGET_C_EXCESS_PRECISION for m68k Date: Fri, 11 Nov 2016 15:37:21 +0000 Message-ID: <1478878647-22547-5-git-send-email-james.greenhalgh@arm.com> In-Reply-To: <1478878647-22547-1-git-send-email-james.greenhalgh@arm.com> References: <1475254617-10825-1-git-send-email-james.greenhalgh@arm.com> <1478878647-22547-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(24454002)(377424004)(377454003)(50986999)(512874002)(246002)(104016004)(6916009)(8676002)(110136003)(2950100002)(356003)(6666003)(5890100001)(4610100001)(7846002)(626004)(5660300001)(305945005)(568964002)(50226002)(8936002)(84326002)(2906002)(4326007)(87936001)(189998001)(106466001)(33646002)(77096005)(26826002)(2351001)(2476003)(92566002)(586003)(86362001)(76176999)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1790; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD001; 1:B6e8bxpW6/Ju8TIC0BUN/WusnVsnUzh3fqaAJKjHRfFDYH1heiZrEI2GN273NQYSDiBoN78B3ZY8cBc8xUnZeTDO89nMnYclMhT/5KXNBHM336FxA4Ybwhh49qF+5f3l10pPCVa4HgN6oCYbohy/MgCRG81wGDQ7asaKcW8m6SD5cHq4vcBUELUkBYl/Vq33PqWFqemZ6GW2n1JIOW5dqrO9W7npP+dIre3uq/O+cFPMnnsvolv8kd3sVpN9H2dQNCYBDxDgC8Gj3TWdnY0wtAZvf/FzNPpsU1JqU8e+30znWBHfWbTJk8uaLR5vBQwZbC9pu7rcDqYLKFvLCgUgxHu6GH0JU1wtRiAcGOSwP+dW5Vi+W3s2sWRPqDvZbHTz/lGRE4AU6m6xIdQ6VrwJ9cpJTZuBWuSWLOk0I+6Dtqg06/UD4GZgocoQShrbGTV+UPtITUCq7QLBcwWGAQZnLPxN1pX6gW45ELikr//mlAu0k5QL52L6hOh0nNHXUdRA6fzOnDQVdgwJ55ejXV0IE4famHbL5AKgXzKU7g0MBwGu5Rm94yjNpov+eLeu3utWAlGJ68SToKOeOBZ/6hV/Vy+SR7DZ8L5E1YJL1+sfFHM= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1790; 2:A/HNGxzxazxdg3iwuvgQ/QJgtUjs/fTKv8yB7f3U3ocPN0CqjJgQPxhGpcLr8o5O5X28+1OKQTsi2Yz9zd90+GurDcRHYla+syYu4+tFWYxcc8cioFuE1qlFk0wWilBx58LBJOYZXKRL7ZwP+r0NzJ2ILEf/i1aI4xtnwEVpJOY=; 3:23LtgdWuU4ZLcBiUxzSQcyLjiMZqK1XbneNf5CDt7B7ngpr3cCM4I2NofXK7iftYagRdkAexELwf/8DDizYJOXvgIIUUrS6OWwU5oMjBd6ZERnk04wdbR17fL8yj5mV+B8hvJuk9ceck583yz2AatQe454alU2/6elhIHy5OuMgr228wbrT+LxUvO/CCx/sHNSL64MhRrTndsiUJL7DtGK4WH4PJXC01cxHNpOFGGAfFqBAMpUfkdMxCCoyGnbzYKCcaSWky2Op/jlHuHGQVnfcxvaIScoQ6dgygTT9aVdU= X-MS-Office365-Filtering-Correlation-Id: d06bd119-e9bb-4f54-037b-08d40a48be98 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:VI1PR0801MB1790; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1790; 25:lUukvpQhi7RPHKeKYmBuHRQvIJiIyIQV0FDY+p/MjR0kg5smiEgeNUInFzpqvjozxDyjOD12dgpMio1GTZ1H4gAUvTuO2RACDWnfaYdILTxt66DNQDwfGRszM0Cqsrar42CcvjjX1IPuEvwJ8X6SEb/G7Wn+pR5P/GmAoqEgqdexfPBd0ScgW2UXp7nuXM4cYmN4vj6eFEkoOWpMUXN6fOw0kqTJ3mKnQLA9tIYR3b7L389Ldf7NLs3ipMmxRf/kfzGeqSS0LQq3XQiphbX8a9MnqDzYv9jUiCVbo8xdNfVK3koBTAHKbe7VyRyZJAC7EuHPW79AVPDpPYc7FNZy4lgIIvwNNXNaeruRi6p9jlaDoUTWPUnA+/4o9NlylhgdMbBTgCjni70y8Kmjquv79xk3CpwRlUWGbaLf+MCYLEX5nEgBIyUTVf8j1HXZyJqKwjZkCX8Et14ZnrIOqxaNEdkGEQVdbBFjjAPHRVrmMEQ=; 31:2kek+wq+SEAGuOu8r8bLiElFTQOPq9InNpRANbh9hllVrdZ3Ctd+lHRSdMB+DimMJESKt3j46mLU6419dJFpdc2kyM9RMc1fujyT2LQpWF68kqNeTUo2EFprTcqQrm5BWYmrmVMSV4Nec3W6+ZUgA7G1rpLtyMnrWGihu/vvbux3QgtdAopVfs/ubx2lJpnf0GXK7U/DlrXViLuxE3ubpk1RsexBsGAhiAyr10WgW+/v9jHqX6q+DUEFaMcmLTE7x05nqNo6PG7dkIrtVK4rxzIxrIcBXQNhzQFUbFR6uAEsRWRzPw0uw2EWCIQDpa2P NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1790; 20:y+IHMM92+d9c6r0vN0fjNR3G/IAZK2mlA1ylQbsz0MsrIr3E/WulAplatmYtO6eDk9sItiowkI0bZA90Jwdy6tjMHCSUzlbxR7QYZM8jW7prK1NQE941Nw6bAmZgZd3zMFhorI4viKhXqHmJKAHVPztHETFX8/9lr2fLmfe4gY1lirCZ9zA8nMely05+Wa8/vG6qdXfc4ARmYjjBoGcy4NvPhlBmsKt7lVssykXNyYhHXOo/TaLrqgxHAuqYOdBH; 4:d6ounugOCvsF3KmaRuPh20Su5veDc6qJjYjl4e0Av6+oJM/DKTFfxLu9FSl74eimgXlsWQOdt8HpUvc11pqNfB7Z2raMJpv3wZ3Clsso0q1bvpFegCYRFCPbAoIVW0iK5k1gV8ISjc3zMhbLY5+ZfcnP3n84nTprlq1YiC7WMlt5kjNffvwn2vgJBTzTMAtTYdfGg2fKbh7PBCCuxzFRoVqE1Rxohq+2RYnpuLMFOooOc0SsdJffDDz3PhQZEj6MNdDkGNHBq2n+5ubHqYoN0iVwdUgOAA3b2/Y3MuLY7Qj2JJ8E55ZoX2p9q+Da4Y/PJ48z/uhPOSGT938otAfOAoLKyZe1Tu6Y14pPOK2pQtJtp4zxdDt/FXDAMjKAVG5E3Lz4Hc3JWDQfBqhaHTzfIO6jHydDnGMhVJXED4tDU/Y/alWSL2xkpenqsbwIicg+dGlxP8L/fwBbKxNiVLHVuc2oqdBPo6evEGt43v1T6o5gXqHm2cpRv3v/RHlakYV7/UM+BOhX6pbbL/4Q+FM9sb65jNnJaPwGQtgeu8eeacKEnixm9SotatqeyrSTRXAvXr2G/T76pfkquJ7Oe/tRtFwB3NUhVP+EUKFRhOiteK1lhBZ44qKyyEzCsGw94+dp X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(22074186197030)(183786458502308); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415395)(6040176)(601004)(2401047)(5005006)(13024025)(8121501046)(13013025)(13020025)(13023025)(10201501046)(3002001)(6055026); SRVR:VI1PR0801MB1790; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB1790; X-Forefront-PRVS: 012349AD1C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1790; 23:1LCWSBFiozt+gpfREkY+AR2xReLxeLzCg6V6By7?= =?us-ascii?Q?pswl9AjYCNg3N1fhYgJ2O5gRjx+ho0VWo0453T/B0T/uyDxRt1QfMyegXfPb?= =?us-ascii?Q?Ya5m32tjB/4PfruhILlG3y3Wjm9ws8LuKA5i1099GxfW8AJMaO2x0HQgMM6o?= =?us-ascii?Q?BQBIrU4HsK4jeEYj08gj0vqKhdxjrBmZBF1dvJ0UUyD4JiEYMe51eGeX+Syc?= =?us-ascii?Q?KKd/lcrfBbP3NokgBvcB9RGAL9YiYXcnO17IVKrM5Z1h107RS+IYlayQcXhE?= =?us-ascii?Q?//GhRwZcsbawKQC5ePq7g1KBP544QR/BvTliNqaOioNGus2q1oOk4orim2cj?= =?us-ascii?Q?CCK+/lqMueBLfL3b8edMIrnFnDqKNWWr8QZn0hkHovFbUxPssI6/lDbcCrDu?= =?us-ascii?Q?HogHAYCW47t6G5Y4uAXZNUXiRANaejhfb9aJ2KMG/9bhbA6wjZbpBRPoltnw?= =?us-ascii?Q?PG+3Whwp7Jf0uH53Jch1uQrP1LSXbconlEQJS3XLDWJctWi4dc3VJeKpx5/j?= =?us-ascii?Q?R7NazYKKkugaDJVcDXXWx4yNjo9IcZVoyh8fdkZ3vDWVaiKu4SQWoAFXGPIp?= =?us-ascii?Q?W6/5tO00wdZpXaWMAo2b8lZczDHs0IsilQf9zd5Df6OzrrhnqN066fdAyvs0?= =?us-ascii?Q?BmkeBL9Tm+NeLWBH7PrM2s6B4mLnrzDxZbqCoB4LCR3eWTzXKQFjMTEvqH0K?= =?us-ascii?Q?X4yIYcSZZOZ30tv+33QzOTQ6vseoNHCulIu6iau+xDtSjFAryhn6oFvyu0Js?= =?us-ascii?Q?P4iYjfFOVWxiw5H07Yr8/kTO0x7ds60fBpihkb60qawxTnr832Nv6gqqtWd8?= =?us-ascii?Q?5fbKHT3EZ/1kiQydlAcwcv4JxpnURjhVY3F0x/AW6zcwYLN4NxIeW/LtgqbM?= =?us-ascii?Q?l74BzBUzJ57QuNQG8txh8QUc18foHWn5V28MC6x9sY/5RAHgBRmvKyaQz7xK?= =?us-ascii?Q?ldwHqo28Per+YwYnGGNIIMYCMKJLOJ88VYrF+wks5mm9+DZHmdXeKvihkG/S?= =?us-ascii?Q?XAwHmLs7OReaJTEzEtSzCv+CRMi+Gvyk8obghcXY63cMFHkgyOgObw47YHAA?= =?us-ascii?Q?vjsC/ONW+M2vVL8lj4+FaPS8v4us3Ajo0FwUYwSyv/NyQV0xy6w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1790; 6:DywEAspa4FENRKGHcJYANLl96xX6Rvwyscpd3lMzr2MSKFc3W3rSvSKLlH6g9tPSHfdqb+P+49eQu1ICbO49galTFTKJIIzC2xyby8NOi/+xaTmokuNlNQN0lk031Oc1+SvBBRcqmjKn3QZC2B7TK30icMt4hxrMR6yClTsfybUR3GknLnPr/r4VnxwVJXtl7rXQiwxEYCe8bSdD2HNupXttRwGIbU1GPKEssCRWjtJFWh/4qHQRGdBFBHrL5baophCMlO1oBF5t3kI+JtBn9wme3CkDD3dWALpXmG84d21UufRnY6DIUYJEeR4n8bwaOseQkoUYGHa81DFykQznodkSna4KQMrp9SQh453vKdg=; 5:Lp6xa7IH5H2MKfbHQzWsmPwnRNWtI43+/Vo0AignRmyWQhJo8tMtxBjbqccO6jnfi0iJuQTxFssxO/O98rD6FglqRhXdfJ7/2fdv4vsheQHVsDaMQXAC2QD9zgSeeadagUd8C9dyrEqGIgqC67/doV8K1nbMRgmPOgItXnBMv44=; 24:+rX02n+gZC5w8VcnYMzMzfR4ehjgJ8O3XLvBwUG+L4DeUpf56yEvu2x6LLf7ZuIZj9xZUqBMMGnQ8yw15O2Q765+51Ms6PTK733CQToA22Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1790; 7:RjaMIIqfejjC5ad3jAuLz4x8bOZ7QObs7UNAT2JbXxALEs2ouAFgI2xZVE/KOAiRjlcA5R+MPPCRF9Y6KITS4Y5nZx6HneJ7nCtJdrZojj8e7rzDgEgOB5rFrSALRXOHATRlWfO28Dw3wjV0Wr1JKy0DzQMbmF4cfdsxsmBKlOg4F/9HuZFBu3RKd/mKczc4dl29s3bUGQYXpyoPre8aYO+XiRq6bfsjNL8cLC5Gk6B1IL92X5eRMVyqyOQ47pVMN6//juTdVWMTCWFItT859kYdNZTTv9ewyely7ggEQ22exRSJrwad50BHvhPP+PpilXc0Yx2U8UmbLw9sZJeF2yOd0isutZn2wrHpZwMRPU0= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2016 15:38:11.5299 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1790 X-IsSubscribed: yes --- This patch was approved in the original form, and the delta to here would apply under the obvious rule: https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02414.html --- On Fri, Sep 30, 2016 at 11:28:28AM -0600, Jeff Law wrote: > On 09/30/2016 11:01 AM, James Greenhalgh wrote: > > > >Hi, > > > >This patch ports the logic from m68k's TARGET_FLT_EVAL_METHOD to the new > >target hook TARGET_C_EXCESS_PRECISION. > > > >Patch tested by building an m68k-none-elf toolchain and running > >m68k.exp (without the ability to execute) with no regressions, and manually > >inspecting the output assembly code when compiling > >testsuite/gcc.target/i386/excess-precision* to show no difference in > >code-generation. > > > >OK? > > > >Thanks, > >James > > > >--- > >gcc/ > > > >2016-09-30 James Greenhalgh > > > > * config/m68k/m68k.c (m68k_excess_precision): New. > > (TARGET_C_EXCESS_PRECISION): Define. > OK when prereqs are approved. Similarly for other targets where you > needed to add this hook. Thanks Jeff, Andreas, I spotted a very silly bug when I was retesting this patch set - when I swapped the namespace for the new traget macro it changed from TARGET_EXCESS_PRECISION to TARGET_C_EXCESS_PRECISION but I failed to update the m68k patch to reflect that. This second revision fixes that (obvious) oversight. Thanks, James --- gcc/ 2016-11-09 James Greenhalgh * config/m68k/m68k.c (m68k_excess_precision): New. (TARGET_C_EXCESS_PRECISION): Define. diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index ce56692..22165d6 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -183,6 +183,8 @@ static rtx m68k_function_arg (cumulative_args_t, machine_mode, static bool m68k_cannot_force_const_mem (machine_mode mode, rtx x); static bool m68k_output_addr_const_extra (FILE *, rtx); static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED; +static enum flt_eval_method +m68k_excess_precision (enum excess_precision_type); /* Initialize the GCC target structure. */ @@ -323,6 +325,9 @@ static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED; #undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA #define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA m68k_output_addr_const_extra +#undef TARGET_C_EXCESS_PRECISION +#define TARGET_C_EXCESS_PRECISION m68k_excess_precision + /* The value stored by TAS. */ #undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL #define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL 128 @@ -6532,4 +6537,36 @@ m68k_epilogue_uses (int regno ATTRIBUTE_UNUSED) == m68k_fk_interrupt_handler)); } + +/* Implement TARGET_C_EXCESS_PRECISION. + + Set the value of FLT_EVAL_METHOD in float.h. When using 68040 fp + instructions, we get proper intermediate rounding, otherwise we + get extended precision results. */ + +static enum flt_eval_method +m68k_excess_precision (enum excess_precision_type type) +{ + switch (type) + { + case EXCESS_PRECISION_TYPE_FAST: + /* The fastest type to promote to will always be the native type, + whether that occurs with implicit excess precision or + otherwise. */ + return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT; + case EXCESS_PRECISION_TYPE_STANDARD: + case EXCESS_PRECISION_TYPE_IMPLICIT: + /* Otherwise, the excess precision we want when we are + in a standards compliant mode, and the implicit precision we + provide can be identical. */ + if (TARGET_68040 || ! TARGET_68881) + return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT; + + return FLT_EVAL_METHOD_PROMOTE_TO_LONG_DOUBLE; + default: + gcc_unreachable (); + } + return FLT_EVAL_METHOD_UNPREDICTABLE; +} + #include "gt-m68k.h"