From patchwork Tue Jun 2 12:09:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 49360 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 59CE620BD1 for ; Tue, 2 Jun 2015 12:09:34 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf41546206lbb.0 for ; Tue, 02 Jun 2015 05:09:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:subject:message-id :mime-version:content-disposition:user-agent:precedence:reply-to :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=difhMFPLPss7mavarhI+ZE1uwKcx0XIiNJ9SSuF0RWY=; b=QjGyzQ1bf5fwfg2Zat3E5igg4GT5Vn9Qvab0SQMXuwITaYDvVzacY3zx6G4lVPFIi4 R2dwQbLV6eUjL3C1EdUjd/3s/ldwK6U9DGdy3WV5L7GWivZs7i3f7H2JsZFLZ+vn2ap1 1A56d31OKzRHNq4AQN1G7Pr1T52Wq6C+A4C9uEvgNDC6EOpFzJmpCF7du1ba1ICn3KSj mNhorR+BUyNWa7psABEO8yDMntkhwGtC92MKotraaNIUK1dfO+xIh/Z+es9+QLTU4ugE qog+0NLCHLjOCiyQ60BvPyU0cjZSjgGfTVSNxqb5PMWr2T7OnTxZh8xTRNNeFtZ1ZFuD lx8Q== X-Gm-Message-State: ALoCoQm1tdqXct3p5tGO5lzMdTSLMqUyR6klL1MmmSLyz8ghyqNW3Ve/PVFQVbVvsaCH/CN1yCd5 X-Received: by 10.113.11.3 with SMTP id ee3mr25785359lbd.9.1433246972837; Tue, 02 Jun 2015 05:09:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.10 with SMTP id p10ls787734lag.29.gmail; Tue, 02 Jun 2015 05:09:32 -0700 (PDT) X-Received: by 10.152.87.108 with SMTP id w12mr25942765laz.57.1433246972683; Tue, 02 Jun 2015 05:09:32 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id q6si7284371lbs.169.2015.06.02.05.09.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 05:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbuc2 with SMTP id uc2so102964153lbb.2 for ; Tue, 02 Jun 2015 05:09:32 -0700 (PDT) X-Received: by 10.152.2.133 with SMTP id 5mr24401192lau.36.1433246972539; Tue, 02 Jun 2015 05:09:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3015571lbb; Tue, 2 Jun 2015 05:09:31 -0700 (PDT) X-Received: by 10.140.201.79 with SMTP id w76mr17176862qha.6.1433246971179; Tue, 02 Jun 2015 05:09:31 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c198si15473115qka.100.2015.06.02.05.09.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 05:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:58078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzl0c-0008W7-5i for patch@linaro.org; Tue, 02 Jun 2015 08:09:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzl0Y-0008W1-20 for grub-devel@gnu.org; Tue, 02 Jun 2015 08:09:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzl0T-0005w4-On for grub-devel@gnu.org; Tue, 02 Jun 2015 08:09:25 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:36025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzl0T-0005vv-Hy for grub-devel@gnu.org; Tue, 02 Jun 2015 08:09:21 -0400 Received: by wibdq8 with SMTP id dq8so56907252wib.1 for ; Tue, 02 Jun 2015 05:09:21 -0700 (PDT) X-Received: by 10.194.78.110 with SMTP id a14mr31619734wjx.87.1433246960911; Tue, 02 Jun 2015 05:09:20 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by mx.google.com with ESMTPSA id b10sm21313891wic.1.2015.06.02.05.09.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 05:09:20 -0700 (PDT) Date: Tue, 2 Jun 2015 13:09:17 +0100 From: Leif Lindholm To: grub-devel@gnu.org Subject: arm64 softfloat Message-ID: <20150602120917.GI8790@bivouac.eciton.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.212.171 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: grub-devel-bounces+patch=linaro.org@gnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Hi, As I mentioned yeaterday, I ran into some toolchain issues yesterday. When attempting my first build on Fedora 22, which uses GCC5.1, the build fails. First with an internal compiler error, and with a workaround for that, it simply refuses to go past. Basically, AArch64 (arm64) does not define a soft-float ABI. Recent versions of GCC now (presumably correctly) bails out when encountering floating-point if +nofp has been specified in -march flags. Also, the UEFI specification mandates that for aarch64 the cpu is configured such that floating-point exceptions are not generated - so it should be safe to generate floating-point instructions. So would it be possible to do something like the below?: >From a1821c9222bab447b2d3faccf69e518c65e0f638 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Mon, 1 Jun 2015 23:58:44 +0100 Subject: [PATCH] arm64: do not force-enable soft-float AArch64 (arm64) does not define a soft-float ABI. GCC5.1 now (presumably correctly) bails out when encountering floating-point if +nofp has been specified in -march flags. Also, the UEFI specification mandates that the cpu is configured such that floating-point exceptions are not generated - so it should be safe to generate floating-point instructions. So drop +nofp and +nosimd from configure.ac for arm64. Signed-off-by: Leif Lindholm --- configure.ac | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 891c14f..0a6d2e9 100644 --- a/configure.ac +++ b/configure.ac @@ -686,9 +686,8 @@ if test x"$platform" != xemu ; then AC_CACHE_CHECK([for options to get soft-float], grub_cv_target_cc_soft_float, [ grub_cv_target_cc_soft_float=no if test "x$target_cpu" = xarm64; then - CFLAGS="$TARGET_CFLAGS -march=armv8-a+nofp+nosimd -Werror" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], - [grub_cv_target_cc_soft_float="-march=armv8-a+nofp+nosimd"], []) + CFLAGS="$TARGET_CFLAGS -Werror" + grub_cv_target_cc_soft_float="" fi if test "x$target_cpu" = xia64; then CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt -Werror" @@ -720,15 +719,7 @@ if test x"$platform" != xemu ; then TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_soft_float" ;; esac - case x"$grub_cv_target_cc_soft_float" in - x"-march=armv8-a+nofp+nosimd") - # +nosimd disables also the cache opcodes that we need in asm. - TARGET_CCASFLAGS="$TARGET_CCASFLAGS -march=armv8-a+nofp" - ;; - *) - TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_soft_float" - ;; - esac + TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_soft_float" fi