From 084d057e754bb24afb24a7f5e5b171c83028204a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 9 Apr 2020 23:56:09 -0700 Subject: [PATCH] util: Enable neon when building arm/thumb versions of the m5 util. Apparently the presence of a hardware FPU is no longer implied by -march=armv7-a (or armv7 I assume), and so adding -mfpu=neon is necessary when using hardware floating point in gcc/g++. Change-Id: I59c5b58933fae2e4e5a747b2af128b801acc812e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27747 Maintainer: Gabe Black Tested-by: kokoro Reviewed-by: Jason Lowe-Power --- util/m5/src/abi/arm/SConsopts | 2 +- util/m5/src/abi/thumb/SConsopts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/m5/src/abi/arm/SConsopts b/util/m5/src/abi/arm/SConsopts index c94584d79..4988b7164 100644 --- a/util/m5/src/abi/arm/SConsopts +++ b/util/m5/src/abi/arm/SConsopts @@ -27,6 +27,6 @@ Import('*') env['ABI'] = 'arm' get_abi_opt('CROSS_COMPILE', 'arm-linux-gnueabihf-') -env.Append(CXXFLAGS='-march=armv7-a') +env.Append(CXXFLAGS=[ '-march=armv7-a', '-mfpu=neon' ]) env['CALL_TYPE']['inst'].impl('m5op.S', 'verify_inst.cc', default=True) diff --git a/util/m5/src/abi/thumb/SConsopts b/util/m5/src/abi/thumb/SConsopts index f2441cf44..f8956e3be 100644 --- a/util/m5/src/abi/thumb/SConsopts +++ b/util/m5/src/abi/thumb/SConsopts @@ -27,6 +27,6 @@ Import('*') env['ABI'] = 'thumb' get_abi_opt('CROSS_COMPILE', 'arm-linux-gnueabihf-') -env.Append(CXXFLAGS=[ '-mthumb', '-march=armv7' ]) +env.Append(CXXFLAGS=[ '-mthumb', '-march=armv7', '-mfpu=neon' ]) env['CALL_TYPE']['inst'].impl('m5op.S', 'verify_inst.cc', default=True) -- 2.30.2