Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] ci20_defconfig: disable madd instructions to avoid FPU bug
@ 2016-10-18 12:24 Vicente Olivert Riera
  2016-10-18 12:54 ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Vicente Olivert Riera @ 2016-10-18 12:24 UTC (permalink / raw)
  To: buildroot

MIPS Creator CI20 has an Ingenic JZ4780 SoC which features an XBurst
CPU. The FPU on that CPU has a bug that can generate incorrect results
in certain cases. The problem shows up when you have several of these
instructions in sequence with dependant operands.

Using the -mno-fused-madd option prevents gcc from emitting these
instructions.

More details here:
 - https://groups.google.com/forum/#!topic/mips-creator-ci20/spDB2jjbizM
 - https://android.googlesource.com/platform/build/+/90ce45347064210585a3a1f59a0514c22c753c8a

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 configs/ci20_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/ci20_defconfig b/configs/ci20_defconfig
index 0455170..1894554 100644
--- a/configs/ci20_defconfig
+++ b/configs/ci20_defconfig
@@ -8,6 +8,8 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y
 
 # system
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS4"
+# Avoid FPU bug
+BR2_TARGET_OPTIMIZATION="-mno-fused-madd"
 
 # kernel
 BR2_LINUX_KERNEL=y
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-10-22 12:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 12:24 [Buildroot] [PATCH] ci20_defconfig: disable madd instructions to avoid FPU bug Vicente Olivert Riera
2016-10-18 12:54 ` Thomas Petazzoni
2016-10-19  8:47   ` Vicente Olivert Riera
2016-10-19  9:31     ` Peter Korsgaard
2016-10-19  9:32     ` Thomas Petazzoni
2016-10-19 10:19       ` Vicente Olivert Riera
2016-10-21 19:45       ` Arnout Vandecappelle
2016-10-22 12:08         ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox