SIMD 8-bit Unpacking InstructionsΒΆ

__STATIC_FORCEINLINE unsigned long __RV_SUNPKD810(unsigned long a)
__STATIC_FORCEINLINE unsigned long __RV_SUNPKD820(unsigned long a)
__STATIC_FORCEINLINE unsigned long __RV_SUNPKD830(unsigned long a)
__STATIC_FORCEINLINE unsigned long __RV_SUNPKD831(unsigned long a)
__STATIC_FORCEINLINE unsigned long __RV_SUNPKD832(unsigned long a)
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD810(unsigned long a)
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD820(unsigned long a)
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD830(unsigned long a)
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD831(unsigned long a)
__STATIC_FORCEINLINE unsigned long __RV_ZUNPKD832(unsigned long a)
group NMSIS_Core_DSP_Intrinsic_SIMD_8B_UNPACK

SIMD 8-bit Unpacking Instructions.

there are 8 SIMD 8-bit Unpacking instructions.

Functions

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a

__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

Return

value stored in unsigned long type

Parameters
  • [in] a: unsigned long type of value stored in a