NMSIS-Core
Version 1.2.0
NMSIS-Core support for Nuclei processor-based devices
|
Signed 16-bit Multiply 32-bit Add/Subtract Instructions. More...
Functions | |
__STATIC_FORCEINLINE long | __RV_KMABB (long t, unsigned long a, unsigned long b) |
KMABB (SIMD Saturating Signed Multiply Bottom Halfs & Add) More... | |
__STATIC_FORCEINLINE long | __RV_KMABT (long t, unsigned long a, unsigned long b) |
KMABT (SIMD Saturating Signed Multiply Bottom & Top Halfs & Add) More... | |
__STATIC_FORCEINLINE long | __RV_KMATT (long t, unsigned long a, unsigned long b) |
KMATT (SIMD Saturating Signed Multiply Top Halfs & Add) More... | |
__STATIC_FORCEINLINE long | __RV_KMADA (long t, unsigned long a, unsigned long b) |
KMADA (SIMD Saturating Signed Multiply Two Halfs and Two Adds) More... | |
__STATIC_FORCEINLINE long | __RV_KMAXDA (long t, unsigned long a, unsigned long b) |
KMAXDA (SIMD Saturating Signed Crossed Multiply Two Halfs and Two Adds) More... | |
__STATIC_FORCEINLINE long | __RV_KMADS (long t, unsigned long a, unsigned long b) |
KMADS (SIMD Saturating Signed Multiply Two Halfs & Subtract & Add) More... | |
__STATIC_FORCEINLINE long | __RV_KMADRS (long t, unsigned long a, unsigned long b) |
KMADRS (SIMD Saturating Signed Multiply Two Halfs & Reverse Subtract & Add) More... | |
__STATIC_FORCEINLINE long | __RV_KMAXDS (long t, unsigned long a, unsigned long b) |
KMAXDS (SIMD Saturating Signed Crossed Multiply Two Halfs & Subtract & Add) More... | |
__STATIC_FORCEINLINE long | __RV_KMDA (unsigned long a, unsigned long b) |
KMDA (SIMD Signed Multiply Two Halfs and Add) More... | |
__STATIC_FORCEINLINE long | __RV_KMXDA (unsigned long a, unsigned long b) |
KMXDA (SIMD Signed Crossed Multiply Two Halfs and Add) More... | |
__STATIC_FORCEINLINE long | __RV_KMSDA (long t, unsigned long a, unsigned long b) |
KMSDA (SIMD Saturating Signed Multiply Two Halfs & Add & Subtract) More... | |
__STATIC_FORCEINLINE long | __RV_KMSXDA (long t, unsigned long a, unsigned long b) |
KMSXDA (SIMD Saturating Signed Crossed Multiply Two Halfs & Add & Subtract) More... | |
__STATIC_FORCEINLINE long | __RV_SMBB16 (unsigned long a, unsigned long b) |
SMBB16 (SIMD Signed Multiply Bottom Half & Bottom Half) More... | |
__STATIC_FORCEINLINE long | __RV_SMBT16 (unsigned long a, unsigned long b) |
SMBT16 (SIMD Signed Multiply Bottom Half & Top Half) More... | |
__STATIC_FORCEINLINE long | __RV_SMTT16 (unsigned long a, unsigned long b) |
SMTT16 (SIMD Signed Multiply Top Half & Top Half) More... | |
__STATIC_FORCEINLINE long | __RV_SMDS (unsigned long a, unsigned long b) |
SMDS (SIMD Signed Multiply Two Halfs and Subtract) More... | |
__STATIC_FORCEINLINE long | __RV_SMDRS (unsigned long a, unsigned long b) |
SMDRS (SIMD Signed Multiply Two Halfs and Reverse Subtract) More... | |
__STATIC_FORCEINLINE long | __RV_SMXDS (unsigned long a, unsigned long b) |
SMXDS (SIMD Signed Crossed Multiply Two Halfs and Subtract) More... | |
Signed 16-bit Multiply 32-bit Add/Subtract Instructions.
there are 18 Signed 16-bit Multiply 32-bit Add/Subtract Instructions
__STATIC_FORCEINLINE long __RV_KMABB | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMABB (SIMD Saturating Signed Multiply Bottom Halfs & Add)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 16-bit content of 32-bit elements in a register with the 16-bit content of 32-bit elements in another register and add the result to the content of 32-bit elements in the third register. The addition result may be saturated and is written to the third register.
Description:
For the KMABB
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2. For the KMABT
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. For the KMATT
instruction, it multiplies the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. The multiplication result is added to the content of 32-bit elements in Rd. If the addition result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 2705 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMABT | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMABT (SIMD Saturating Signed Multiply Bottom & Top Halfs & Add)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 16-bit content of 32-bit elements in a register with the 16-bit content of 32-bit elements in another register and add the result to the content of 32-bit elements in the third register. The addition result may be saturated and is written to the third register.
Description:
For the KMABB
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2. For the KMABT
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. For the KMATT
instruction, it multiplies the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. The multiplication result is added to the content of 32-bit elements in Rd. If the addition result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 2768 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMADA | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMADA (SIMD Saturating Signed Multiply Two Halfs and Two Adds)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from 32-bit elements in two registers; and then adds the two 32-bit results and 32-bit elements in a third register together. The addition result may be saturated.
Description:
For the `KMADA instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2 and then adds the result to the result of multiplying the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. For the KMAXDA
instruction, it multiplies the top 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2 and then adds the result to the result of multiplying the bottom 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. The result is added to the content of 32-bit elements in Rd. If the addition result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to 1. The 32-bit results after saturation are written to Rd. The 16-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 2895 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMADRS | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMADRS (SIMD Saturating Signed Multiply Two Halfs & Reverse Subtract & Add)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from 32-bit elements in two registers; and then perform a subtraction operation between the two 32-bit results. Then add the subtraction result to the corresponding 32-bit elements in a third register. The addition result may be saturated.
Description:
For the KMADS
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. For the KMADRS
instruction, it multiplies the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2 and then subtracts the result from the result of multiplying the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32- bit elements in Rs2. For the KMAXDS
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2. The subtraction result is then added to the content of the corresponding 32-bit elements in Rd. If the addition result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to 1. The 32-bit results after saturation are written to Rd. The 16-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 3103 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMADS | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMADS (SIMD Saturating Signed Multiply Two Halfs & Subtract & Add)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from 32-bit elements in two registers; and then perform a subtraction operation between the two 32-bit results. Then add the subtraction result to the corresponding 32-bit elements in a third register. The addition result may be saturated.
Description:
For the KMADS
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. For the KMADRS
instruction, it multiplies the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2 and then subtracts the result from the result of multiplying the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32- bit elements in Rs2. For the KMAXDS
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2. The subtraction result is then added to the content of the corresponding 32-bit elements in Rd. If the addition result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to 1. The 32-bit results after saturation are written to Rd. The 16-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 3031 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMATT | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMATT (SIMD Saturating Signed Multiply Top Halfs & Add)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 16-bit content of 32-bit elements in a register with the 16-bit content of 32-bit elements in another register and add the result to the content of 32-bit elements in the third register. The addition result may be saturated and is written to the third register.
Description:
For the KMABB
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2. For the KMABT
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. For the KMATT
instruction, it multiplies the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. The multiplication result is added to the content of 32-bit elements in Rd. If the addition result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 2831 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMAXDA | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMAXDA (SIMD Saturating Signed Crossed Multiply Two Halfs and Two Adds)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from 32-bit elements in two registers; and then adds the two 32-bit results and 32-bit elements in a third register together. The addition result may be saturated.
Description:
For the `KMADA instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2 and then adds the result to the result of multiplying the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. For the KMAXDA
instruction, it multiplies the top 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2 and then adds the result to the result of multiplying the bottom 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. The result is added to the content of 32-bit elements in Rd. If the addition result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to 1. The 32-bit results after saturation are written to Rd. The 16-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 2959 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMAXDS | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMAXDS (SIMD Saturating Signed Crossed Multiply Two Halfs & Subtract & Add)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from 32-bit elements in two registers; and then perform a subtraction operation between the two 32-bit results. Then add the subtraction result to the corresponding 32-bit elements in a third register. The addition result may be saturated.
Description:
For the KMADS
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2. For the KMADRS
instruction, it multiplies the top 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2 and then subtracts the result from the result of multiplying the bottom 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32- bit elements in Rs2. For the KMAXDS
instruction, it multiplies the bottom 16-bit content of 32-bit elements in Rs1 with the top 16-bit content of 32-bit elements in Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of 32-bit elements in Rs1 with the bottom 16-bit content of 32-bit elements in Rs2. The subtraction result is then added to the content of the corresponding 32-bit elements in Rd. If the addition result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to 1. The 32-bit results after saturation are written to Rd. The 16-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 3175 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMDA | ( | unsigned long | a, |
unsigned long | b | ||
) |
KMDA (SIMD Signed Multiply Two Halfs and Add)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from the 32-bit elements of two registers; and then adds the two 32-bit results together. The addition result may be saturated.
Description:
For the KMDA
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2 and then adds the result to the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32- bit elements of Rs2. For the KMXDA
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and then adds the result to the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. The addition result is checked for saturation. If saturation happens, the result is saturated to 2^31-1. The final results are written to Rd. The 16-bit contents are treated as signed integers.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 3293 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMSDA | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMSDA (SIMD Saturating Signed Multiply Two Halfs & Add & Subtract)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from the 32-bit elements of two registers; and then subtracts the two 32-bit results from the corresponding 32-bit elements of a third register. The subtraction result may be saturated.
Description:
For the KMSDA
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2 and multiplies the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. For the KMSXDA
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and multiplies the top 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. The two 32-bit multiplication results are then subtracted from the content of the corresponding 32- bit elements of Rd. If the subtraction result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to 1. The results after saturation are written to Rd. The 16-bit contents are treated as signed integers.
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 4393 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMSXDA | ( | long | t, |
unsigned long | a, | ||
unsigned long | b | ||
) |
KMSXDA (SIMD Saturating Signed Crossed Multiply Two Halfs & Add & Subtract)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from the 32-bit elements of two registers; and then subtracts the two 32-bit results from the corresponding 32-bit elements of a third register. The subtraction result may be saturated.
Description:
For the KMSDA
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2 and multiplies the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. For the KMSXDA
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and multiplies the top 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. The two 32-bit multiplication results are then subtracted from the content of the corresponding 32- bit elements of Rd. If the subtraction result is beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), it is saturated to the range and the OV bit is set to 1. The results after saturation are written to Rd. The 16-bit contents are treated as signed integers.
Operations:
[in] | t | long type of value stored in t |
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 4455 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_KMXDA | ( | unsigned long | a, |
unsigned long | b | ||
) |
KMXDA (SIMD Signed Crossed Multiply Two Halfs and Add)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from the 32-bit elements of two registers; and then adds the two 32-bit results together. The addition result may be saturated.
Description:
For the KMDA
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2 and then adds the result to the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32- bit elements of Rs2. For the KMXDA
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and then adds the result to the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. The addition result is checked for saturation. If saturation happens, the result is saturated to 2^31-1. The final results are written to Rd. The 16-bit contents are treated as signed integers.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 3344 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_SMBB16 | ( | unsigned long | a, |
unsigned long | b | ||
) |
SMBB16 (SIMD Signed Multiply Bottom Half & Bottom Half)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 16-bit content of the 32-bit elements of a register with the signed 16- bit content of the 32-bit elements of another register and write the result to a third register.
Description:
For the SMBB16
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. For the SMBT16
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. For the SMTT16
instruction, it multiplies the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. The multiplication results are written to Rd. The 16-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 8355 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_SMBT16 | ( | unsigned long | a, |
unsigned long | b | ||
) |
SMBT16 (SIMD Signed Multiply Bottom Half & Top Half)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 16-bit content of the 32-bit elements of a register with the signed 16- bit content of the 32-bit elements of another register and write the result to a third register.
Description:
For the SMBB16
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. For the SMBT16
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. For the SMTT16
instruction, it multiplies the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. The multiplication results are written to Rd. The 16-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 8407 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_SMDRS | ( | unsigned long | a, |
unsigned long | b | ||
) |
SMDRS (SIMD Signed Multiply Two Halfs and Reverse Subtract)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from the 32-bit elements of two registers; and then perform a subtraction operation between the two 32-bit results.
Description:
For the SMDS
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. For the SMDRS
instruction, it multiplies the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and then subtracts the result from the result of multiplying the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. For the SMXDS
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. The subtraction result is written to the corresponding 32-bit element of Rd. The 16-bit contents of multiplication are treated as signed integers.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 8577 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_SMDS | ( | unsigned long | a, |
unsigned long | b | ||
) |
SMDS (SIMD Signed Multiply Two Halfs and Subtract)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from the 32-bit elements of two registers; and then perform a subtraction operation between the two 32-bit results.
Description:
For the SMDS
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. For the SMDRS
instruction, it multiplies the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and then subtracts the result from the result of multiplying the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. For the SMXDS
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. The subtraction result is written to the corresponding 32-bit element of Rd. The 16-bit contents of multiplication are treated as signed integers.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 8518 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_SMTT16 | ( | unsigned long | a, |
unsigned long | b | ||
) |
SMTT16 (SIMD Signed Multiply Top Half & Top Half)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 16-bit content of the 32-bit elements of a register with the signed 16- bit content of the 32-bit elements of another register and write the result to a third register.
Description:
For the SMBB16
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. For the SMBT16
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. For the SMTT16
instruction, it multiplies the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. The multiplication results are written to Rd. The 16-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 8459 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long __RV_SMXDS | ( | unsigned long | a, |
unsigned long | b | ||
) |
SMXDS (SIMD Signed Crossed Multiply Two Halfs and Subtract)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications from the 32-bit elements of two registers; and then perform a subtraction operation between the two 32-bit results.
Description:
For the SMDS
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2. For the SMDRS
instruction, it multiplies the top 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and then subtracts the result from the result of multiplying the bottom 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. For the SMXDS
instruction, it multiplies the bottom 16-bit content of the 32-bit elements of Rs1 with the top 16-bit content of the 32-bit elements of Rs2 and then subtracts the result from the result of multiplying the top 16-bit content of the 32-bit elements of Rs1 with the bottom 16-bit content of the 32-bit elements of Rs2. The subtraction result is written to the corresponding 32-bit element of Rd. The 16-bit contents of multiplication are treated as signed integers.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 8636 of file core_feature_dsp.h.
References __ASM.