mips-force-nomadd4
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Tue, 7 Jul 2020 16:18:00 +0000 (17:18 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 7 Jul 2020 16:18:00 +0000 (17:18 +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 474cda84a40ec4c7af3c44c7dc2f82048f4c88cf..8b8f9236aef02ddcf0cfe61efd8fad3717502d5b 100644 (file)
@@ -312,6 +312,7 @@ public:
     FloatABI = HardFloat;
     DspRev = NoDSP;
     FPMode = isFP64Default() ? FP64 : FPXX;
+    DisableMadd4 = true;
 
     for (const auto &Feature : Features) {
       if (Feature == "+single-float")