In the syntax, comment (b) identifies 32-bit instruction length.
Functional Description
The Bit Field Extraction instruction moves only specific bits from the scene_reg into the low-order bits of the dest_reg. The user determines the length of the pattern bit field and its position in the scene field.
Example
Bit Field Extraction Unsigned
r7 = extract (r4, r3.l) (z) ; /* zero-extended*/
If
R4=0b1010 0101 1010 0101 1100 0011 1010 1010 where this is the scene bit field
R3=0bxxxx xxxx xxxx xxxx 0000 0111 0000 0100 where bits 15–8 are the position, and bits 7–0 are the length
then the Bit Field Extraction (unsigned) instruction produces:
R7=0b0000 0000 0000 0000 0000 0000 0000 0111
If
R4=0b1010 0101 1010 0101 1100 0011 1010 1010 where this is the scene bit field
R3=0bxxxx xxxx xxxx xxxx 0000 1101 0000 1001 where bits 15–8 are the position, and bits 7–0 are the length
then the Bit Field Extraction (unsigned) instruction produces:
R7=0b0000 0000 0000 0000 0000 0001 0010 1110
Bit Field Extraction Sign-Extended
r7 = extract (r4, r3.l) (x) ; /* sign-extended*/
If
R4=0b1010 0101 1010 0101 1100 0011 1010 1010 where this is the scene bit field
R3=0bxxxx xxxx xxxx xxxx 0000 0111 0000 0100 where bits 15–8 are the position, and bits 7–0 are the length
then the Bit Field Extraction (sign-extended) instruction produces:
R7=0b0000 0000 0000 0000 0000 0000 0000 0111
If
R4=0b1010 0101 1010 0101 1100 0011 1010 1010 where this is the scene bit field
R3=0bxxxx xxxx xxxx xxxx 0000 1101 0000 1001 where bits 15–8 are the position, and bits 7–0 are the length
Then the Bit Field Extraction (sign-extended) instruction produces: