From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Wed, 5 Jul 2017 08:59:48 +0000 Subject: [U-Boot] [PATCH 1/2] armv8: apply -mgeneral-regs-only In-Reply-To: References: <1499087648-9617-1-git-send-email-peng.fan@nxp.com> <20170704133249.GH9889@bill-the-cat> <20170704193829.GM9889@bill-the-cat> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de > -----Original Message----- > From: Dr. Philipp Tomsich [mailto:philipp.tomsich at theobroma-systems.com] > Sent: Wednesday, July 05, 2017 4:38 PM > To: Peng Fan > Cc: Tom Rini ; u-boot at lists.denx.de > Subject: Re: [U-Boot] [PATCH 1/2] armv8: apply -mgeneral-regs-only > > > > On 05 Jul 2017, at 03:23, Peng Fan wrote: > > > > > > > >> -----Original Message----- > >> From: Tom Rini [mailto:trini at konsulko.com] > >> Sent: Wednesday, July 05, 2017 3:38 AM > >> To: Dr. Philipp Tomsich > >> Cc: Peng Fan ; u-boot at lists.denx.de > >> Subject: Re: [U-Boot] [PATCH 1/2] armv8: apply -mgeneral-regs-only > >> > >> On Tue, Jul 04, 2017 at 06:38:10PM +0200, Dr. Philipp Tomsich wrote: > >>> Tom, > >>> > >>> Please note that some GCC versions had a code-generation bug when > >>> -mgeneral-regs-only was used (we hit this for a customer in a vendor > >>> GCC we maintain): > >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64304 > >>> > >>> Until everyone upgrades to a recently recent GCC (or until UBoot > >>> enforces this next January), some people may hit hard-to-reproduce > >>> issues. > >>> > >>> A better way to suppress SIMD generation would be to use: > >>> -march=armv8-a+nosimd > >> > >> Ah, good to know. Peng, please re-spin. > > > > According to https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html, > > There is no +nosimd for armv8-a. I also tried +nosimd, > > This is odd. When you look at > gcc/config/aarch64/aarch64-option-extensions.def > the “simd” option was there since the beginning of time for AArch64 (e.g. on > the gcc_4.8-branch — see https://github.com/gcc-mirror/gcc/blob/gcc-4_8- > branch/gcc/config/aarch64/aarch64-option-extensions.def) > and is still there today (see https://github.com/gcc- > mirror/gcc/blob/master/gcc/config/aarch64/aarch64-option-extensions.def) I am not GCC expert, what I can follow is the doc, although doc is not always accurate. > > I just tested the “armv8-a+nosimd” specification on (configured as aarch64-*- > linux-gnueabi) 4.9.1, 4.9.3, 5.4.0, 6.3.0 and (configured as aarch64-*-elf) 6.3.0 > and 7.1.0… …unfortunately this was all that I could find installed on our target > systems. > Then did you see simd registers are used? > > There is still "str q0, [x29,#112] ". If I use armv8-a+nofp, there is no > > such instructions. Then, do you agree using " armv8-a+nofp “? > > I don’t mind if we go with +nofp, but I would like to understand how it comes > that your GCC differs from the FSF-released GCC source tree… this worries me > a bit, as users might encounter similar differences in the field. I tried yocto 6.2.0 and android 4.9.x toolchain, both could generate instructions that use simd registers, not simd instructions. Regards, Peng. > > > Thanks, > > Peng. > > > >> > >>> > >>> Regards, > >>> Philipp. > >>> > >>>> On 04 Jul 2017, at 15:32, Tom Rini wrote: > >>>> > >>>> On Mon, Jul 03, 2017 at 09:14:07PM +0800, Peng Fan wrote: > >>>> > >>>>> Pass -mgeneral-regs-only to GCC, if not compiler may generate > >>>>> instructions that use SIMD registers. > >>>>> > >>>>> Signed-off-by: Peng Fan > >>>>> Cc: Albert Aribaud > >>>>> Cc: Tom Rini > >>>> > >>>> Reviewed-by: Tom Rini > >>>> > >>>> -- > >>>> Tom > >>>> _______________________________________________ > >>>> U-Boot mailing list > >>>> U-Boot at lists.denx.de > >>>> https://lists.denx.de/listinfo/u-boot > >>> > >> > >> -- > >> Tom