NMSIS-Core
Version 1.2.0
NMSIS-Core support for Nuclei processor-based devices
|
(RV32 only)Nuclei Customized N2 DSP Instructions More...
Macros | |
#define | __RV_DSCLIP8(a, b) |
DSCLIP8 (8-bit Signed Saturation and Clip) More... | |
#define | __RV_DSCLIP16(a, b) |
DSCLIP16 (16-bit Signed Saturation and Clip) More... | |
#define | __RV_DSCLIP32(a, b) |
DSCLIP32 (32-bit Signed Saturation and Clip) More... | |
Functions | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKHMX8 (unsigned long long a, unsigned long long b) |
DKHMX8 (64-bit SIMD Signed Crossed Saturating Q7 Multiply) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKHMX16 (unsigned long long a, unsigned long long b) |
DKHMX16 (64-bit SIMD Signed Crossed Saturating Q15 Multiply) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSMMUL (unsigned long long a, unsigned long long b) |
DSMMUL (64-bit MSW 32x32 Signed Multiply) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSMMUL_U (unsigned long long a, unsigned long long b) |
DSMMULU (64-bit MSW 32x32 Unsigned Multiply) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKWMMUL (unsigned long long a, unsigned long long b) |
DKWMMUL (64-bit MSW 32x32 Signed Multiply & Double) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKWMMUL_U (unsigned long long a, unsigned long long b) |
DKWMMULU (64-bit MSW 32x32 Unsigned Multiply & Double) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKABS32 (unsigned long long a) |
DKABS32 (64-bit SIMD 32-bit Saturating Absolute) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKSLRA32 (unsigned long long a, int b) |
DKSLRA32 (64-bit SIMD 32-bit Shift Left Logical with Saturation or Shift Right Arithmetic) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKADD32 (unsigned long long a, unsigned long long b) |
DKADD32(64-bit SIMD 32-bit Signed Saturating Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKSUB32 (unsigned long long a, unsigned long long b) |
DKSUB32 (64-bit SIMD 32-bit Signed Saturating Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DRADD16 (unsigned long long a, unsigned long long b) |
DRADD16 (64-bit SIMD 16-bit Halving Signed Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSUB16 (unsigned long long a, unsigned long long b) |
DSUB16 (64-bit SIMD 16-bit Halving Signed Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DRADD32 (unsigned long long a, unsigned long long b) |
DRADD32 (64-bit SIMD 32-bit Halving Signed Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSUB32 (unsigned long long a, unsigned long long b) |
DSUB32 (64-bit SIMD 32-bit Halving Signed Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DMSR16 (unsigned long a, unsigned long b) |
DMSR16 (Signed Multiply Halfs with Right Shift 16-bit and Cross Multiply Halfs with Right Shift 16-bit) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DMSR17 (unsigned long a, unsigned long b) |
DMSR17 (Signed Multiply Halfs with Right Shift 17-bit and Cross Multiply Halfs with Right Shift 17-bit) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DMSR33 (unsigned long long a, unsigned long long b) |
DMSR33 (Signed Multiply with Right Shift 33-bit and Cross Multiply with Right Shift 33-bit) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DMXSR33 (unsigned long long a, unsigned long long b) |
DMXSR33 (Signed Multiply with Right Shift 33-bit and Cross Multiply with Right Shift 33-bit) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_DREDAS16 (unsigned long long a) |
DREDAS16 (Reduced Addition and Reduced Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long | __RV_DREDSA16 (unsigned long long a) |
DREDSA16 (Reduced Subtraction and Reduced Addition) More... | |
__STATIC_FORCEINLINE int16_t | __RV_DKCLIP64 (unsigned long long a) |
DKCLIP64 (64-bit Clipped to 16-bit Saturation Value) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKMDA (unsigned long long a, unsigned long long b) |
DKMDA (Signed Multiply Two Halfs and Add) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKMXDA (unsigned long long a, unsigned long long b) |
DKMXDA (Signed Crossed Multiply Two Halfs and Add) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSMDRS (unsigned long long a, unsigned long long b) |
DSMDRS (Signed Multiply Two Halfs and Reverse Subtract) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSMXDS (unsigned long long a, unsigned long long b) |
DSMXDS (Signed Crossed Multiply Two Halfs and Subtract) More... | |
__STATIC_FORCEINLINE long long | __RV_DSMBB32 (unsigned long long a, unsigned long long b) |
DSMBB32 (Signed Multiply Bottom Word & Bottom Word) More... | |
__STATIC_FORCEINLINE long long | __RV_DSMBB32_SRA14 (unsigned long long a, unsigned long long b) |
DSMBB32.sra14 (Signed Crossed Multiply Two Halfs and Subtract with Right Shift 14) More... | |
__STATIC_FORCEINLINE long long | __RV_DSMBB32_SRA32 (unsigned long long a, unsigned long long b) |
DSMBB32.sra32 (Signed Crossed Multiply Two Halfs and Subtract with Right Shift 32) More... | |
__STATIC_FORCEINLINE long long | __RV_DSMBT32 (unsigned long long a, unsigned long long b) |
SMBT32 (Signed Multiply Bottom Word & Top Word) More... | |
__STATIC_FORCEINLINE long long | __RV_DSMBT32_SRA14 (unsigned long long a, unsigned long long b) |
DSMBT32.sra14 (Signed Multiply Bottom Word & Top Word with Right Shift 14) More... | |
__STATIC_FORCEINLINE long long | __RV_DSMBT32_SRA32 (unsigned long long a, unsigned long long b) |
DSMBT32.sra32 (Signed Crossed Multiply Two Halfs and Subtract with Right Shift 32) More... | |
__STATIC_FORCEINLINE long long | __RV_DSMTT32 (unsigned long long a, unsigned long long b) |
DSMTT32 (Signed Multiply Top Word & Top Word) More... | |
__STATIC_FORCEINLINE long long | __RV_DSMTT32_SRA14 (unsigned long long a, unsigned long long b) |
DSMTT32.sra14 (Signed Multiply Top Word & Top Word with Right Shift 14-bit) More... | |
__STATIC_FORCEINLINE long long | __RV_DSMTT32_SRA32 (unsigned long long a, unsigned long long b) |
DSMTT32.sra32 (Signed Multiply Top Word & Top Word with Right Shift 32-bit) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DPKBB32 (unsigned long long a, unsigned long long b) |
DPKBB32 (Pack Two 32-bit Data from Both Bottom Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DPKBT32 (unsigned long long a, unsigned long long b) |
DPKBT32 (Pack Two 32-bit Data from Bottom and Top Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DPKTT32 (unsigned long long a, unsigned long long b) |
DPKTT32 (Pack Two 32-bit Data from Both Top Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DPKTB32 (unsigned long long a, unsigned long long b) |
DPKTB32 (Pack Two 32-bit Data from Top and Bottom Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DPKTB16 (unsigned long long a, unsigned long long b) |
DPKTB16 (Pack Two 32-bit Data from Top and Bottom Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DPKBB16 (unsigned long long a, unsigned long long b) |
DPKBB16 (Pack Two 16-bit Data from Both Bottom Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DPKBT16 (unsigned long long a, unsigned long long b) |
DPKBT16 (Pack Two 16-bit Data from Bottom and Top Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DPKTT16 (unsigned long long a, unsigned long long b) |
DPKTT16 (Pack Two 16-bit Data from Both Top Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSRA16 (unsigned long long a, unsigned long b) |
DSRA16 (32-bit Signed Saturating Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DADD16 (unsigned long long a, unsigned long long b) |
DADD16 (16-bit Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DADD32 (unsigned long long a, unsigned long long b) |
DADD32 (32-bit Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSMBB16 (unsigned long long a, unsigned long long b) |
DSMBB16 (Signed Multiply Bottom Half & Bottom Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSMBT16 (unsigned long long a, unsigned long long b) |
DSMBT16 (Signed Multiply Bottom Half & Top Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSMTT16 (unsigned long long a, unsigned long long b) |
DSMTT16 (Signed Multiply Top Half & Top Half) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DRCRSA16 (unsigned long long a, unsigned long long b) |
DRCRSA16 (16-bit Signed Halving Cross Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DRCRSA32 (unsigned long long a, unsigned long long b) |
DRCRSA32 (32-bit Signed Halving CrossSubtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DRCRAS16 (unsigned long long a, unsigned long long b) |
DRCRAS16 (16-bit Signed Halving Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DRCRAS32 (unsigned long long a, unsigned long long b) |
DRCRAS32 (32-bit Signed Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKCRAS16 (unsigned long long a, unsigned long long b) |
DKCRAS16 (16-bit Signed Saturating Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKCRSA16 (unsigned long long a, unsigned long long b) |
DKCRSA16 (16-bit Signed Saturating Cross Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DRSUB16 (unsigned long long a, unsigned long long b) |
DRSUB16 (16-bit Signed Halving Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSTSA32 (unsigned long long a, unsigned long long b) |
DSTSA32 (32-bit Straight Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DSTAS32 (unsigned long long a, unsigned long long b) |
DSTAS32 (SIMD 32-bit Straight Addition & Subtractionn) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKCRSA32 (unsigned long long a, unsigned long long b) |
DKCRSA32 (32-bit Signed Saturating Cross Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKCRAS32 (unsigned long long a, unsigned long long b) |
DKCRAS32 (32-bit Signed Saturating Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DCRSA32 (unsigned long long a, unsigned long long b) |
DCRSA32 (32-bit Cross Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DCRAS32 (unsigned long long a, unsigned long long b) |
DCRAS32 (32-bit Cross Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKSTSA16 (unsigned long long a, unsigned long long b) |
DKSTSA16 (16-bit Signed Saturating Straight Subtraction & Addition) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DKSTAS16 (unsigned long long a, unsigned long long b) |
DKSTAS16 (16-bit Signed Saturating Straight Addition & Subtraction) More... | |
__STATIC_FORCEINLINE unsigned long long | __RV_DRSUB32 (unsigned long long a, unsigned long long b) |
DRSUB32 (32-bit Signed Halving Subtraction) More... | |
(RV32 only)Nuclei Customized N2 DSP Instructions
This is Nuclei customized DSP N2 instructions only for RV32
#define __RV_DSCLIP16 | ( | a, | |
b | |||
) |
DSCLIP16 (16-bit Signed Saturation and Clip)
Type: SIMD
Syntax:
Purpose:
Limit the 16-bit signed integer elements of a register into a signed range simultaneously.
Description:
This instruction limits the 16-bit signed integer elements stored in Rs1 into a signed integer range between -2^imm4u and 2^imm4u-1, and writes the limited results to Rd. For example, if imm4u is 3, the 32-bit input values should be saturated between 7 and -8. If saturation is performed, set OV bit to 1.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21486 of file core_feature_dsp.h.
#define __RV_DSCLIP32 | ( | a, | |
b | |||
) |
DSCLIP32 (32-bit Signed Saturation and Clip)
Type: SIMD
Syntax:
Purpose:
Limit the 32-bit signed integer elements of a register into a signed range simultaneously.
Description:
This instruction limits the 32-bit signed integer elements stored in Rs1 into a signed integer range between -2^imm5u and 2^imm5u-1, and writes the limited results to Rd. For example, if imm5u is 3, the 32-bit input values should be saturated between 7 and -8. If saturation is performed, set OV bit to 1.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21534 of file core_feature_dsp.h.
#define __RV_DSCLIP8 | ( | a, | |
b | |||
) |
DSCLIP8 (8-bit Signed Saturation and Clip)
Type: SIMD
Syntax:
Purpose:
Limit the 8-bit signed integer elements of a register into a signed range simultaneously.
Description:
This instruction limits the 8-bit signed integer elements stored in Rs1 into a signed integer range between -2^imm3u and 2^imm3u-1, and writes the limited results to Rd. For example, if imm3u is 3, the 8-bit input values should be saturated between 7 and -8. If saturation is performed, set OV bit to 1.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21438 of file core_feature_dsp.h.
__STATIC_FORCEINLINE unsigned long long __RV_DADD16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DADD16 (16-bit Addition)
Type: SIMD
Syntax:
Purpose:
Do 16-bit integer element additions simultaneously.
Description:
This instruction adds the 16-bit unsigned integer elements in Rs1 with the 16-bit unsigned integer elements in Rs2. And the results are written to Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20546 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DADD32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DADD32 (32-bit Addition)
Type: SIMD
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.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20584 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DCRAS32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DCRAS32 (32-bit Cross Addition & Subtraction)
Type: SIMD
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 subtracts 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 adds 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.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21281 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DCRSA32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DCRSA32 (32-bit Cross Subtraction & Addition)
Type: SIMD
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 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.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21241 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKABS32 | ( | unsigned long long | a | ) |
DKABS32 (64-bit SIMD 32-bit Saturating Absolute)
Type: SIMD
Syntax:
Purpose:
Get the absolute value of 32-bit signed integer elements simultaneously.
Description:
This instruction calculates the absolute value of 32-bit signed integer elements stored in Rs1 and writes the element results to Rd. If the input number is 0x8000_0000, this instruction generates 0x7fff_ffff as the output and sets the OV bit to 1.
Operations:
[in] | a | unsigned long long type of value stored in a |
Definition at line 19037 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKADD32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKADD32(64-bit SIMD 32-bit Signed Saturating Addition)
Type: SIMD
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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19137 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE int16_t __RV_DKCLIP64 | ( | unsigned long long | a | ) |
DKCLIP64 (64-bit Clipped to 16-bit Saturation Value)
Type: SIMD
Syntax:
Purpose:
Do 15-bit element arithmetic right shift operations and limit result into 32-bit int,then do saturate operation to 16-bit and clip result to 16-bit Q15.
Description:
For the DKCLIP64
instruction, shift the input 15 bits to the right and data convert the result to 32-bit int type, after which the input is saturated to limit the data to between 2^15-1 and -2^15. the result is converted to 16-bits q15 type. The final results are written to Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
Definition at line 19630 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKCRAS16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKCRAS16 (16-bit Signed Saturating Cross Addition & Subtraction)
Type: SIMD
Syntax:
Purpose:
Do 16-bit signed integer element saturating addition and 16-bit signed integer element saturating subtraction in a 32-bit chunk simultaneously. Operands are from crossed positions in 32-bit chunks.
Description:
This instruction adds the 16-bit signed integer element in [31:16] of 32-bit chunks in Rs1 with the 16-bit signed integer element in [15:0] of 32-bit chunks in Rs2; at the same time, it subtracts the 16-bit signed integer element in [31:16] of 32-bit chunks in Rs2 from the 16-bit signed integer element in [15:0] of 32-bit chunks in Rs1. If any of the results are beyond the Q15 number range (-2^15 <= Q15 <= 2^15-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [31:16] of 32-bit chunks in Rd for subtraction and [15:0] of 32-bit chunks in Rd for addition.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20928 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKCRAS32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKCRAS32 (32-bit Signed Saturating Cross Addition & Subtraction)
Type: SIMD
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 adds 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 subtracts 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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21201 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKCRSA16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKCRSA16 (16-bit Signed Saturating Cross Subtraction & Addition)
Type: SIMD
Syntax:
Purpose:
Do 16-bit signed integer element saturating subtraction and 16-bit signed integer element saturating addition in a 32-bit chunk simultaneously. Operands are from crossed positions in 32-bit chunks.
Description:
This instruction subtracts the 16-bit signed integer element in [15:0] of 32-bit chunks in Rs2 from the 16-bit signed integer element in [31:16] of 32-bit chunks in Rs1; at the same time, it adds the 16-bit signed integer element in [31:16] of 32-bit chunks in Rs2 with the 16-bit signed integer element in [15:0] of 32-bit chunks in Rs1. If any of the results are beyond the Q15 number range (-2^15 <= Q15 <= 2^15-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [31:16] of 32-bit chunks in Rd for addition and [15:0] of 32-bit chunks in Rd for subtraction.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20983 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKCRSA32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKCRSA32 (32-bit Signed Saturating Cross Subtraction & Addition)
Type: SIMD
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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21151 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKHMX16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKHMX16 (64-bit SIMD Signed Crossed Saturating Q15 Multiply)
Type: SIMD
Syntax:
Purpose:
Do Q15xQ15 element crossed multiplications simultaneously. The Q31 results are then reduced to Q15 numbers again.
Description:
For the KHMX16
instruction, multiply the top 16-bit Q15 content of 32-bit chunks in Rs1 with the bottom 16-bit Q15 content of 32-bit chunks in Rs2. At the same time, multiply the bottom 16-bit Q15 content of 32-bit chunks in Rs1 with the top 16-bit Q15 content of 32-bit chunks in Rs2.
The Q30 results are then right-shifted 15-bits and saturated into Q15 values. The Q15 results are then written into Rd. When both the two Q15 inputs of a multiplication are 0x8000, saturation will happen. The result will be saturated to 0x7FFF and the overflow flag OV will be set.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 18808 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKHMX8 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKHMX8 (64-bit SIMD Signed Crossed Saturating Q7 Multiply)
Type: SIMD
Syntax:
Purpose:
Do Q7xQ7 element crossed multiplications simultaneously. The Q15 results are then reduced to Q7 numbers again.
Description:
For the KHM8
instruction, multiply the top 8-bit Q7 content of 16-bit chunks in Rs1 with the bottom 8-bit Q7 content of 16-bit chunks in Rs2. At the same time, multiply the bottom 8-bit Q7 content of 16-bit chunks in Rs1 with the top 8-bit Q7 content of 16-bit chunks in Rs2.
The Q14 results are then right-shifted 7-bits and saturated into Q7 values. The Q7 results are then written into Rd. When both the two Q7 inputs of a multiplication are 0x80, saturation will happen. The result will be saturated to 0x7F and the overflow flag OV will be set.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 18755 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKMDA | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKMDA (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:
This instruction 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. 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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19677 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKMXDA | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKMXDA (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:
This instruction 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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19724 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKSLRA32 | ( | unsigned long long | a, |
int | b | ||
) |
DKSLRA32 (64-bit SIMD 32-bit Shift Left Logical with Saturation or Shift Right Arithmetic)
Type: SIMD
Syntax:
Purpose:
Do 31-bit elements logical left (positive) or arithmetic right (negative) shift operation with Q31 saturation for the left shift.
Description:
The 31-bit data elements of Rs1 are left-shifted logically or right-shifted arithmetically based on the value of Rs2[5:0]. Rs2[5:0] is in the signed range of [-2^5, 2^5-1]. A positive Rs2[5:0] means logical left shift and a negative Rs2[4:0] means arithmetic right shift. The shift amount is the absolute value of Rs2[5:0]. However, the behavior of Rs2[5:0]==- 2^5 (0x20) is defined to be equivalent to the behavior of Rs2[5:0]==-(2^5-1) (0x21).
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | int type of value stored in b |
Definition at line 19090 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKSTAS16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKSTAS16 (16-bit Signed Saturating Straight Addition & Subtraction)
Type: SIMD
Syntax:
Purpose:
Do 16-bit signed integer element saturating addition and 16-bit signed integer element saturating subtraction in a 32-bit chunk simultaneously. Operands are from corresponding positions in 32-bit chunks.
Description:
This instruction adds the 16-bit signed integer element in [31:16] of 32-bit chunks in Rs1 with the 16-bit signed integer element in [31:16] of 32-bit chunks in Rs2; at the same time, it subtracts the 16-bit signed integer element in [15:0] of 32-bit chunks in Rs2 from the 16-bit signed integer element in [15:0] of 32-bit chunks in Rs1. If any of the results are beyond the Q15 number range (-2^15 <= Q15 <= 2^15-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [31:16] of 32-bit chunks in Rd for subtraction and [15:0] of 32-bit chunks in Rd for addition.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21391 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKSTSA16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKSTSA16 (16-bit Signed Saturating Straight Subtraction & Addition)
Type: SIMD
Syntax:
Purpose:
Do 16-bit signed integer element saturating subtraction and 16-bit signed integer element saturating addition in a 32-bit chunk simultaneously. Operands are from corresponding positions in 32-bit chunks.
Description:
This instruction subtracts the 16-bit signed integer element in [31:16] of 32-bit chunks in Rs2 from the 16-bit signed integer element in [31:16] of 32-bit chunks in Rs1; at the same time, it adds the 16-bit signed integer element in [15:0] of 32-bit chunks in Rs2 with the 16-bit signed integer element in [15:0] of 32-bit chunks in Rs1. If any of the results are beyond the Q15 number range (-2^15 <= Q15 <= 2^15-1), they are saturated to the range and the OV bit is set to 1. The saturated results are written to [31:16] of 32-bit chunks in Rd for subtraction and [15:0] of 32-bit chunks in Rd for addition.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21336 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKSUB32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKSUB32 (64-bit SIMD 32-bit Signed Saturating Subtraction)
Type: SIMD
Syntax:
Purpose:
Do 32-bit signed integer element 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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19184 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKWMMUL | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKWMMUL (64-bit MSW 32x32 Signed Multiply & Double)
Type: SIMD
Syntax:
Purpose:
Do MSW 32x32 element signed multiplications simultaneously and double. The results are written into Rd.
Description:
This instruction multiplies the 32-bit elements of Rs1 with the 32-bit elements of Rs2. It then shifts the multiplication results one bit to the left and takes the most significant 32-bit results. If the shifted result is greater than 2^31-1, it is saturated to 2^31-1 and the OV flag is set to 1. The final element result is written to Rd. The 32-bit elements of Rs1 and Rs2 are treated as signed integers. The .u form of the instruction additionally rounds up the 64-bit multiplication results by adding a 1 to bit 30 before the shift and saturation operations.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 18945 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DKWMMUL_U | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DKWMMULU (64-bit MSW 32x32 Unsigned Multiply & Double)
Type: SIMD
Syntax:
Purpose:
Do MSW 32x32 element unsigned multiplications simultaneously and double. The results are written into Rd.
Description:
This instruction multiplies the 32-bit elements of Rs1 with the 32-bit elements of Rs2. It then shifts the multiplication results one bit to the left and takes the most significant 32-bit results. If the shifted result is greater than 2^31-1, it is saturated to 2^31-1 and the OV flag is set to 1. The final element result is written to Rd. The 32-bit elements of Rs1 and Rs2 are treated as signed integers. The .u form of the instruction additionally rounds up the 64-bit multiplication results by adding a 1 to bit 30 before the shift and saturation operations.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 18992 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DMSR16 | ( | unsigned long | a, |
unsigned long | b | ||
) |
DMSR16 (Signed Multiply Halfs with Right Shift 16-bit and Cross Multiply Halfs with Right Shift 16-bit)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications and cross multiplications from the 16-bit elements of two registers; and each multiplications performs a right shift operation.
Description:
For the DMSR16
instruction, multiply the top 16-bit Q15 content of 32-bit chunks in Rs1 with the top 16-bit Q15 content of 32-bit chunks in Rs2, multiply the bottom 16-bit Q15 content of 32-bit chunks in Rs1 with the bottom 16-bit Q15 content of 32-bit chunks in Rs2. At the same time, multiply the top 16-bit Q15 content of 32-bit chunks in Rs1 with the bottom16-bit Q15 content of 32-bit chunks in Rs2 and multiply the bottom16-bit Q15 content of 32-bit chunks in Rs1 with the top16-bit Q15 content of 32-bit chunks in Rs2. The Q31 results are then right-shifted 16-bits and clipped to Q15 values. The Q15 results are then written into 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 19381 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DMSR17 | ( | unsigned long | a, |
unsigned long | b | ||
) |
DMSR17 (Signed Multiply Halfs with Right Shift 17-bit and Cross Multiply Halfs with Right Shift 17-bit)
Type: SIMD
Syntax:
Purpose:
Do two signed 16-bit multiplications and cross multiplications from the 16-bit elements of two registers; and each multiplications performs a right shift operation.
Description:
For the DMSR17
instruction, multiply the top 16-bit Q15 content of 32-bit chunks in Rs1 with the top 16-bit Q15 content of 32-bit chunks in Rs2, multiply the bottom 16-bit Q15 content of 32-bit chunks in Rs1 with the bottom 16-bit Q15 content of 32-bit chunks in Rs2. At the same time, multiply the top 16-bit Q15 content of 32-bit chunks in Rs1 with the bottom 16-bit Q15 content of 32-bit chunks in Rs2 and multiply the bottom 16-bit Q15 content of 32-bit chunks in Rs1 with the top 16-bit Q15 content of 32-bit chunks in Rs2. The Q31 results are then right-shifted 17-bits and clipped to Q15 values. The Q15 results are then written into 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 19427 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DMSR33 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DMSR33 (Signed Multiply with Right Shift 33-bit and Cross Multiply with Right Shift 33-bit)
Type: SIMD
Syntax:
Purpose:
Do two signed 32-bit multiplications from the 32-bit elements of two registers, and each multiplications performs a right shift operation.
Description:
For the DMSR33
instruction, multiply the top 32-bit Q31 content of 64-bit chunks in Rs1 with the top 32-bit Q31 content of 64-bit chunks in Rs2. At the same time, multiply the bottom 32-bit Q31 content of 64bit chunks in Rs1 with the bottom 32-bit Q31 content of 64-bit. The Q64 results are then right-shifted 33-bits and clipped to Q31 values. The Q31 results are then written into Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19468 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DMXSR33 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DMXSR33 (Signed Multiply with Right Shift 33-bit and Cross Multiply with Right Shift 33-bit)
Type: SIMD
Syntax:
Purpose:
Do two signed 32-bit cross multiplications from the 32-bit elements of two registers, and each multiplications performs a right shift operation.
Description:
For the DMXSR33
instruction, multiply the top 32-bit Q31 content of 64-bit chunks in Rs1 with the bottom 32-bit Q31 content of 64-bit chunks in Rs2. At the same time, multiply the bottom 32-bit Q31 content of 64-bit chunks in Rs1 with the top 32-bit Q31 content of 64-bit chunks in Rs2. The Q63 results are then right-shifted 33-bits and clipped to Q31 values. The Q31 results are then written into Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19509 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DPKBB16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DPKBB16 (Pack Two 16-bit Data from Both Bottom Half)
Type: SIMD
Syntax:
Purpose:
Pack 16-bit data from 32-bit chunks in two registers.
Description:
This instruction moves Rs1.W[x][15:0] to Rd.W[x][31:16] and moves Rs2.W[x] [15:0] to Rd.W[x] [15:0].
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20387 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DPKBB32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DPKBB32 (Pack Two 32-bit Data from Both Bottom Half)
Type: SIMD
Syntax:
Purpose:
Pack 32-bit data from 64-bit chunks in two registers.
Description:
This instruction moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0].
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20200 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DPKBT16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DPKBT16 (Pack Two 16-bit Data from Bottom and Top Half)
Type: SIMD
Syntax:
Purpose:
Pack 16-bit data from 32-bit chunks in two registers.
Description:
This instruction moves Rs1.W[x] [15:0] to Rd.W[x] [31:16] and moves Rs2.W[x] [31:16] to Rd.W[x] [15:0].
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20425 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DPKBT32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DPKBT32 (Pack Two 32-bit Data from Bottom and Top Half)
Type: SIMD
Syntax:
Purpose:
Pack 32-bit data from 64-bit chunks in two registers.
Description:
This instruction moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[1] to Rd.W[0].
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20237 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DPKTB16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DPKTB16 (Pack Two 32-bit Data from Top and Bottom Half)
Type: SIMD
Syntax:
Purpose:
Pack 16-bit data from 32-bit chunks in two registers.
Description:
This instruction moves Rs1.W[x] [31:16] to Rd.W[x] [31:16] and moves Rs2.W[x] [15:0] to Rd.W[x] [15:0].
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20349 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DPKTB32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DPKTB32 (Pack Two 32-bit Data from Top and Bottom Half)
Type: SIMD
Syntax:
Purpose:
Pack 32-bit data from 64-bit chunks in two registers.
Description:
This instruction moves Rs1.W[1] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0].
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20311 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DPKTT16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DPKTT16 (Pack Two 16-bit Data from Both Top Half)
Type: SIMD
Syntax:
Purpose:
Pack 16-bit data from 32-bit chunks in two registers.
Description:
This instruction moves Rs1.W[x] [31:16] to Rd.W[x] [31:16] and moves Rs2.W[x] [31:16] to Rd.W[x] [15:0].
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20463 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DPKTT32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DPKTT32 (Pack Two 32-bit Data from Both Top Half)
Type: SIMD
Syntax:
Purpose:
Pack 32-bit data from 64-bit chunks in two registers.
Description:
This instruction moves Rs1.W[1] to Rd.W[0] and moves Rs2.W[1] to Rd.W[0].
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20274 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DRADD16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DRADD16 (64-bit SIMD 16-bit Halving Signed Addition)
Type: SIMD
Syntax:
Purpose:
Do 16-bit signed integer element additions simultaneously. The results are halved to avoid overflow or saturation.
Description:
This instruction adds the 16-bit signed integer elements in Rs1 with the 16-bit signed integer elements in Rs2. The results are first arithmetically right-shifted by 1 bit and then written to Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19222 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DRADD32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DRADD32 (64-bit SIMD 32-bit Halving Signed Addition)
Type: SIMD
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.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19298 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DRCRAS16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DRCRAS16 (16-bit Signed Halving Cross Addition & Subtraction)
Type: SIMD
Syntax:
Purpose:
Do 16-bit signed integer element subtraction and 16-bit signed integer element addition in a 32-bit chunk simultaneously. Operands are from crossed positions in 32-bit chunks. The results are halved to avoid overflow or saturation.
Description:
This instruction adds the 16-bit unsigned integer in [31:16] of 32-bit chunks in Rs1 with the 16-bit unsigned integer in [15:0] of 32-bit chunks in Rs2, and subtracts the 16-bit unsigned integer in [31:16] of 32-bit chunks in Rs2 from the 16-bit unsigned integer in [15:0] of 32-bit chunks in Rs1. The element results are first logically right-shifted by 1 bit and then written to [31:16] of 32-bit chunks in Rd and [15:0] of 32-bit chunks in Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20832 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DRCRAS32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DRCRAS32 (32-bit Signed Cross Addition & Subtraction)
Type: SIMD
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.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20873 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DRCRSA16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DRCRSA16 (16-bit Signed Halving Cross Subtraction & Addition)
Type: SIMD
Syntax:
Purpose:
Do 16-bit signed integer element subtraction and 16-bit signed integer element addition in a 32-bit chunk simultaneously. Operands are from crossed positions in 32-bit chunks. The results are halved to avoid overflow or saturation.
Description:
This instruction subtracts the 16-bit signed integer in [31:16] of 32-bit chunks in Rs1 with the 16-bit signed integer in [15:0] of 32-bit chunks in Rs2, and adds the 16-bit signed integer in [31:16] of 32-bit chunks in Rs2 from the 16-bit signed integer in [15:0] of 32-bit chunks in Rs1. The element results are first logically right-shifted by 1 bit and then written to [31:16] of 32- bit chunks in Rd and [15:0] of 32-bit chunks in Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20749 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DRCRSA32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DRCRSA32 (32-bit Signed Halving CrossSubtraction & Addition)
Type: SIMD
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 [63:32] of Rs1 with the 32-bit signed integer element in [31:0] of Rs2, and adds 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.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20790 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_DREDAS16 | ( | unsigned long long | a | ) |
DREDAS16 (Reduced Addition and Reduced Subtraction)
Type: SIMD
Syntax:
Purpose:
Do halfs reduced subtraction and halfs reduced addition from a register. The result is written to Rd.
Description:
For the DREDAS16
instruction, subtract the top 16-bit Q15 element from the bottom 16-bit Q15 element of the bottom 32-bit Q31 content of 64-bit chunks in Rs1. At the same time, add the the top16-bit Q15 element with the bottom16-bit Q15 element of the top 32-bit Q31 content of 64-bit chunks in Rs1. The two Q15 results are then written into Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
Definition at line 19547 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long __RV_DREDSA16 | ( | unsigned long long | a | ) |
DREDSA16 (Reduced Subtraction and Reduced Addition)
Type: SIMD
Syntax:
Purpose:
Do halfs reduced subtraction and halfs reduced addition from a register. The result is written to Rd.
Description:
For the DREDSA16
instruction, add the top 16-bit Q15 element from the bottom 16-bit Q15 element of the bottom 32-bit Q31 content of 64-bit chunks in Rs1. At the same time, subtract the the top16-bit Q15 element with the bottom16-bit Q15 element of the top 32-bit Q31 content of 64-bit chunks in Rs1. The two Q15 results are then written into Rd.
Operations:
[in] | a | unsigned long longtype of value stored in a |
Definition at line 19583 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DRSUB16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DRSUB16 (16-bit Signed Halving Subtraction)
Type: SIMD
Syntax:
Purpose:
Do 16-bit signed integer element subtractions simultaneously. The results are halved to avoid overflow or saturation.
Description:
This instruction subtracts the 16-bit signed integer elements in Rs2 from the 16-bit signed integer elements in Rs1. The results are first arithmetically right-shifted by 1 bit and then written to Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21021 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DRSUB32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DRSUB32 (32-bit Signed Halving Subtraction)
Type: SIMD
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.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21573 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSMBB16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMBB16 (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 DSMBB16
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. 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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20625 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long long __RV_DSMBB32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMBB32 (Signed Multiply Bottom Word & Bottom Word)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 32-bit element of a register with the signed 32-bit element of another register and write the 64-bit result to a third register.
Description:
This instruction multiplies the bottom 32-bit element of Rs1 with the bottom 32-bit element of Rs2. The 64-bit multiplication result is written to Rd. The 32-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19844 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long long __RV_DSMBB32_SRA14 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMBB32.sra14 (Signed Crossed Multiply Two Halfs and Subtract with Right Shift 14)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 32-bit element of a register with the signed 32-bit element of another register, then right shift 14- bit,finally write the 64-bit result to a third register.
Description:
This instruction multiplies the bottom 32-bit element of Rs1 with the bottom 32-bit element of Rs2. The 64-bit multiplication result is written to Rd after right shift 14-bit. The 32-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19883 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long long __RV_DSMBB32_SRA32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMBB32.sra32 (Signed Crossed Multiply Two Halfs and Subtract with Right Shift 32)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 32-bit element of a register with the signed 32-bit element of another register, then right shift 32- bit,finally write the 64-bit result to a third register.
Description:
This instruction multiplies the bottom 32-bit element of Rs1 with the bottom 32-bit element of Rs2. The 64-bit multiplication result is written to Rd after right shift 32-bit. The 32-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19923 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSMBT16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMBT16 (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 DSMBT16
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. 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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20666 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long long __RV_DSMBT32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
SMBT32 (Signed Multiply Bottom Word & Top Word)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 32-bit element of a register with the signed 32-bit element of another register and write the 64-bit result to a third register.
Description:
This instruction multiplies the bottom 32-bit element of Rs1 with the top 32-bit element of Rs2. The 64-bit multiplication result is written to Rd. The 32-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19963 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long long __RV_DSMBT32_SRA14 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMBT32.sra14 (Signed Multiply Bottom Word & Top Word with Right Shift 14)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 32-bit element of a register with the signed 32-bit element of another register, then right shift 14- bit,finally write the 64-bit result to a third register.
Description:
This instruction multiplies the bottom 32-bit element of Rs1 with the top 32-bit element of Rs2. The 64-bit multiplication result is written to Rd after right shift 14-bit. The 32-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20003 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long long __RV_DSMBT32_SRA32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMBT32.sra32 (Signed Crossed Multiply Two Halfs and Subtract with Right Shift 32)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 32-bit element of a register with the signed 32-bit element of another register, then right shift 32- bit,finally write the 64-bit result to a third register.
Description:
This instruction multiplies the bottom 32-bit element of Rs1 with the top 32-bit element of Rs2. The 64-bit multiplication result is written to Rd after right shift 32-bit. The 32-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20043 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSMDRS | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMDRS (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:
This instruction 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. 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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19765 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSMMUL | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMMUL (64-bit MSW 32x32 Signed Multiply)
Type: SIMD
Syntax:
Purpose:
Do MSW 32x32 element signed multiplications simultaneously. The results are written into Rd.
Description:
This instruction multiplies the 32-bit elements of Rs1 with the 32-bit elements of Rs2 and writes the most significant 32-bit multiplication results to the corresponding 32-bit elements of Rd. The 32-bit elements of Rs1 and Rs2 are treated as signed integers. The .u form of the instruction rounds up the most significant 32-bit of the 64-bit multiplication results by adding a 1 to bit 31 of the results.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 18853 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSMMUL_U | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMMULU (64-bit MSW 32x32 Unsigned Multiply)
Type: SIMD
Syntax:
Purpose:
Do MSW 32x32 element unsigned multiplications simultaneously. The results are written into Rd.
Description:
This instruction multiplies the 32-bit elements of Rs1 with the 32-bit elements of Rs2 and writes the most significant 32-bit multiplication results to the corresponding 32-bit elements of Rd. The 32-bit elements of Rs1 and Rs2 are treated as unsigned integers. The .u form of the instruction rounds up the most significant 32-bit of the 64-bit multiplication results by adding a 1 to bit 31 of the results.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 18898 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSMTT16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMTT16 (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 DSMTT16
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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20707 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long long __RV_DSMTT32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMTT32 (Signed Multiply Top Word & Top Word)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 32-bit element of a register with the signed 32-bit element of another register and write the 64-bit result to a third register.
Description:
This instruction multiplies the top 32-bit element of Rs1 with the top 32-bit element of Rs2. The 64-bit multiplication result is written to Rd. The 32-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20083 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long long __RV_DSMTT32_SRA14 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMTT32.sra14 (Signed Multiply Top Word & Top Word with Right Shift 14-bit)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 32-bit element of a register with the signed 32-bit element of another register,then right shift 14-bit, finally write the 64-bit result to a third register.
Description:
This instruction multiplies the top 32-bit element of Rs1 with the top 32-bit element of Rs2. The 64-bit multiplication result is written to Rd after right shift 14-bit. The 32-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20123 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE long long __RV_DSMTT32_SRA32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMTT32.sra32 (Signed Multiply Top Word & Top Word with Right Shift 32-bit)
Type: SIMD
Syntax:
Purpose:
Multiply the signed 32-bit element of a register with the signed 32-bit element of another register,then right shift 32-bit, finally write the 64-bit result to a third register.
Description:
This instruction multiplies the top 32-bit element of Rs1 with the top 32-bit element of Rs2. The 64-bit multiplication result is written to Rd after right shift 32-bit. The 32-bit contents of Rs1 and Rs2 are treated as signed integers.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 20163 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSMXDS | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSMXDS (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:
This instruction 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 long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19806 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSRA16 | ( | unsigned long long | a, |
unsigned long | b | ||
) |
DSRA16 (32-bit Signed Saturating Cross Addition & Subtraction)
Type: SIMD
Syntax:
Purpose:
Do 16-bit element arithmetic right shift operations simultaneously. The shift amount is a variable from a GPR.
Description:
The 16-bit data elements in Rs1 are right-shifted arithmetically, that is, the shifted out bits are filled with the sign-bit of the data elements. The shift amount is specified by the low-order 4-bits of the value in the Rs2 register. And the results are written to Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long type of value stored in b |
Definition at line 20508 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSTAS32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSTAS32 (SIMD 32-bit Straight Addition & Subtractionn)
Type: SIMD
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.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21101 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSTSA32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSTSA32 (32-bit Straight Subtraction & Addition)
Type: SIMD
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.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 21061 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSUB16 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSUB16 (64-bit SIMD 16-bit Halving Signed Subtraction)
Type: SIMD
Syntax:
Purpose:
Do 16-bit integer element subtractions simultaneously.
Description:
This instruction adds the 16-bit signed integer elements in Rs1 with the 16-bit signed integer elements in Rs2. The results are first arithmetically right-shifted by 1 bit and then written to Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19260 of file core_feature_dsp.h.
References __ASM.
__STATIC_FORCEINLINE unsigned long long __RV_DSUB32 | ( | unsigned long long | a, |
unsigned long long | b | ||
) |
DSUB32 (64-bit SIMD 32-bit Halving Signed Subtraction)
Type: SIMD
Syntax:
Purpose:
Do 32-bit integer element subtractions simultaneously.
Description:
This instruction subtracts the 32-bit signed integer elements in Rs2 from the 32-bit signed integer elements in Rs1 . The results are written to Rd.
Operations:
[in] | a | unsigned long long type of value stored in a |
[in] | b | unsigned long long type of value stored in b |
Definition at line 19336 of file core_feature_dsp.h.
References __ASM.