From 82fe65475e2da4078922ccd95a4ef0ec08c53489 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Mon, 30 Nov 2015 17:22:08 -0800 Subject: [PATCH] Fixing sqrt/rsqrt mixup. Queue the 'how did this ever work?!' --- src/xenia/cpu/hir/value.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xenia/cpu/hir/value.cc b/src/xenia/cpu/hir/value.cc index ea395e0ec..d8f614a7e 100644 --- a/src/xenia/cpu/hir/value.cc +++ b/src/xenia/cpu/hir/value.cc @@ -464,10 +464,10 @@ void Value::Abs() { void Value::Sqrt() { switch (type) { case FLOAT32_TYPE: - constant.f32 = 1.0f / std::sqrt(constant.f32); + constant.f32 = std::sqrt(constant.f32); break; case FLOAT64_TYPE: - constant.f64 = 1.0 / std::sqrt(constant.f64); + constant.f64 = std::sqrt(constant.f64); break; default: assert_unhandled_case(type); @@ -478,10 +478,10 @@ void Value::Sqrt() { void Value::RSqrt() { switch (type) { case FLOAT32_TYPE: - constant.f32 = std::sqrt(constant.f32); + constant.f32 = 1.0f / std::sqrt(constant.f32); break; case FLOAT64_TYPE: - constant.f64 = std::sqrt(constant.f64); + constant.f64 = 1.0f / std::sqrt(constant.f64); break; default: assert_unhandled_case(type);