mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-26 22:01:13 +00:00
12 lines
293 B
C
12 lines
293 B
C
#include "pspmath.h"
|
|
|
|
void vfpu_sincos(float r, float *s, float *c) {
|
|
__asm__ volatile (
|
|
"mtv %2, S002\n"
|
|
"vcst.s S003, VFPU_2_PI\n"
|
|
"vmul.s S002, S002, S003\n"
|
|
"vrot.p C000, S002, [s, c]\n"
|
|
"mfv %0, S000\n"
|
|
"mfv %1, S001\n"
|
|
: "=r"(*s), "=r"(*c): "r"(r));
|
|
}
|