diff --git a/README.md b/README.md index d301a3b4..1fd4f2db 100644 --- a/README.md +++ b/README.md @@ -188,8 +188,6 @@ Vector Multiplication High ### vsignconv.b/h/w/d -### vfadd.s/d - ### vfsub.s/d ### vfmul.s/d @@ -260,8 +258,6 @@ Vector Multiplication High ### vflogb.s/d -### vfclass.s/d - ### vfsqrt.s/d ### vfrecip.s/d diff --git a/docs/lsx/float_comparison.md b/docs/lsx/float_comparison.md index 729728cb..34fc55e9 100644 --- a/docs/lsx/float_comparison.md +++ b/docs/lsx/float_comparison.md @@ -1,4 +1,4 @@ -# Float Comparison +# Floating Point Comparison ## __m128i __lsx_vfcmp_cond_s (__m128 a, __m128 b) diff --git a/docs/lsx/float_computation.md b/docs/lsx/float_computation.md new file mode 100644 index 00000000..61b35b1b --- /dev/null +++ b/docs/lsx/float_computation.md @@ -0,0 +1,47 @@ +# Floating Point Computation + +## __m128d __lsx_vfadd_d (__m128d a, __m128d b) + +### Synopsis + +```c++ +__m128d __lsx_vfadd_d (__m128d a, __m128d b) +#include +Instruction: vfadd.d vr, vr, vr +CPU Flags: LSX +``` + +### Description + +Add double precision floating point elements in `a` to `b` and store the result in `dst`. + +### Operation + +```c++ +for (int i = 0;i < 2;i++) { + dst.fp64[i] = a.fp64[i] + b.fp64[i]; +} +``` + +## __m128 __lsx_vfadd_s (__m128 a, __m128 b) + +### Synopsis + +```c++ +__m128d __lsx_vfadd_s (__m128d a, __m128d b) +#include +Instruction: vfadd.s vr, vr, vr +CPU Flags: LSX +``` + +### Description + +Add single precision floating point elements in `a` to `b` and store the result in `dst`. + +### Operation + +```c++ +for (int i = 0;i < 4;i++) { + dst.fp32[i] = a.fp32[i] + b.fp32[i]; +} +``` diff --git a/docs/lsx/float_misc.md b/docs/lsx/float_misc.md new file mode 100644 index 00000000..d6b8c38c --- /dev/null +++ b/docs/lsx/float_misc.md @@ -0,0 +1,47 @@ +# Floatint Point Misc + +## __m128i __lsx_vfclass_d (__m128d a) + +### Synopsis + +```c++ +__m128i __lsx_vfclass_d (__m128d a) +#include +Instruction: vfclass.d vr, vr +CPU Flags: LSX +``` + +### Description + +Classifiy each double precision floating point elements in `a`. + +### Operation + +```c++ +for (int i = 0;i < 2;i++) { + dst.dword[i] = fp_classify(a.fp64[i]); +} +``` + +## __m128i __lsx_vfclass_s (__m128 a) + +### Synopsis + +```c++ +__m128i __lsx_vfclass_s (__m128d a) +#include +Instruction: vfclass.s vr, vr +CPU Flags: LSX +``` + +### Description + +Classifiy each single precision floating point elements in `a`. + +### Operation + +```c++ +for (int i = 0;i < 4;i++) { + dst.word[i] = fp_classify(a.fp32[i]); +} +```