Date: Fri, 28 Feb 2014 19:16:21 +0000 From: Andrew Turner <andrew@fubar.geek.nz> To: Ian Lepore <ian@FreeBSD.org> Cc: freebsd-arm <freebsd-arm@FreeBSD.org> Subject: Re: wandboard / imx6 hard float Message-ID: <20140228191621.5dcb0c6d@bender.Home> In-Reply-To: <1393557827.1149.117.camel@revolution.hippie.lan> References: <1393557827.1149.117.camel@revolution.hippie.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Feb 2014 20:23:47 -0700 Ian Lepore <ian@FreeBSD.org> wrote: > After some testing last week I determined that hard float works on > imx6, so I enabled it (added option VFP) in the kernel configs. To > check whether it's enabled, see if "sysctl hw.floatingpoint" is set > to 1. > > To actually use the hardware floating point you have to add some > options to CFLAGS: > > * For clang CFLAGS="-mfloat-abi=softfp" > * For gcc CFLAGS="-mfloat-abi=softfp -mfpu=vfp" > * You can do that on the make command line, in the environment, > or in /etc/make.conf. > > I think the implication of float-abi=softfp is that floating point > arguments are passed in integer registers, and we're losing some > performance with that. But as I vaguely understand it, we're still > missing some piece of support code to enable full eabihf. Maybe > somebody who knows the status of that can fill in my hand-wavy blanks. You are correct. There are three values for float-abi: * soft - Use the software float library, pass float vales in integer registers. This is what we are currently using. * softfp - Use the VFP unit where available, also pass float values in integer registers * hard - Use the VFP unit where available, pass float values in vfp registers. The soft and softfp variants of the ABI are binary compatible. I am considering changing the default armv6 ABI to softfp as, as far as I can tell, all SoCs we support have a VFP unit. However it may be better to move to a hard-float ABI and leave armv6 as it is. The main thing blocking adding support for armv6hf was clang was missing the FreeBSD code to handle it, and our version of GCC is too old to support vfp with ARM EABI hard float. I also have some changes to the EABI helper functions to add a hard-float version. Most software compiled for the hardfloat ABI will not need them, however someone may call one of these functions directly so we should provide them. Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140228191621.5dcb0c6d>