mips-force-nomadd4
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Sun, 1 Jan 2023 14:46:39 +0000 (14:46 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sun, 1 Jan 2023 14:46:39 +0000 (14:46 +0000)
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 b54d36e1c95f2b74fc2023733e774dfa35aa549a..0c74508a813b38bfb0522022dce4a7d0054c250d 100644 (file)
@@ -332,6 +332,8 @@ public:
         HasMSA = true;
       else if (Feature == "+nomadd4")
         DisableMadd4 = true;
+      else if (Feature == "-nomadd4")
+        DisableMadd4 = false;
       else if (Feature == "+fp64")
         FPMode = FP64;
       else if (Feature == "-fp64")