No public description

PiperOrigin-RevId: 971400408
Change-Id: I786ab9cf2b8e28931e68b9fde1fc4e8b375e4b69
diff --git a/riscv/riscv_f_instructions.cc b/riscv/riscv_f_instructions.cc
index 8f4257c..66c031c 100644
--- a/riscv/riscv_f_instructions.cc
+++ b/riscv/riscv_f_instructions.cc
@@ -284,7 +284,7 @@
           flag_db->Set<uint32_t>(0, *FPExceptions::kInvalidOp);
           flag_db->Submit();
         }
-        return internal::CanonicalizeNaN(fma(a, b, c));
+        return internal::CanonicalizeNaN(std::fma(a, b, c));
       });
 }
 
@@ -297,7 +297,7 @@
           flag_db->Set<uint32_t>(0, *FPExceptions::kInvalidOp);
           flag_db->Submit();
         }
-        return internal::CanonicalizeNaN(fma(a, b, -c));
+        return internal::CanonicalizeNaN(std::fma(a, b, -c));
       });
 }
 
@@ -310,7 +310,7 @@
           flag_db->Set<uint32_t>(0, *FPExceptions::kInvalidOp);
           flag_db->Submit();
         }
-        return internal::CanonicalizeNaN(fma(-a, b, -c));
+        return internal::CanonicalizeNaN(std::fma(-a, b, -c));
       });
 }
 
@@ -323,7 +323,7 @@
           flag_db->Set<uint32_t>(0, *FPExceptions::kInvalidOp);
           flag_db->Submit();
         }
-        return internal::CanonicalizeNaN(fma(-a, b, c));
+        return internal::CanonicalizeNaN(std::fma(-a, b, c));
       });
 }
 
diff --git a/riscv/riscv_zfh_instructions.cc b/riscv/riscv_zfh_instructions.cc
index 0a47069..1bb5313 100644
--- a/riscv/riscv_zfh_instructions.cc
+++ b/riscv/riscv_zfh_instructions.cc
@@ -890,7 +890,7 @@
 void RiscVZfhFmadd(const Instruction* instruction) {
   RiscVZfhTernaryHelper<HalfFP, float>(
       instruction,
-      [](float a, float b, float c) -> float { return fma(a, b, c); });
+      [](float a, float b, float c) -> float { return std::fma(a, b, c); });
 }
 
 // Fused multiply add in half precision. Do the operation in single precision.
@@ -898,7 +898,7 @@
 void RiscVZfhFmsub(const Instruction* instruction) {
   RiscVZfhTernaryHelper<HalfFP, float>(
       instruction,
-      [](float a, float b, float c) -> float { return fma(a, b, -c); });
+      [](float a, float b, float c) -> float { return std::fma(a, b, -c); });
 }
 
 // Fused multiply add in half precision. Do the operation in single precision.
@@ -906,7 +906,7 @@
 void RiscVZfhFnmadd(const Instruction* instruction) {
   RiscVZfhTernaryHelper<HalfFP, float>(
       instruction,
-      [](float a, float b, float c) -> float { return fma(-a, b, -c); });
+      [](float a, float b, float c) -> float { return std::fma(-a, b, -c); });
 }
 
 // Fused multiply add in half precision. Do the operation in single precision.
@@ -914,7 +914,7 @@
 void RiscVZfhFnmsub(const Instruction* instruction) {
   RiscVZfhTernaryHelper<HalfFP, float>(
       instruction,
-      [](float a, float b, float c) -> float { return fma(-a, b, c); });
+      [](float a, float b, float c) -> float { return std::fma(-a, b, c); });
 }
 
 // Convert from signed 32 bit integer to half precision.
diff --git a/riscv/test/riscv_f_instructions_test.cc b/riscv/test/riscv_f_instructions_test.cc
index 91177b2..b8f04de 100644
--- a/riscv/test/riscv_f_instructions_test.cc
+++ b/riscv/test/riscv_f_instructions_test.cc
@@ -54,6 +54,7 @@
 using ::mpact::sim::riscv::RV32::RiscVFCmplt;
 using ::mpact::sim::riscv::RV32::RiscVFCvtWs;
 using ::mpact::sim::riscv::RV32::RiscVFCvtWus;
+
 class RV32FInstructionTest
     : public RiscVFPInstructionTestBase<mpact::sim::riscv::RV32Register> {};
 
@@ -170,7 +171,7 @@
   TernaryOpWithFflagsFPTestHelper<float, float, float, float>(
       "fmadd", instruction_, {"f", "f", "f", "f"}, 32,
       [](float lhs, float mhs, float rhs) -> float {
-        return fma(lhs, mhs, rhs);
+        return std::fma(lhs, mhs, rhs);
       });
 }
 TEST_F(RV32FInstructionTest, RiscVFMsub) {
@@ -178,7 +179,7 @@
   TernaryOpWithFflagsFPTestHelper<float, float, float, float>(
       "fmsub", instruction_, {"f", "f", "f", "f"}, 32,
       [](float lhs, float mhs, float rhs) -> float {
-        return fma(lhs, mhs, -rhs);
+        return std::fma(lhs, mhs, -rhs);
       });
 }
 TEST_F(RV32FInstructionTest, RiscVFNmadd) {
@@ -186,7 +187,7 @@
   TernaryOpWithFflagsFPTestHelper<float, float, float, float>(
       "fnmadd", instruction_, {"f", "f", "f", "f"}, 32,
       [](float lhs, float mhs, float rhs) -> float {
-        return fma(-lhs, mhs, -rhs);
+        return std::fma(-lhs, mhs, -rhs);
       });
 }
 TEST_F(RV32FInstructionTest, RiscVFNmsub) {
@@ -194,7 +195,7 @@
   TernaryOpWithFflagsFPTestHelper<float, float, float, float>(
       "fnmsub", instruction_, {"f", "f", "f", "f"}, 32,
       [](float lhs, float mhs, float rhs) -> float {
-        return fma(-lhs, mhs, rhs);
+        return std::fma(-lhs, mhs, rhs);
       });
 }