From patchwork Sun Dec 21 21:11:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Metcalf X-Patchwork-Id: 4394 Received: (qmail 21586 invoked by alias); 21 Dec 2014 22:17:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 21570 invoked by uid 89); 21 Dec 2014 22:16:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: emea01-db3-obe.outbound.protection.outlook.com Message-ID: <201412212216.sBLMGmV3027942@farm-0002.internal.tilera.com> From: Chris Metcalf Date: Sun, 21 Dec 2014 16:11:39 -0500 Subject: [COMMITTED] tile: separate ffsll from ffs To: X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of ezchip.com does not designate 12.216.194.146 as permitted sender) receiver=protection.outlook.com; client-ip=12.216.194.146; helo=farm-0002.internal.tilera.com; Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=cmetcalf@ezchip.com; X-Forefront-Antispam-Report: CIP:12.216.194.146; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(339900001)(189002)(199003)(377424004)(54534003)(106466001)(97736003)(19580395003)(31966008)(42186005)(68736005)(4396001)(15975445007)(86362001)(105606002)(229853001)(104016003)(106356001)(2351001)(107046002)(106476002)(19580405001)(92566001)(6806004)(20776003)(107886001)(54356999)(99396003)(50986999)(21056001)(46102003)(64706001)(47776003)(120916001)(110136001)(50466002)(87936001)(103666002)(48376002)(62966003)(77156002)(9376004)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR02MB0541; H:farm-0002.internal.tilera.com; FPR:; SPF:Fail; MLV:nov; PTR:InfoNoRecords; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DB4PR02MB0541; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:DB4PR02MB0541; X-Forefront-PRVS: 0432A04947 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:DB4PR02MB0541; X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2014 22:16:49.4383 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3; Ip=[12.216.194.146] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR02MB0541 This avoids a linknamespace failure when ffs is legal but ffsll is not. --- ChangeLog | 3 +++ sysdeps/tile/ffs.c | 11 +---------- sysdeps/tile/ffsll.c | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index d21bd2b..d488679 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-12-21 Chris Metcalf + * sysdeps/tile/ffs.c (__ffs): Moved ffsll definition... + * sysdeps/tile/ffsll.c (ffsll): To here. + * sysdeps/unix/sysv/linux/tile/localplt.data: Removed. 2014-12-21 H.J. Lu diff --git a/sysdeps/tile/ffs.c b/sysdeps/tile/ffs.c index 3e52f8c..24241e3 100644 --- a/sysdeps/tile/ffs.c +++ b/sysdeps/tile/ffs.c @@ -30,16 +30,7 @@ weak_alias (__ffs, ffs) libc_hidden_def (__ffs) libc_hidden_builtin_def (ffs) -#undef ffsll -int -ffsll (long long x) -{ - return __builtin_ffsll (x); -} - -#undef ffsl #if ULONG_MAX == UINT_MAX +#undef ffsl weak_alias (__ffs, ffsl) -#else -weak_alias (ffsll, ffsl) #endif diff --git a/sysdeps/tile/ffsll.c b/sysdeps/tile/ffsll.c index 180eaa8..04daf43 100644 --- a/sysdeps/tile/ffsll.c +++ b/sysdeps/tile/ffsll.c @@ -1 +1,32 @@ -/* This function is defined in ffs.c. */ +/* Copyright (C) 2011-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#include +#define ffsl __something_else +#include + +#undef ffsll +int +ffsll (long long x) +{ + return __builtin_ffsll (x); +} + +#if ULONG_MAX > UINT_MAX +#undef ffsl +weak_alias (ffsll, ffsl) +#endif