Skip to content

Commit

Permalink
Document more instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Dec 11, 2023
1 parent a5d017e commit 6d594a8
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,31 @@ GCC Intrinsic: <https://gcc.gnu.org/onlinedocs/gcc/LoongArch-SX-Vector-Intrinsic

### vfmadd.s/d

Vector Fused Multiply Add Single/Double Precision
Vector Fused Multiply Add (`a * b + c`) Single/Double Precision

- Single Precision: `__m128 __lsx_vfmadd_s (__m128 a, __m128 b, __m128 c)`
- Double Precision: `__m128d __lsx_vfmadd_d (__m128d a, __m128d b, __m128d c)`

### vfmsub.s/d

Vector Fused Multiply Subtract Single/Double Precision
Vector Fused Multiply Subtract (`a * b - c`) Single/Double Precision

- Single Precision: `__m128 __lsx_vfmsub_s (__m128 a, __m128 b, __m128 c)`
- Double Precision: `__m128d __lsx_vfmsub_d (__m128d a, __m128d b, __m128d c)`

### vfnmadd.s/d

### vnfmadd.s/d
Vector Fused Negative Multiply Add (`- a * b - c`) Single/Double Precision

Vector Negative Fused Multiply Add Single/Double Precision
- Single Precision: `__m128 __lsx_vfnmadd_s (__m128 a, __m128 b, __m128 c)`
- Double Precision: `__m128d __lsx_vfnmadd_d (__m128d a, __m128d b, __m128d c)`

### vnfmsub.s/d
### vfnmsub.s/d

Vector Negative Fused Multiply Subtract Single/Double Precision
Vector Fused Negative Multiply Subtract (`- a * b + c`) Single/Double Precision

- Single Precision: `__m128 __lsx_vfnmsub_s (__m128 a, __m128 b, __m128 c)`
- Double Precision: `__m128d __lsx_vfnmsub_d (__m128d a, __m128d b, __m128d c)`

### vfcmp.cond.s/d

Expand All @@ -30,12 +42,16 @@ Vector Float Compare

### vbitsel.v

Vector Bit Selection
Vector Bit Selection: For each bit, `c ? b : a`

`__m128i __lsx_vbitsel_v (__m128i a, __m128i b, __m128i c)`

### vshuf.b

Vector Shuffle

`__m128i __lsx_vshuf_b (__m128i a, __m128i b, __m128i c)`

### vld

Vector Load
Expand Down

0 comments on commit 6d594a8

Please sign in to comment.