NMSIS-Core
Version 1.2.0
NMSIS-Core support for Nuclei processor-based devices
|
(RV64 Only) SIMD 32-bit Add/Subtract Instructions More...
Functions | |
__STATIC_FORCEINLINE unsigned long | __RV_ADD32 (unsigned long a, unsigned long b) |
ADD32 (SIMD 32-bit Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_CRAS32 (unsigned long a, unsigned long b) |
CRAS32 (SIMD 32-bit Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_CRSA32 (unsigned long a, unsigned long b) |
CRSA32 (SIMD 32-bit Cross Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_KADD32 (unsigned long a, unsigned long b) |
KADD32 (SIMD 32-bit Signed Saturating Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_KCRAS32 (unsigned long a, unsigned long b) |
KCRAS32 (SIMD 32-bit Signed Saturating Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_KCRSA32 (unsigned long a, unsigned long b) |
KCRSA32 (SIMD 32-bit Signed Saturating Cross Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_KSTAS32 (unsigned long a, unsigned long b) |
KSTAS32 (SIMD 32-bit Signed Saturating Straight Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_KSTSA32 (unsigned long a, unsigned long b) |
KSTSA32 (SIMD 32-bit Signed Saturating Straight Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_KSUB32 (unsigned long a, unsigned long b) |
KSUB32 (SIMD 32-bit Signed Saturating Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_RADD32 (unsigned long a, unsigned long b) |
RADD32 (SIMD 32-bit Signed Halving Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_RCRAS32 (unsigned long a, unsigned long b) |
RCRAS32 (SIMD 32-bit Signed Halving Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_RCRSA32 (unsigned long a, unsigned long b) |
RCRSA32 (SIMD 32-bit Signed Halving Cross Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_RSTAS32 (unsigned long a, unsigned long b) |
RSTAS32 (SIMD 32-bit Signed Halving Straight Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_RSTSA32 (unsigned long a, unsigned long b) |
RSTSA32 (SIMD 32-bit Signed Halving Straight Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_RSUB32 (unsigned long a, unsigned long b) |
RSUB32 (SIMD 32-bit Signed Halving Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_STAS32 (unsigned long a, unsigned long b) |
STAS32 (SIMD 32-bit Straight Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_STSA32 (unsigned long a, unsigned long b) |
STSA32 (SIMD 32-bit Straight Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_SUB32 (unsigned long a, unsigned long b) |
SUB32 (SIMD 32-bit Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_UKADD32 (unsigned long a, unsigned long b) |
UKADD32 (SIMD 32-bit Unsigned Saturating Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_UKCRAS32 (unsigned long a, unsigned long b) |
UKCRAS32 (SIMD 32-bit Unsigned Saturating Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_UKCRSA32 (unsigned long a, unsigned long b) |
UKCRSA32 (SIMD 32-bit Unsigned Saturating Cross Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_UKSTAS32 (unsigned long a, unsigned long b) |
UKSTAS32 (SIMD 32-bit Unsigned Saturating Straight Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_UKSTSA32 (unsigned long a, unsigned long b) |
UKSTSA32 (SIMD 32-bit Unsigned Saturating Straight Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_UKSUB32 (unsigned long a, unsigned long b) |
UKSUB32 (SIMD 32-bit Unsigned Saturating Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_URADD32 (unsigned long a, unsigned long b) |
URADD32 (SIMD 32-bit Unsigned Halving Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_URCRAS32 (unsigned long a, unsigned long b) |
URCRAS32 (SIMD 32-bit Unsigned Halving Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_URCRSA32 (unsigned long a, unsigned long b) |
URCRSA32 (SIMD 32-bit Unsigned Halving Cross Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_URSTAS32 (unsigned long a, unsigned long b) |
URSTAS32 (SIMD 32-bit Unsigned Halving Straight Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_URSTSA32 (unsigned long a, unsigned long b) |
URSTSA32 (SIMD 32-bit Unsigned Halving Straight Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_URSUB32 (unsigned long a, unsigned long b) |
URSUB32 (SIMD 32-bit Unsigned Halving Subtraction) More... | |
(RV64 Only) SIMD 32-bit Add/Subtract Instructions
The following tables list instructions that are only present in RV64. There are 30 SIMD 32-bit addition or subtraction instructions.there are 4 SIMD16-bit Packing Instructions.
__STATIC_FORCEINLINE unsigned long __RV_ADD32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
ADD32 (SIMD 32-bit Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit integer element additions simultaneously.
Description:
This instruction adds the 32-bit integer elements in Rs1 with the 32-bit integer elements in Rs2, and then writes the 32-bit element results to Rd.
Note:
This instruction can be used for either signed or unsigned addition.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 13809 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_CRAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
CRAS32 (SIMD 32-bit Cross Addition & Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit integer element addition and 32-bit integer element subtraction in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements.
Description:
This instruction adds the 32-bit integer element in [63:32] of Rs1 with the 32-bit integer element in [31:0] of Rs2, and writes the result to [63:32] of Rd; at the same time, it subtracts the 32-bit integer element in [63:32] of Rs2 from the 32-bit integer element in [31:0] of Rs1, and writes the result to [31:0] of Rd.
Note:
This instruction can be used for either signed or unsigned operations.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 13852 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_CRSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
CRSA32 (SIMD 32-bit Cross Subtraction & Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit integer element subtraction and 32-bit integer element addition in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements. *Description: * This instruction subtracts the 32-bit integer element in [31:0] of Rs2 from the 32-bit integer element in [63:32] of Rs1, and writes the result to [63:32] of Rd; at the same time, it adds the 32-bit integer element in [31:0] of Rs1 with the 32-bit integer element in [63:32] of Rs2, and writes the result to [31:0] of Rd
Note:
This instruction can be used for either signed or unsigned operations.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 13894 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_KADD32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
KADD32 (SIMD 32-bit Signed Saturating Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element saturating additions simultaneously.
Description:
This instruction adds the 32-bit signed integer elements in Rs1 with the 32-bit signed integer elements in Rs2. If any of the results are beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to Rd.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 14000 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_KCRAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
KCRAS32 (SIMD 32-bit Signed Saturating Cross Addition & Subtraction)
Type: SIM (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element saturating addition and 32-bit signed integer element saturating subtraction in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements.
Description:
This instruction adds the 32-bit integer element in [63:32] of Rs1 with the 32-bit integer element in [31:0] of Rs2; at the same time, it subtracts the 32-bit integer element in [63:32] of Rs2 from the 32-bit integer element in [31:0] of Rs1. If any of the results are beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [63:32] of Rd for addition and [31:0] of Rd for subtraction.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 14051 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_KCRSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
KCRSA32 (SIMD 32-bit Signed Saturating Cross Subtraction & Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element saturating subtraction and 32-bit signed integer element saturating addition in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements. *Description: * This instruction subtracts the 32-bit integer element in [31:0] of Rs2 from the 32-bit integer element in [63:32] of Rs1; at the same time, it adds the 32-bit integer element in [31:0] of Rs1 with the 32-bit integer element in [63:32] of Rs2. If any of the results are beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [63:32] of Rd for subtraction and [31:0] of Rd for addition.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 14101 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_KSTAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
KSTAS32 (SIMD 32-bit Signed Saturating Straight Addition & Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element saturating addition and 32-bit signed integer element saturating subtraction in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements.
Description:
This instruction adds the 32-bit integer element in [63:32] of Rs1 with the 32-bit integer element in [63:32] of Rs2; at the same time, it subtracts the 32-bit integer element in [31:0] of Rs2 from the 32-bit integer element in [31:0] of Rs1. If any of the results are beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [63:32] of Rd for addition and [31:0] of Rd for subtraction.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 15603 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_KSTSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
KSTSA32 (SIMD 32-bit Signed Saturating Straight Subtraction & Addition)
Type: SIM (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element saturating subtraction and 32-bit signed integer element saturating addition in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements. *Description: * This instruction subtracts the 32-bit integer element in [63:32] of Rs2 from the 32-bit integer element in [63:32] of Rs1; at the same time, it adds the 32-bit integer element in [31:0] of Rs1 with the 32-bit integer element in [31:0] of Rs2. If any of the results are beyond the Q31 number range ( -2^31 <= Q31 <= 2^31-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [63:32] of Rd for subtraction and [31:0] of Rd for addition.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 15654 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_KSUB32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
KSUB32 (SIMD 32-bit Signed Saturating Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer elements saturating subtractions simultaneously.
Description:
This instruction subtracts the 32-bit signed integer elements in Rs2 from the 32-bit signed integer elements in Rs1. If any of the results are beyond the Q31 number range (-2^31 <= Q31 <= 2^31-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to Rd.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 15701 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_RADD32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
RADD32 (SIMD 32-bit Signed Halving Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element additions simultaneously. The results are halved to avoid overflow or saturation.
Description:
This instruction adds the 32-bit signed integer elements in Rs1 with the 32-bit signed integer elements in Rs2. The results are first arithmetically right-shifted by 1 bit and then written to Rd.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 15939 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_RCRAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
RCRAS32 (SIMD 32-bit Signed Halving Cross Addition & Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element addition and 32-bit signed integer element subtraction in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements. The results are halved to avoid overflow or saturation.
Description:
This instruction adds the 32-bit signed integer element in [63:32] of Rs1 with the 32-bit signed integer element in [31:0] of Rs2, and subtracts the 32-bit signed integer element in [63:32] of Rs2 from the 32-bit signed integer element in [31:0] of Rs1. The element results are first arithmetically right-shifted by 1 bit and then written to [63:32] of Rd for addition and [31:0] of Rd for subtraction.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 15986 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_RCRSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
RCRSA32 (SIMD 32-bit Signed Halving Cross Subtraction & Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element subtraction and 32-bit signed integer element addition in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements. The results are halved to avoid overflow or saturation.
Description:
This instruction subtracts the 32-bit signed integer element in [31:0] of Rs2 from the 32-bit signed integer element in [63:32] of Rs1, and adds the 32-bit signed element integer in [31:0] of Rs1 with the 32-bit signed integer element in [63:32] of Rs2. The two results are first arithmetically right-shifted by 1 bit and then written to [63:32] of Rd for subtraction and [31:0] of Rd for addition.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 16033 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_RSTAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
RSTAS32 (SIMD 32-bit Signed Halving Straight Addition & Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element addition and 32-bit signed integer element subtraction in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements. The results are halved to avoid overflow or saturation.
Description:
This instruction adds the 32-bit signed integer element in [63:32] of Rs1 with the 32-bit signed integer element in [63:32] of Rs2, and subtracts the 32-bit signed integer element in [31:0] of Rs2 from the 32-bit signed integer element in [31:0] of Rs1. The element results are first arithmetically right-shifted by 1 bit and then written to [63:32] of Rd for addition and [31:0] of Rd for subtraction.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 16080 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_RSTSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
RSTSA32 (SIMD 32-bit Signed Halving Straight Subtraction & Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element subtraction and 32-bit signed integer element addition in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements. The results are halved to avoid overflow or saturation.
Description:
This instruction subtracts the 32-bit signed integer element in [63:32] of Rs2 from the 32-bit signed integer element in [63:32] of Rs1, and adds the 32-bit signed element integer in [31:0] of Rs1 with the 32-bit signed integer element in [31:0] of Rs2. The two results are first arithmetically right-shifted by 1 bit and then written to [63:32] of Rd for subtraction and [31:0] of Rd for addition.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 16126 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_RSUB32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
RSUB32 (SIMD 32-bit Signed Halving Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit signed integer element subtractions simultaneously. The results are halved to avoid overflow or saturation.
Description:
This instruction subtracts the 32-bit signed integer elements in Rs2 from the 32-bit signed integer elements in Rs1. The results are first arithmetically right-shifted by 1 bit and then written to Rd.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 16172 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_STAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
STAS32 (SIMD 32-bit Straight Addition & Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit integer element addition and 32-bit integer element subtraction in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements.
Description:
This instruction adds the 32-bit integer element in [63:32] of Rs1 with the 32-bit integer element in [63:32] of Rs2, and writes the result to [63:32] of Rd; at the same time, it subtracts the 32-bit integer element in [31:0] of Rs2 from the 32-bit integer element in [31:0] of Rs1, and writes the result to [31:0] of Rd.
Note:
This instruction can be used for either signed or unsigned operations.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17147 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_STSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
STSA32 (SIMD 32-bit Straight Subtraction & Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit integer element subtraction and 32-bit integer element addition in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements. *Description: * This instruction subtracts the 32-bit integer element in [63:32] of Rs2 from the 32-bit integer element in [63:32] of Rs1, and writes the result to [63:32] of Rd; at the same time, it adds the 32-bit integer element in [31:0] of Rs1 with the 32-bit integer element in [31:0] of Rs2, and writes the result to [31:0] of Rd
Note:
This instruction can be used for either signed or unsigned operations.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17189 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_SUB32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
SUB32 (SIMD 32-bit Subtraction)
Type: DSP (RV64 Only)
Syntax:
Purpose:
Do 32-bit integer element subtractions simultaneously.
Description:
This instruction subtracts the 32-bit integer elements in Rs2 from the 32-bit integer elements in Rs1, and then writes the results to Rd.
Note:
This instruction can be used for either signed or unsigned subtraction.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17229 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_UKADD32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
UKADD32 (SIMD 32-bit Unsigned Saturating Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit unsigned integer element saturating additions simultaneously.
Description:
This instruction adds the 32-bit unsigned integer elements in Rs1 with the 32-bit unsigned integer elements in Rs2. If any of the results are beyond the 32-bit unsigned number range (0 <= RES <= 2^32-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to Rd.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17273 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_UKCRAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
UKCRAS32 (SIMD 32-bit Unsigned Saturating Cross Addition & Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do one 32-bit unsigned integer element saturating addition and one 32-bit unsigned integer element saturating subtraction in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements.
Description:
This instruction adds the 32-bit unsigned integer element in [63:32] of Rs1 with the 32- bit unsigned integer element in [31:0] of Rs2; at the same time, it subtracts the 32-bit unsigned integer element in [63:32] of Rs2 from the 32-bit unsigned integer element in [31:0] Rs1. If any of the results are beyond the 32-bit unsigned number range (0 <= RES <= 2^32-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [63:32] of Rd for addition and [31:0] of Rd for subtraction.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17326 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_UKCRSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
UKCRSA32 (SIMD 32-bit Unsigned Saturating Cross Subtraction & Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do one 32-bit unsigned integer element saturating subtraction and one 32-bit unsigned integer element saturating addition in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements.
Description:
This instruction subtracts the 32-bit unsigned integer element in [31:0] of Rs2 from the 32-bit unsigned integer element in [63:32] of Rs1; at the same time, it adds the 32-bit unsigned integer element in [63:32] of Rs2 with the 32-bit unsigned integer element in [31:0] Rs1. If any of the results are beyond the 32-bit unsigned number range (0 <= RES <= 2^32-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [63:32] of Rd for subtraction and [31:0] of Rd for addition.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17378 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_UKSTAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
UKSTAS32 (SIMD 32-bit Unsigned Saturating Straight Addition & Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do one 32-bit unsigned integer element saturating addition and one 32-bit unsigned integer element saturating subtraction in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements.
Description:
This instruction adds the 32-bit unsigned integer element in [63:32] of Rs1 with the 32- bit unsigned integer element in [63:32] of Rs2; at the same time, it subtracts the 32-bit unsigned integer element in [31:0] of Rs2 from the 32-bit unsigned integer element in [31:0] Rs1. If any of the results are beyond the 32-bit unsigned number range (0 <= RES <= 2^32-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [63:32] of Rd for addition and [31:0] of Rd for subtraction.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17431 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_UKSTSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
UKSTSA32 (SIMD 32-bit Unsigned Saturating Straight Subtraction & Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do one 32-bit unsigned integer element saturating subtraction and one 32-bit unsigned integer element saturating addition in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements.
Description:
This instruction subtracts the 32-bit unsigned integer element in [63:32] of Rs2 from the 32-bit unsigned integer element in [63:32] of Rs1; at the same time, it adds the 32-bit unsigned integer element in [31:0] of Rs2 with the 32-bit unsigned integer element in [31:0] Rs1. If any of the results are beyond the 32-bit unsigned number range (0 <= RES <= 2^32-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [63:32] of Rd for subtraction and [31:0] of Rd for addition.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17483 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_UKSUB32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
UKSUB32 (SIMD 32-bit Unsigned Saturating Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit unsigned integer elements saturating subtractions simultaneously.
Description:
This instruction subtracts the 32-bit unsigned integer elements in Rs2 from the 32-bit unsigned integer elements in Rs1. If any of the results are beyond the 32-bit unsigned number range (0 <= RES <= 2^32-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to Rd.
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17527 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_URADD32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
URADD32 (SIMD 32-bit Unsigned Halving Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit unsigned integer element additions simultaneously. The results are halved to avoid overflow or saturation.
Description:
This instruction adds the 32-bit unsigned integer elements in Rs1 with the 32-bit unsigned integer elements in Rs2. The results are first logically right-shifted by 1 bit and then written to Rd.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17649 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_URCRAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
URCRAS32 (SIMD 32-bit Unsigned Halving Cross Addition & Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit unsigned integer element addition and 32-bit unsigned integer element subtraction in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements. The results are halved to avoid overflow or saturation.
Description:
This instruction adds the 32-bit unsigned integer element in [63:32] of Rs1 with the 32- bit unsigned integer element in [31:0] of Rs2, and subtracts the 32-bit unsigned integer element in [63:32] of Rs2 from the 32-bit unsigned integer element in [31:0] of Rs1. The element results are first logically right-shifted by 1 bit and then written to [63:32] of Rd for addition and [31:0] of Rd for subtraction.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17696 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_URCRSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
URCRSA32 (SIMD 32-bit Unsigned Halving Cross Subtraction & Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit unsigned integer element subtraction and 32-bit unsigned integer element addition in a 64-bit chunk simultaneously. Operands are from crossed 32-bit elements. The results are halved to avoid overflow or saturation.
Description:
This instruction subtracts the 32-bit unsigned integer element in [31:0] of Rs2 from the 32-bit unsigned integer element in [63:32] of Rs1, and adds the 32-bit unsigned element integer in [31:0] of Rs1 with the 32-bit unsigned integer element in [63:32] of Rs2. The two results are first logically right-shifted by 1 bit and then written to [63:32] of Rd for subtraction and [31:0] of Rd for addition.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17743 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_URSTAS32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
URSTAS32 (SIMD 32-bit Unsigned Halving Straight Addition & Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit unsigned integer element addition and 32-bit unsigned integer element subtraction in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements. The results are halved to avoid overflow or saturation.
Description:
This instruction adds the 32-bit unsigned integer element in [63:32] of Rs1 with the 32- bit unsigned integer element in [63:32] of Rs2, and subtracts the 32-bit unsigned integer element in [31:0] of Rs2 from the 32-bit unsigned integer element in [31:0] of Rs1. The element results are first logically right-shifted by 1 bit and then written to [63:32] of Rd for addition and [31:0] of Rd for subtraction.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17790 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_URSTSA32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
URSTSA32 (SIMD 32-bit Unsigned Halving Straight Subtraction & Addition)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit unsigned integer element subtraction and 32-bit unsigned integer element addition in a 64-bit chunk simultaneously. Operands are from corresponding 32-bit elements. The results are halved to avoid overflow or saturation.
Description:
This instruction subtracts the 32-bit unsigned integer element in [63:32] of Rs2 from the 32-bit unsigned integer element in [63:32] of Rs1, and adds the 32-bit unsigned element integer in [31:0] of Rs1 with the 32-bit unsigned integer element in [31:0] of Rs2. The two results are first logically right-shifted by 1 bit and then written to [63:32] of Rd for subtraction and [31:0] of Rd for addition.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17837 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_URSUB32 | ( | unsigned long | a, |
unsigned long | b | ||
) |
URSUB32 (SIMD 32-bit Unsigned Halving Subtraction)
Type: SIMD (RV64 Only)
Syntax:
Purpose:
Do 32-bit unsigned integer element subtractions simultaneously. The results are halved to avoid overflow or saturation.
Description:
This instruction subtracts the 32-bit unsigned integer elements in Rs2 from the 32-bit unsigned integer elements in Rs1. The results are first logically right-shifted by 1 bit and then written to Rd.
Examples:
Operations:
[in] | a | unsigned long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 17883 of file core_feature_dsp.h.
References __ASM.