From owner-freebsd-arm@freebsd.org Wed Jan 11 16:44:20 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28526CAA754; Wed, 11 Jan 2017 16:44:20 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6B841FA2; Wed, 11 Jan 2017 16:44:19 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x234.google.com with SMTP id j18so87538653ioe.2; Wed, 11 Jan 2017 08:44:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=uIINW97QGZZhD66LonNssQqT6G00epZuHlD2tvStVWc=; b=k+ReWa3q4MZPFVoXrCmUgcgr7jcMwV3PeBV7JzgeORlLdI7u5OLLqRBnzk6Ch+kAW9 hf7dwsVEFDsY1R/TN1yaj1bjiNopVZyP9RmdF8dJhzSOipHx7sqXxQu/rqQSRicsmn4w iWzrDIsE8s3AzdLXo4o0o8CbBpG5CM1opAbxL+b+cyJ9D5Ti6NHE5FOTYaHHonwZ05Mg ICVdLfEe1f/cl8Q9Ekm4bOTQdx0shqaxuhhXhEo3hrqz3kEJtjrufxlogKF4mKOfxiLD 3dESS83DCx+xQ33YzHPEBR7noKSMuc5gdMdWA7wdgb88Xi5YKwgWYrAPSpILe7vQ8/0q BBuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=uIINW97QGZZhD66LonNssQqT6G00epZuHlD2tvStVWc=; b=i8iUEpXVF6ldwI+XuJ43qHq0a6V2DyQzQdJq3eJsnGJ7zbCRkZVuqf7U6doz1VugZs q7CEgCmjig+hwoCeQCLwtbE0xdlGFgxoT7mXORkFTVaA3padFMUtwyKwTal8JY0JyTdG Tz4iKRMF2lBGhBbz4f/VQnN+isO9QxcsWrc2/i6dcIQHNfdQeP0xlxDgEtMYQs6ljNTQ etsnXOe/NWI8yOpiHiU8fjYVxd8gFBprI+6IB1T8dooshxDJd4Mn7B6piDD1esr+AczN +7wGn60sN+KSyYPaa0GPpU+G/HHBDBlcu7X1NuZZdQvu3Aa3VykM7xHaaQ3fZFoZpngo ut7Q== X-Gm-Message-State: AIkVDXIuBVhVKXR4kZ6ONhJ8xGRpnQfpBJaZfeFGAVESxM27o1avH/2TRcbrUQGl8VHB6ErbpAktd2JOfWHtDw== X-Received: by 10.107.142.84 with SMTP id q81mr8560508iod.169.1484153059296; Wed, 11 Jan 2017 08:44:19 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.175.159 with HTTP; Wed, 11 Jan 2017 08:43:58 -0800 (PST) In-Reply-To: References: From: Ed Maste Date: Wed, 11 Jan 2017 11:43:58 -0500 X-Google-Sender-Auth: erpqm1pLbYd0_BnGXPpz-hPRRsA Message-ID: Subject: Re: clang on armv6 incorrectly emits call to sincos() To: Jia-Shiun Li Cc: "freebsd-arm@freebsd.org" , "freebsd-toolchain@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 16:44:20 -0000 On 11 January 2017 at 09:42, Jia-Shiun Li wrote: > > Think this optimization should be turned off for armv6 from base > clang/llvm, instead of patching individual ports or ports infrastructure. You're right that this needs to be fixed in the compiler or the base system, not individual ports. LLVM has a hasSinCos() and should not be emitting the sincos libcall on platforms that do not have it. Would you care to submit a PR for this? -Ed