Update repo dependenc. Fixed minor nits to ensure it builds and passes tests under bazel. PiperOrigin-RevId: 656086467 Change-Id: I0ea0b8f2e324055c62af0ac5129c6b4ea2ebc01c
diff --git a/repos.bzl b/repos.bzl index 81f4ecd..51aaf51 100644 --- a/repos.bzl +++ b/repos.bzl
@@ -22,7 +22,7 @@ if not native.existing_rule("com_google_mpact-sim"): http_archive( name = "com_google_mpact-sim", - sha256 = "c728b2e381dd816957800432a58e66d6147e26e0b4be36c16239df1d43262579", - strip_prefix = "mpact-sim-cd487354e000c517790e3c3b6f6edc2e86149468", - url = "https://github.com/google/mpact-sim/archive/cd487354e000c517790e3c3b6f6edc2e86149468.tar.gz", + sha256 = "c76ab03055ce04fa5e305060bae131c016b86e1a95641593662b7e3944c60679", + strip_prefix = "mpact-sim-92cdc3e0405aa7237d2cac649686bc28075eb7e5", + url = "https://github.com/google/mpact-sim/archive/92cdc3e0405aa7237d2cac649686bc28075eb7e5.tar.gz", )
diff --git a/riscv/test/riscv_d_instructions_test.cc b/riscv/test/riscv_d_instructions_test.cc index f89a8c6..dfb2f8e 100644 --- a/riscv/test/riscv_d_instructions_test.cc +++ b/riscv/test/riscv_d_instructions_test.cc
@@ -128,8 +128,8 @@ if (!FPTypeInfo<double>::IsQNaN(lhs)) { flags = *FPExceptions::kInvalidOp; } - res = *reinterpret_cast<const double *>( - &FPTypeInfo<double>::kCanonicalNaN); + uint64_t val = FPTypeInfo<double>::kCanonicalNaN; + res = *reinterpret_cast<const double *>(&val); return std::tie(res, flags); }); }
diff --git a/riscv/test/riscv_f_instructions_test.cc b/riscv/test/riscv_f_instructions_test.cc index ae8c7f3..aa771ba 100644 --- a/riscv/test/riscv_f_instructions_test.cc +++ b/riscv/test/riscv_f_instructions_test.cc
@@ -110,8 +110,8 @@ if (!FPTypeInfo<float>::IsQNaN(lhs)) { flags = *FPExceptions::kInvalidOp; } - res = - *reinterpret_cast<const float *>(&FPTypeInfo<float>::kCanonicalNaN); + uint32_t val = FPTypeInfo<float>::kCanonicalNaN; + res = *reinterpret_cast<const float *>(&val); return std::tie(res, flags); }); }
diff --git a/riscv/test/riscv_vector_fp_unary_instructions_test.cc b/riscv/test/riscv_vector_fp_unary_instructions_test.cc index 2b364d3..43c6327 100644 --- a/riscv/test/riscv_vector_fp_unary_instructions_test.cc +++ b/riscv/test/riscv_vector_fp_unary_instructions_test.cc
@@ -914,9 +914,13 @@ inline std::tuple<T, uint32_t> VfsqrtvTestHelper(T vs2) { if (vs2 == 0.0) return std::make_tuple(vs2, 0); if (std::isnan(vs2) || (vs2 < 0.0)) { - return std::make_tuple( - *reinterpret_cast<const float *>(&FPTypeInfo<float>::kCanonicalNaN), - (uint32_t)FPExceptions::kInvalidOp); + auto val = FPTypeInfo<T>::kCanonicalNaN; + uint32_t flags = 0; + if (!mpact::sim::generic::FPTypeInfo<T>::IsQNaN(vs2)) { + flags = (uint32_t)FPExceptions::kInvalidOp; + } + return std::make_tuple(*reinterpret_cast<const T *>(&val), + (uint32_t)FPExceptions::kInvalidOp); } T res = sqrt(vs2);