All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: arm64 softfloat
Date: Tue, 2 Jun 2015 19:51:12 +0300	[thread overview]
Message-ID: <20150602195112.5d178bb7@opensuse.site> (raw)
In-Reply-To: <556DDBCC.3000500@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3635 bytes --]

В Tue, 02 Jun 2015 18:37:32 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:

> On 02.06.2015 16:55, Leif Lindholm wrote:
> > On Tue, Jun 02, 2015 at 02:25:15PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> >> Please give more details as to where we have floats. We shouldn't have any
> > 
> > Ok, seems I was tripping over myself with the internal compiler error
> > workaround (-mgeneral-regs-only), and applying it on the host tools
> > as well, where +nofp was (correctly) not being enforced, causing a
> > clash.
> > 
> What is the relation of -mgeneral-regs-only with +nofp? The decription
> of -mgeneral-regs-only in manual is very vague

According to
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0774a/chr1392305446662.html

1.16 -mgeneral-regs-only

Prevents the use of floating-point instructions or floating-point registers.
Note
The -mgeneral-regs-only option is only valid with the aarch64-arm-none-eabi target. Use -mfpu=none to prevent the use of floating-point instructions or floating-point registers for the armv8a-arm-none-eabi target.

The description is for armclang; we can just hope that GCC is using the
same semantic.

> > So, rewinding a bit - in order to work around the gcc 5.1 build issue
> > (which is not Fedora specific), we can use -mgeneral-regs-only
> > instead of -march=armv8-a+nofp. If we do this, we can also get
> > rid of the arm64-specific twiddling that drops the +nosimd.
> > 
> > Like so:
> > 
> >>From 43d4231432838821cabe4f6aea4f0f50e87af9c4 Mon Sep 17 00:00:00 2001
> > From: Leif Lindholm <leif.lindholm@linaro.org>
> > Date: Tue, 2 Jun 2015 15:41:09 +0100
> > Subject: [PATCH] configure.ac: clean up arm64 soft-float handling
> > 
> > Fix compilation with gcc 5.1 (avoid internal compiler error), by
> > replacing explicit -march +nofp+nosimd options with -mgeneral-regs-only.
> > 
> > This also enables the removal of some further conditional build flag
> > setting.
> > ---
> >  configure.ac | 14 +++-----------
> >  1 file changed, 3 insertions(+), 11 deletions(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 891c14f..fd8a62e 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -686,9 +686,9 @@ 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"
> > +       CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only -Werror"
> >         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
> > -		         [grub_cv_target_cc_soft_float="-march=armv8-a+nofp+nosimd"], [])
> > +		         [grub_cv_target_cc_soft_float="-mgeneral-regs-only"], [])
> >      fi
> >      if test "x$target_cpu" = xia64; then
> >         CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt -Werror"
> > @@ -720,15 +720,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
> >  
> > 
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2015-06-02 16:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 12:09 arm64 softfloat Leif Lindholm
2015-06-02 12:25 ` Vladimir 'phcoder' Serbinenko
2015-06-02 14:55   ` Leif Lindholm
2015-06-02 16:37     ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-06-02 16:51       ` Andrei Borzenkov [this message]
2015-06-03 11:06         ` Leif Lindholm
2015-06-03 16:29           ` Andrei Borzenkov
2015-06-03 16:52             ` Leif Lindholm
2015-06-03 18:10               ` Andrei Borzenkov
2015-06-03 18:12                 ` Vladimir 'phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150602195112.5d178bb7@opensuse.site \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=phcoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.