dquakeplus/source/libpspmath/vfpu_logf.c

15 lines
339 B
C
Raw Normal View History

2022-02-08 21:49:56 +00:00
#include "pspmath.h"
float vfpu_logf(float x) {
float result;
__asm__ volatile (
"mtv %1, S000\n"
"vcst.s S001, VFPU_LOG2E\n"
"vrcp.s S001, S001\n"
"vlog2.s S000, S000\n"
"vmul.s S000, S000, S001\n"
"mfv %0, S000\n"
: "=r"(result) : "r"(x));
return result;
}