From ca71275bbecc7db9a4eeca3a6ac4215b66de4318 Mon Sep 17 00:00:00 2001 From: TakaRikka <38417346+TakaRikka@users.noreply.github.com> Date: Mon, 19 Dec 2022 11:06:32 -0800 Subject: big d_a_alink pass (#214) * d_a_alink pass1 wip * more d_a_alink work * remove asm * more daalink work * 20% dol code decompiled * fixed some nonmatchings for building * a few daalink functions and labeling some HIO data --- include/JSystem/JMath/JMath.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/JSystem/JMath') diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h index 71bad19d43..5b6b2c5978 100644 --- a/include/JSystem/JMath/JMath.h +++ b/include/JSystem/JMath/JMath.h @@ -11,9 +11,19 @@ inline f32 JMAFastReciprocal(f32 value) { return __fres(value); } +inline float __frsqrtes(register double f) { + register float out; + // clang-format off + asm { + frsqrte out, f + } + // clang-format on + return out; +} + inline f32 JMAFastSqrt(f32 input) { if (input > 0.0f) { - f64 tmp = __frsqrte(input); + f32 tmp = __frsqrtes(input); return tmp * input; } return input; -- cgit v1.2.3