SIMD 16bit Compare InstructionsΒΆ

__STATIC_FORCEINLINE unsigned long __RV_CMPEQ16(unsigned long a, unsigned long b)

__STATIC_FORCEINLINE unsigned long __RV_SCMPLE16(unsigned long a, unsigned long b)

__STATIC_FORCEINLINE unsigned long __RV_SCMPLT16(unsigned long a, unsigned long b)

__STATIC_FORCEINLINE unsigned long __RV_UCMPLE16(unsigned long a, unsigned long b)

__STATIC_FORCEINLINE unsigned long __RV_UCMPLT16(unsigned long a, unsigned long b)

group
NMSIS_Core_DSP_Intrinsic_SIMD_16B_CMP
SIMD 16bit Compare Instructions.
there are 5 SIMD 16bit Compare instructions.
Functions

__STATIC_FORCEINLINE unsigned long __RV_CMPEQ16(unsigned long a, unsigned long b)
CMPEQ16 (SIMD 16bit Integer Compare Equal)
Type: SIMD
Syntax:
CMPEQ16 Rd, Rs1, Rs2
Purpose:
Do 16bit integer elements equal comparisons simultaneously.
Description:
This instruction compares the 16bit integer elements in Rs1 with the 16bit integer elements in Rs2 to see if they are equal. If they are equal, the result is 0xFFFF; otherwise, the result is 0x0. The 16bit element comparison results are written to Rt.
Note:
This instruction can be used for either signed or unsigned numbers.
Operations:
Rd.H[x] = (Rs1.H[x] == Rs2.H[x])? 0xffff : 0x0; for RV32: x=1...0, for RV64: x=3...0
 Return
value stored in unsigned long type
 Parameters
[in] a
: unsigned long type of value stored in a[in] b
: unsigned long type of value stored in b

__STATIC_FORCEINLINE unsigned long __RV_SCMPLE16(unsigned long a, unsigned long b)
SCMPLE16 (SIMD 16bit Signed Compare Less Than & Equal)
Type: SIMD
Syntax:
SCMPLE16 Rd, Rs1, Rs2
Purpose:
Do 16bit signed integer elements less than & equal comparisons simultaneously.
Description:
This instruction compares the 16bit signed integer elements in Rs1 with the 16bit signed integer elements in Rs2 to see if the one in Rs1 is less than or equal to the one in Rs2. If it is true, the result is 0xFFFF; otherwise, the result is 0x0. The element comparison results are written to Rd.
Operations:
Rd.H[x] = (Rs1.H[x] {le} Rs2.H[x])? 0xffff : 0x0; for RV32: x=1...0, for RV64: x=3...0
 Return
value stored in unsigned long type
 Parameters
[in] a
: unsigned long type of value stored in a[in] b
: unsigned long type of value stored in b

__STATIC_FORCEINLINE unsigned long __RV_SCMPLT16(unsigned long a, unsigned long b)
SCMPLT16 (SIMD 16bit Signed Compare Less Than)
Type: SIMD
Syntax:
SCMPLT16 Rd, Rs1, Rs2
Purpose:
Do 16bit signed integer elements less than comparisons simultaneously.
Description:
This instruction compares the 16bit signed integer elements in Rs1 with the two 16 bit signed integer elements in Rs2 to see if the one in Rs1 is less than the one in Rs2. If it is true, the result is 0xFFFF; otherwise, the result is 0x0. The element comparison results are written to Rd.
Operations:
Rd.H[x] = (Rs1.H[x] < Rs2.H[x])? 0xffff : 0x0; for RV32: x=1...0, for RV64: x=3...0
 Return
value stored in unsigned long type
 Parameters
[in] a
: unsigned long type of value stored in a[in] b
: unsigned long type of value stored in b

__STATIC_FORCEINLINE unsigned long __RV_UCMPLE16(unsigned long a, unsigned long b)
UCMPLE16 (SIMD 16bit Unsigned Compare Less Than & Equal)
Type: SIMD
Syntax:
UCMPLE16 Rd, Rs1, Rs2
Purpose:
Do 16bit unsigned integer elements less than & equal comparisons simultaneously.
Description:
This instruction compares the 16bit unsigned integer elements in Rs1 with the 16bit unsigned integer elements in Rs2 to see if the one in Rs1 is less than or equal to the one in Rs2. If it is true, the result is 0xFFFF; otherwise, the result is 0x0. The element comparison results are written to Rd.
Operations:
Rd.H[x] = (Rs1.H[x] <=u Rs2.H[x])? 0xffff : 0x0; for RV32: x=1...0, for RV64: x=3...0
 Return
value stored in unsigned long type
 Parameters
[in] a
: unsigned long type of value stored in a[in] b
: unsigned long type of value stored in b

__STATIC_FORCEINLINE unsigned long __RV_UCMPLT16(unsigned long a, unsigned long b)
UCMPLT16 (SIMD 16bit Unsigned Compare Less Than)
Type: SIMD
Syntax:
UCMPLT16 Rd, Rs1, Rs2
Purpose:
Do 16bit unsigned integer elements less than comparisons simultaneously.
Description:
This instruction compares the 16bit unsigned integer elements in Rs1 with the 16bit unsigned integer elements in Rs2 to see if the one in Rs1 is less than the one in Rs2. If it is true, the result is 0xFFFF; otherwise, the result is 0x0. The element comparison results are written to Rd.
Operations:
Rd.H[x] = (Rs1.H[x] <u Rs2.H[x])? 0xffff : 0x0; for RV32: x=1...0, for RV64: x=3...0
 Return
value stored in unsigned long type
 Parameters
[in] a
: unsigned long type of value stored in a[in] b
: unsigned long type of value stored in b
