SIMD 16-bit Packing Instructions
- __STATIC_FORCEINLINE unsigned long __RV_PKBB16 (unsigned long a, unsigned long b)
- __STATIC_FORCEINLINE unsigned long __RV_PKBT16 (unsigned long a, unsigned long b)
- __STATIC_FORCEINLINE unsigned long __RV_PKTT16 (unsigned long a, unsigned long b)
- __STATIC_FORCEINLINE unsigned long __RV_PKTB16 (unsigned long a, unsigned long b)
- group NMSIS_Core_DSP_Intrinsic_SIMD_16B_PACK
SIMD 16-bit Packing Instructions.
there are 4 SIMD16-bit Packing Instructions.
Functions
- __STATIC_FORCEINLINE unsigned long __RV_PKBB16 (unsigned long a, unsigned long b)
PKBB16 (Pack Two 16-bit Data from Both Bottom Half)
Type: DSP
Syntax:
PKBB16 Rd, Rs1, Rs2 PKBT16 Rd, Rs1, Rs2 PKTT16 Rd, Rs1, Rs2 PKTB16 Rd, Rs1, Rs2
Purpose
:
Pack 16-bit data from 32-bit chunks in two registers.
PKBB16: bottom.bottom
PKBT16 bottom.top
PKTT16 top.top
PKTB16 top.bottom
Description
:
(PKBB16) 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]. (PKBT16) 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]. (PKTT16) 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]. (PKTB16) 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:
Rd.W[x][31:0] = CONCAT(Rs1.W[x][15:0], Rs2.W[x][15:0]); // PKBB16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][15:0], Rs2.W[x][31:16]); // PKBT16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][31:16], Rs2.W[x][15:0]); // PKTB16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][31:16], Rs2.W[x][31:16]); // PKTT16 for RV32: x=0, for RV64: x=1...0
- 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_PKBT16 (unsigned long a, unsigned long b)
PKBT16 (Pack Two 16-bit Data from Bottom and Top Half)
Type: DSP
Syntax:
PKBB16 Rd, Rs1, Rs2 PKBT16 Rd, Rs1, Rs2 PKTT16 Rd, Rs1, Rs2 PKTB16 Rd, Rs1, Rs2
Purpose
:
Pack 16-bit data from 32-bit chunks in two registers.
PKBB16: bottom.bottom
PKBT16 bottom.top
PKTT16 top.top
PKTB16 top.bottom
Description
:
(PKBB16) 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]. (PKBT16) 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]. (PKTT16) 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]. (PKTB16) 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:
Rd.W[x][31:0] = CONCAT(Rs1.W[x][15:0], Rs2.W[x][15:0]); // PKBB16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][15:0], Rs2.W[x][31:16]); // PKBT16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][31:16], Rs2.W[x][15:0]); // PKTB16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][31:16], Rs2.W[x][31:16]); // PKTT16 for RV32: x=0, for RV64: x=1...0
- 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_PKTT16 (unsigned long a, unsigned long b)
PKTT16 (Pack Two 16-bit Data from Both Top Half)
Type: DSP
Syntax:
PKBB16 Rd, Rs1, Rs2 PKBT16 Rd, Rs1, Rs2 PKTT16 Rd, Rs1, Rs2 PKTB16 Rd, Rs1, Rs2
Purpose
:
Pack 16-bit data from 32-bit chunks in two registers.
PKBB16: bottom.bottom
PKBT16 bottom.top
PKTT16 top.top
PKTB16 top.bottom
Description
:
(PKBB16) 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]. (PKBT16) 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]. (PKTT16) 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]. (PKTB16) 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:
Rd.W[x][31:0] = CONCAT(Rs1.W[x][15:0], Rs2.W[x][15:0]); // PKBB16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][15:0], Rs2.W[x][31:16]); // PKBT16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][31:16], Rs2.W[x][15:0]); // PKTB16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][31:16], Rs2.W[x][31:16]); // PKTT16 for RV32: x=0, for RV64: x=1...0
- 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_PKTB16 (unsigned long a, unsigned long b)
PKTB16 (Pack Two 16-bit Data from Top and Bottom Half)
Type: DSP
Syntax:
PKBB16 Rd, Rs1, Rs2 PKBT16 Rd, Rs1, Rs2 PKTT16 Rd, Rs1, Rs2 PKTB16 Rd, Rs1, Rs2
Purpose
:
Pack 16-bit data from 32-bit chunks in two registers.
PKBB16: bottom.bottom
PKBT16 bottom.top
PKTT16 top.top
PKTB16 top.bottom
Description
:
(PKBB16) 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]. (PKBT16) 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]. (PKTT16) 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]. (PKTB16) 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:
Rd.W[x][31:0] = CONCAT(Rs1.W[x][15:0], Rs2.W[x][15:0]); // PKBB16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][15:0], Rs2.W[x][31:16]); // PKBT16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][31:16], Rs2.W[x][15:0]); // PKTB16 Rd.W[x][31:0] = CONCAT(Rs1.W[x][31:16], Rs2.W[x][31:16]); // PKTT16 for RV32: x=0, for RV64: x=1...0
- 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