32-bit Packing Instructions
- __STATIC_FORCEINLINE unsigned long __RV_PKBB32 (unsigned long a, unsigned long b)
- __STATIC_FORCEINLINE unsigned long __RV_PKBT32 (unsigned long a, unsigned long b)
- __STATIC_FORCEINLINE unsigned long __RV_PKTT32 (unsigned long a, unsigned long b)
- __STATIC_FORCEINLINE unsigned long __RV_PKTB32 (unsigned long a, unsigned long b)
- group NMSIS_Core_DSP_Intrinsic_RV64_32B_PACK
32-bit Packing Instructions
There are four 32-bit packing instructions here
Functions
- __STATIC_FORCEINLINE unsigned long __RV_PKBB32 (unsigned long a, unsigned long b)
PKBB32 (Pack Two 32-bit Data from Both Bottom Half)
Type: DSP (RV64 Only)
Syntax:
PKBB32 Rd, Rs1, Rs2 PKBT32 Rd, Rs1, Rs2 PKTT32 Rd, Rs1, Rs2 PKTB32 Rd, Rs1, Rs2
Purpose
:
Pack 32-bit data from 64-bit chunks in two registers.
PKBB32: bottom.bottom
PKBT32: bottom.top
PKTT32: top.top
PKTB32: top.bottom
Description
:
(PKBB32) moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0]. (PKBT32) moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[1] to Rd.W[0]. (PKTT32) moves Rs1.W[1] to Rd.W[1] and moves Rs2.W[1] to Rd.W[0]. (PKTB32) moves Rs1.W[1] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0].
Operations:
Rd = CONCAT(Rs1.W[_*0*_], Rs2.W[_*0*_]); // PKBB32 Rd = CONCAT(Rs1.W[_*0*_], Rs2.W[_*1*_]); // PKBT32 Rd = CONCAT(Rs1.W[_*1*_], Rs2.W[_*1*_]); // PKTT32 Rd = CONCAT(Rs1.W[_*1*_], Rs2.W[_*0*_]); // PKTB32
- Parameters
a – [in] unsigned long type of value stored in a
b – [in] unsigned long type of value stored in b
- Returns
value stored in unsigned long type
- __STATIC_FORCEINLINE unsigned long __RV_PKBT32 (unsigned long a, unsigned long b)
PKBT32 (Pack Two 32-bit Data from Bottom and Top Half)
Type: DSP (RV64 Only)
Syntax:
PKBB32 Rd, Rs1, Rs2 PKBT32 Rd, Rs1, Rs2 PKTT32 Rd, Rs1, Rs2 PKTB32 Rd, Rs1, Rs2
Purpose
:
Pack 32-bit data from 64-bit chunks in two registers.
PKBB32: bottom.bottom
PKBT32: bottom.top
PKTT32: top.top
PKTB32: top.bottom
Description
:
(PKBB32) moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0]. (PKBT32) moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[1] to Rd.W[0]. (PKTT32) moves Rs1.W[1] to Rd.W[1] and moves Rs2.W[1] to Rd.W[0]. (PKTB32) moves Rs1.W[1] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0].
Operations:
Rd = CONCAT(Rs1.W[_*0*_], Rs2.W[_*0*_]); // PKBB32 Rd = CONCAT(Rs1.W[_*0*_], Rs2.W[_*1*_]); // PKBT32 Rd = CONCAT(Rs1.W[_*1*_], Rs2.W[_*1*_]); // PKTT32 Rd = CONCAT(Rs1.W[_*1*_], Rs2.W[_*0*_]); // PKTB32
- Parameters
a – [in] unsigned long type of value stored in a
b – [in] unsigned long type of value stored in b
- Returns
value stored in unsigned long type
- __STATIC_FORCEINLINE unsigned long __RV_PKTT32 (unsigned long a, unsigned long b)
PKTT32 (Pack Two 32-bit Data from Both Top Half)
Type: DSP (RV64 Only)
Syntax:
PKBB32 Rd, Rs1, Rs2 PKBT32 Rd, Rs1, Rs2 PKTT32 Rd, Rs1, Rs2 PKTB32 Rd, Rs1, Rs2
Purpose
:
Pack 32-bit data from 64-bit chunks in two registers.
PKBB32: bottom.bottom
PKBT32: bottom.top
PKTT32: top.top
PKTB32: top.bottom
Description
:
(PKBB32) moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0]. (PKBT32) moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[1] to Rd.W[0]. (PKTT32) moves Rs1.W[1] to Rd.W[1] and moves Rs2.W[1] to Rd.W[0]. (PKTB32) moves Rs1.W[1] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0].
Operations:
Rd = CONCAT(Rs1.W[_*0*_], Rs2.W[_*0*_]); // PKBB32 Rd = CONCAT(Rs1.W[_*0*_], Rs2.W[_*1*_]); // PKBT32 Rd = CONCAT(Rs1.W[_*1*_], Rs2.W[_*1*_]); // PKTT32 Rd = CONCAT(Rs1.W[_*1*_], Rs2.W[_*0*_]); // PKTB32
- Parameters
a – [in] unsigned long type of value stored in a
b – [in] unsigned long type of value stored in b
- Returns
value stored in unsigned long type
- __STATIC_FORCEINLINE unsigned long __RV_PKTB32 (unsigned long a, unsigned long b)
PKTB32 (Pack Two 32-bit Data from Top and Bottom Half)
Type: DSP (RV64 Only)
Syntax:
PKBB32 Rd, Rs1, Rs2 PKBT32 Rd, Rs1, Rs2 PKTT32 Rd, Rs1, Rs2 PKTB32 Rd, Rs1, Rs2
Purpose
:
Pack 32-bit data from 64-bit chunks in two registers.
PKBB32: bottom.bottom
PKBT32: bottom.top
PKTT32: top.top
PKTB32: top.bottom
Description
:
(PKBB32) moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0]. (PKBT32) moves Rs1.W[0] to Rd.W[1] and moves Rs2.W[1] to Rd.W[0]. (PKTT32) moves Rs1.W[1] to Rd.W[1] and moves Rs2.W[1] to Rd.W[0]. (PKTB32) moves Rs1.W[1] to Rd.W[1] and moves Rs2.W[0] to Rd.W[0].
Operations:
Rd = CONCAT(Rs1.W[_*0*_], Rs2.W[_*0*_]); // PKBB32 Rd = CONCAT(Rs1.W[_*0*_], Rs2.W[_*1*_]); // PKBT32 Rd = CONCAT(Rs1.W[_*1*_], Rs2.W[_*1*_]); // PKTT32 Rd = CONCAT(Rs1.W[_*1*_], Rs2.W[_*0*_]); // PKTB32
- Parameters
a – [in] unsigned long type of value stored in a
b – [in] unsigned long type of value stored in b
- Returns
value stored in unsigned long type