mips-force-nomadd4
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Fri, 18 Sep 2020 09:47:25 +0000 (10:47 +0100)
committerEmilio Pozuelo Monfort <pochu@debian.org>
Fri, 18 Sep 2020 09:47:25 +0000 (10:47 +0100)
The MIPS port aims to support the Loongson 3 family of CPUs in addition
of the other MIPS CPUs. On the Loongson 3 family the MADD4 instructions
are fused, while they are not fused on the other MIPS CPUs. In order to
support both, we have to disabled those instructions.

For that, the patch below basically corresponds to the --with-madd4=no
used on the GCC side.

Gbp-Pq: Name mips-force-nomadd4.diff

clang/lib/Basic/Targets/Mips.h

index 11e9ac914430ef3a4cf3b73366b47f3dac1ba654..c666eea7da4285da7f8a5abdb1b6471a3f729dba 100644 (file)
@@ -306,6 +306,7 @@ public:
     FloatABI = HardFloat;
     DspRev = NoDSP;
     HasFP64 = isFP64Default();
+    DisableMadd4 = true;
 
     for (const auto &Feature : Features) {
       if (Feature == "+single-float")