From patchwork Fri Dec 16 10:56:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9477733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 338D260828 for ; Fri, 16 Dec 2016 10:58:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23675287EC for ; Fri, 16 Dec 2016 10:58:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18611287ED; Fri, 16 Dec 2016 10:58:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D2F8287ED for ; Fri, 16 Dec 2016 10:58:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761240AbcLPK6T (ORCPT ); Fri, 16 Dec 2016 05:58:19 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:60636 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760740AbcLPK5G (ORCPT ); Fri, 16 Dec 2016 05:57:06 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0LhePx-1cv4xC1fXN-00mqto; Fri, 16 Dec 2016 11:56:47 +0100 From: Arnd Bergmann To: linux-arch@vger.kernel.org Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@vger.kernel.org, Russell King , Andrew Morton , kernel-build-reports@lists.linaro.org, kvmarm@lists.cs.columbia.edu, Arnd Bergmann Subject: [PATCH 03/13] ARM: div64: fix building with gcc-4.5 and lower Date: Fri, 16 Dec 2016 11:56:24 +0100 Message-Id: <20161216105634.235457-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161216105634.235457-1-arnd@arndb.de> References: <20161216105634.235457-1-arnd@arndb.de> X-Provags-ID: V03:K0:j4f76WHAY+4er3F+sPncZ+Slq9VqmYBaANTsLzkR5n4xBGVHg1d y313Yw8sBIi1YvMgfc2hg53sfoPM22L3nb3ZUvQcbY++9nxFdGZmRd2W4k4XtJGZznD6qWr 72ZjIUSxC6jswCR+Cx8TnX77Wb2uc0lBjJbDu2HWnaWFZAgkfQnz9tZ93bPNyvw1cXnMBFo Vbiyx4I5+wW2ZZBS1J8Jg== X-UI-Out-Filterresults: notjunk:1; V01:K0:13eNAk/KnhE=:tR93KxZi4dsjEGyw7MNzp+ UncFSmm22D0ZZlg6xOEoni1cRp41VHob5fJ/1H63IYOP7ihg0A7ARo7ahXDW6LbjyirqlXdlW /MkxPMOpbNZHHhfJTcAokAHW6P6CFPOZWuxlyNK897PD3YuGLHjdb0b18GTVHyvBqhsBpOo0H bVWfo3vBV2z7qaMqWr0fKsk9t8/w4BAEa29Z+jTHQm+bZyXbr+PRK9EkDADF2Zy3FFEPtOl6Q d2NgMQCGC4t3r0VSK3m4uh5ZoZ48rUHwFbBCw1cD0FNQF3gR531TZc4KKTGFxhG7yP8IXBY4u /IczVYWoy6S8KujLERZIyFlNR+cGntwK4nQQ5LuspJe+3zZydPPTVM5vKO+IRD+ye7HChuQqU E/XTraKSVGKqK7N0PCck7KtMluuXNAcSK2rLTf6GHKnM1KV1b4tK3Bn4w9kkitogiFkADz7UQ 1q77FzoV0O08tBKUkuRrBFwMo7UMAK/jUdGwuw6iiaiZrDQeGvWfjngyu5j0W/44hRAMaKUfj vLNn67zvZqvolPU8l+2yPvj5ffZ9jsIJ+1vPrIrmGzdyTOYlAcPVwemc9tBUXNypgqMXMNieD mNpZxITwDfAr/iwdmFokGo5zSYs3IqaqYBfCEWir9LUx2SGL+JE5qv0gKlszGg5caJ/uIcywz 9rXkoiG93dOkmijwu8mRHQiytb3d285GPQRgt968LIZq5AwOnMTjsk1l7m+I/xpwMghw= Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/media/dvb-frontends/s921.c: In function 's921_pll_tune': arch/arm/include/asm/div64.h:109: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' arch/arm/include/asm/div64.h:127: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' arch/arm/include/asm/div64.h:109: error: 'asm' operand has impossible constraints arch/arm/include/asm/div64.h:127: error: 'asm' operand has impossible constraints scripts/Makefile.build:299: recipe for target 'drivers/media/dvb-frontends/s921.o' failed Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/div64.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h index 7ca0c613c33b..e1c8d4a58797 100644 --- a/arch/arm/include/asm/div64.h +++ b/arch/arm/include/asm/div64.h @@ -66,27 +66,16 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base) */ #define do_div(n, base) __div64_32(&(n), base) -#elif defined(CONFIG_CPU_32v3) +#elif GCC_VERSION < 40600 /* - * modern compiler versions (>= gcc-4.9) tend to misoptimize - * the code for ARMv3, and this is not getting fixed any more. + * gcc-4.4 and gcc-4.5 tend to run out of registers in their + * register allocation in some functions */ #define do_div(n, base) __div64_32(&(n), base) #else -/* - * gcc versions earlier than 4.0 are simply too problematic for the - * __div64_const32() code in asm-generic/div64.h. First there is - * gcc PR 15089 that tend to trig on more complex constructs, spurious - * .global __udivsi3 are inserted even if none of those symbols are - * referenced in the generated code, and those gcc versions are not able - * to do constant propagation on long long values anyway. - */ - -#define __div64_const32_is_OK (__GNUC__ >= 4) - static inline uint64_t __arch_xprod_64(uint64_t m, uint64_t n, bool bias) { unsigned long long res;