EXTRACTU

 

 

 

EXTRACTU Extract Unsigned Bit Field

EXTRACTU

 

(DALU)

 

 

Operation

Assembler Syntax

Db[(offset + width – 1):offset] → Dn[(width – 1):0]

 

 

0 → Dn[39:width]

 

 

width = #U6; offset = #u6

EXTRACTU #U6,#u6,Db,Dn

 

 

{0 U6 40}

 

 

{0

u6 40}

 

 

{#U6+#u6 40}

width = Da[13:8]; offset = Da[5:0]

EXTRACTU Da,Db,Dn

 

 

{0 Da[13:8] 40}

 

 

{0

Da[5:0] 40}

{Da[13:8]+Da[5:0] 40}

Description

These operations extract a bit field from a source data register (Db) and place it in a destination data register (Dn), right-aligned and zero-extended. The extracted field is an unsigned integer. If the offset is zero, this instruction can be used to zero-extend an arbitrary width unsigned integer.

EXTRACTU #U6,#u6,Db,Dn

Uses two immediate unsigned 6-bit integers for the width (#U6) and offset (#u6).

EXTRACTU Da,Db,Dn

Uses a supplemental data register (Da) for the width (bits 13:8) and the offset (5:0).

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

Ln

L

Clears the Ln bit in the destination register.

Example

extractu #$c,#$e,d2,d4

Register/Memory Address

immediate (width)

immediate (offset)

D2

L4:D4

Before

$C

$E

$FF 8665 4321

$0:$00 0000 0000

After

$0:$00 0000 0995

SC140 DSP Core Reference Manual

A-173

Page 487
Image 487
Freescale Semiconductor SC140 Extractu Extract Unsigned Bit Field, Extractu #$c,#$e,d2,d4, Extractu #U6,#u6,Db,Dn