Loads With Zero Or Sign Extension - Analog Devices ADSP-BF53x Blackfin Reference

Table of Contents

Advertisement

For example:
;
R0 = [ I2 ]
loads a 32-bit value from an address pointed to by
destination register
R0.H = W [ I2 ]
loads a 16-bit value from an address pointed to by
16-bit destination register
;
[ P1 ] = R0
is an example of a 32-bit store operation.
Pointer registers can be used for 8-bit loads and stores.
For example:
B [ P1++ ] = R0
stores the 8-bit value from the
register, then increments the
P1

Loads With Zero or Sign Extension

When a 32-bit register is loaded by an 8-bit or 16-bit memory read, the
value can be extended to the full register width. A trailing Z character in
parenthesis is used to zero-extend the loaded value. An X character forces
sign extension. The following examples assume that
ory location that contains a value of 0x8080.
R0 = W[P1] (Z) ;
R1 = W[P1] (X) ;
R2 = B[P1] (Z) ;
R3 = B[P1] (X) ;
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
.
R0
;
R0.H.
;
register in the address pointed to by the
R0
register.
P1
/*
R0 = 0x0000 8080 */
/*
R1 = 0xFFFF 8080 */
/*
R2 = 0x0000 0080 */
/*
R3 = 0xFFFF FF80 */
Address Arithmetic Unit
and stores it in the
I2
and stores it in the
I2
points to a mem-
P1
5-9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-bf56x blackfin

Table of Contents