mips-force-nomadd4
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 18 Dec 2024 09:01:43 +0000 (10:01 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 18 Dec 2024 09:01:43 +0000 (10:01 +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: Topic mips
Gbp-Pq: Name mips-force-nomadd4.patch

clang/lib/Basic/Targets/Mips.h

index b6f110249fa78e366a1d7e3b1901faa70d8a54b7..a2be5851d8f7f8198eb005d543808d0f67cb9e61 100644 (file)
@@ -349,7 +349,9 @@ public:
         HasMSA = true;
       else if (Feature == "+nomadd4")
         DisableMadd4 = true;
-      else if (Feature == "+fp64") {
+      else if (Feature == "-nomadd4")
+        DisableMadd4 = false;
+         else if (Feature == "+fp64") {
         FPMode = FP64;
         FpGiven = true;
       } else if (Feature == "-fp64") {