NMSIS-Core  Version 1.2.0
NMSIS-Core support for Nuclei processor-based devices

SIMD 8-bit Unpacking Instructions. More...

Functions

__STATIC_FORCEINLINE unsigned long __RV_SUNPKD810 (unsigned long a)
 SUNPKD810 (Signed Unpacking Bytes 1 & 0) More...
 
__STATIC_FORCEINLINE unsigned long __RV_SUNPKD820 (unsigned long a)
 SUNPKD820 (Signed Unpacking Bytes 2 & 0) More...
 
__STATIC_FORCEINLINE unsigned long __RV_SUNPKD830 (unsigned long a)
 SUNPKD830 (Signed Unpacking Bytes 3 & 0) More...
 
__STATIC_FORCEINLINE unsigned long __RV_SUNPKD831 (unsigned long a)
 SUNPKD831 (Signed Unpacking Bytes 3 & 1) More...
 
__STATIC_FORCEINLINE unsigned long __RV_SUNPKD832 (unsigned long a)
 SUNPKD832 (Signed Unpacking Bytes 3 & 2) More...
 
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD810 (unsigned long a)
 ZUNPKD810 (Unsigned Unpacking Bytes 1 & 0) More...
 
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD820 (unsigned long a)
 ZUNPKD820 (Unsigned Unpacking Bytes 2 & 0) More...
 
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD830 (unsigned long a)
 ZUNPKD830 (Unsigned Unpacking Bytes 3 & 0) More...
 
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD831 (unsigned long a)
 ZUNPKD831 (Unsigned Unpacking Bytes 3 & 1) More...
 
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD832 (unsigned long a)
 ZUNPKD832 (Unsigned Unpacking Bytes 3 & 2) More...
 

Detailed Description

SIMD 8-bit Unpacking Instructions.

there are 8 SIMD 8-bit Unpacking instructions.

Function Documentation

◆ __RV_SUNPKD810()

__STATIC_FORCEINLINE unsigned long __RV_SUNPKD810 ( unsigned long  a)

SUNPKD810 (Signed Unpacking Bytes 1 & 0)

Type: DSP

Syntax:

SUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit signed halfwords of 32-bit chunks in a register.

Description:
For the SUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit signed halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = SE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = SE16(Rs1.W[m].B[y])
// SUNPKD810, x=1,y=0
// SUNPKD820, x=2,y=0
// SUNPKD830, x=3,y=0
// SUNPKD831, x=3,y=1
// SUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 10809 of file core_feature_dsp.h.

10810 {
10811  unsigned long result;
10812  __ASM volatile("sunpkd810 %0, %1" : "=r"(result) : "r"(a));
10813  return result;
10814 }

References __ASM.

◆ __RV_SUNPKD820()

__STATIC_FORCEINLINE unsigned long __RV_SUNPKD820 ( unsigned long  a)

SUNPKD820 (Signed Unpacking Bytes 2 & 0)

Type: DSP

Syntax:

SUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit signed halfwords of 32-bit chunks in a register.

Description:
For the SUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit signed halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = SE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = SE16(Rs1.W[m].B[y])
// SUNPKD810, x=1,y=0
// SUNPKD820, x=2,y=0
// SUNPKD830, x=3,y=0
// SUNPKD831, x=3,y=1
// SUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 10855 of file core_feature_dsp.h.

10856 {
10857  unsigned long result;
10858  __ASM volatile("sunpkd820 %0, %1" : "=r"(result) : "r"(a));
10859  return result;
10860 }

References __ASM.

◆ __RV_SUNPKD830()

__STATIC_FORCEINLINE unsigned long __RV_SUNPKD830 ( unsigned long  a)

SUNPKD830 (Signed Unpacking Bytes 3 & 0)

Type: DSP

Syntax:

SUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit signed halfwords of 32-bit chunks in a register.

Description:
For the SUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit signed halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = SE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = SE16(Rs1.W[m].B[y])
// SUNPKD810, x=1,y=0
// SUNPKD820, x=2,y=0
// SUNPKD830, x=3,y=0
// SUNPKD831, x=3,y=1
// SUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 10901 of file core_feature_dsp.h.

10902 {
10903  unsigned long result;
10904  __ASM volatile("sunpkd830 %0, %1" : "=r"(result) : "r"(a));
10905  return result;
10906 }

References __ASM.

◆ __RV_SUNPKD831()

__STATIC_FORCEINLINE unsigned long __RV_SUNPKD831 ( unsigned long  a)

SUNPKD831 (Signed Unpacking Bytes 3 & 1)

Type: DSP

Syntax:

SUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit signed halfwords of 32-bit chunks in a register.

Description:
For the SUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit signed halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = SE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = SE16(Rs1.W[m].B[y])
// SUNPKD810, x=1,y=0
// SUNPKD820, x=2,y=0
// SUNPKD830, x=3,y=0
// SUNPKD831, x=3,y=1
// SUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 10947 of file core_feature_dsp.h.

10948 {
10949  unsigned long result;
10950  __ASM volatile("sunpkd831 %0, %1" : "=r"(result) : "r"(a));
10951  return result;
10952 }

References __ASM.

◆ __RV_SUNPKD832()

__STATIC_FORCEINLINE unsigned long __RV_SUNPKD832 ( unsigned long  a)

SUNPKD832 (Signed Unpacking Bytes 3 & 2)

Type: DSP

Syntax:

SUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit signed halfwords of 32-bit chunks in a register.

Description:
For the SUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit signed halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = SE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = SE16(Rs1.W[m].B[y])
// SUNPKD810, x=1,y=0
// SUNPKD820, x=2,y=0
// SUNPKD830, x=3,y=0
// SUNPKD831, x=3,y=1
// SUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 10993 of file core_feature_dsp.h.

10994 {
10995  unsigned long result;
10996  __ASM volatile("sunpkd832 %0, %1" : "=r"(result) : "r"(a));
10997  return result;
10998 }

References __ASM.

◆ __RV_ZUNPKD810()

__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD810 ( unsigned long  a)

ZUNPKD810 (Unsigned Unpacking Bytes 1 & 0)

Type: DSP

Syntax:

ZUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit unsigned halfwords of 32-bit chunks in a register.

Description:
For the ZUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit unsigned halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = ZE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = ZE16(Rs1.W[m].B[y])
// ZUNPKD810, x=1,y=0
// ZUNPKD820, x=2,y=0
// ZUNPKD830, x=3,y=0
// ZUNPKD831, x=3,y=1
// ZUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 13583 of file core_feature_dsp.h.

13584 {
13585  unsigned long result;
13586  __ASM volatile("zunpkd810 %0, %1" : "=r"(result) : "r"(a));
13587  return result;
13588 }

References __ASM.

◆ __RV_ZUNPKD820()

__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD820 ( unsigned long  a)

ZUNPKD820 (Unsigned Unpacking Bytes 2 & 0)

Type: DSP

Syntax:

ZUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit unsigned halfwords of 32-bit chunks in a register.

Description:
For the ZUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit unsigned halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = ZE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = ZE16(Rs1.W[m].B[y])
// ZUNPKD810, x=1,y=0
// ZUNPKD820, x=2,y=0
// ZUNPKD830, x=3,y=0
// ZUNPKD831, x=3,y=1
// ZUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 13629 of file core_feature_dsp.h.

13630 {
13631  unsigned long result;
13632  __ASM volatile("zunpkd820 %0, %1" : "=r"(result) : "r"(a));
13633  return result;
13634 }

References __ASM.

◆ __RV_ZUNPKD830()

__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD830 ( unsigned long  a)

ZUNPKD830 (Unsigned Unpacking Bytes 3 & 0)

Type: DSP

Syntax:

ZUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit unsigned halfwords of 32-bit chunks in a register.

Description:
For the ZUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit unsigned halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = ZE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = ZE16(Rs1.W[m].B[y])
// ZUNPKD810, x=1,y=0
// ZUNPKD820, x=2,y=0
// ZUNPKD830, x=3,y=0
// ZUNPKD831, x=3,y=1
// ZUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 13675 of file core_feature_dsp.h.

13676 {
13677  unsigned long result;
13678  __ASM volatile("zunpkd830 %0, %1" : "=r"(result) : "r"(a));
13679  return result;
13680 }

References __ASM.

◆ __RV_ZUNPKD831()

__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD831 ( unsigned long  a)

ZUNPKD831 (Unsigned Unpacking Bytes 3 & 1)

Type: DSP

Syntax:

ZUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit unsigned halfwords of 32-bit chunks in a register.

Description:
For the ZUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit unsigned halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = ZE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = ZE16(Rs1.W[m].B[y])
// ZUNPKD810, x=1,y=0
// ZUNPKD820, x=2,y=0
// ZUNPKD830, x=3,y=0
// ZUNPKD831, x=3,y=1
// ZUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 13721 of file core_feature_dsp.h.

13722 {
13723  unsigned long result;
13724  __ASM volatile("zunpkd831 %0, %1" : "=r"(result) : "r"(a));
13725  return result;
13726 }

References __ASM.

◆ __RV_ZUNPKD832()

__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD832 ( unsigned long  a)

ZUNPKD832 (Unsigned Unpacking Bytes 3 & 2)

Type: DSP

Syntax:

ZUNPKD8xy Rd, Rs1
xy = {10, 20, 30, 31, 32}

Purpose:
Unpack byte x and byte y of 32-bit chunks in a register into two 16-bit unsigned halfwords of 32-bit chunks in a register.

Description:
For the ZUNPKD8(x)(*y*) instruction, it unpacks byte x and byte y of 32-bit chunks in Rs1 into two 16-bit unsigned halfwords and writes the results to the top part and the bottom part of 32-bit chunks in Rd.

Operations:

Rd.W[m].H[1] = ZE16(Rs1.W[m].B[x])
Rd.W[m].H[0] = ZE16(Rs1.W[m].B[y])
// ZUNPKD810, x=1,y=0
// ZUNPKD820, x=2,y=0
// ZUNPKD830, x=3,y=0
// ZUNPKD831, x=3,y=1
// ZUNPKD832, x=3,y=2
for RV32: m=0,
for RV64: m=1...0
Parameters
[in]aunsigned long type of value stored in a
Returns
value stored in unsigned long type

Definition at line 13767 of file core_feature_dsp.h.

13768 {
13769  unsigned long result;
13770  __ASM volatile("zunpkd832 %0, %1" : "=r"(result) : "r"(a));
13771  return result;
13772 }

References __ASM.

__ASM
#define __ASM
Pass information from the compiler to the assembler.
Definition: nmsis_gcc.h:55