llvm-toolchain/debian/patches/mips/mips-force-nomadd4.patch
2022-04-07 13:29:24 +02:00

22 lines
1004 B
Diff

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.
Index: llvm-toolchain-snapshot_15~++20220407011631+46f0e2ceb487/clang/lib/Basic/Targets/Mips.h
===================================================================
--- llvm-toolchain-snapshot_15~++20220407011631+46f0e2ceb487.orig/clang/lib/Basic/Targets/Mips.h
+++ llvm-toolchain-snapshot_15~++20220407011631+46f0e2ceb487/clang/lib/Basic/Targets/Mips.h
@@ -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")