Move Signed Constant Into Register and Sign Extend−Used with MVKH

 

MVKL

 

 

 

 

Move Signed Constant Into Register and Sign Extend

 

 

 

 

 

 

 

MVKL

 

 

 

 

 

 

 

 

 

 

Syntax

 

 

 

 

MVKL (.unit) cst, dst

 

 

 

 

 

 

 

 

 

 

 

 

 

.unit = .S1 or .S2

 

 

 

 

 

 

 

 

Compatibility

 

 

C62x, C64x, C67x, and C67x+ CPU

 

 

 

 

 

 

 

 

Opcode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

31

29

28

27

23

22

7

6

5

4

3

2

1

0

creg

z

dst

cst16

0 1 0 1 0 s p

3 15161 1

Opcode map field used...

For operand type...

Unit

 

 

 

cst16

scst16

.S1, .S2

dst

sint

 

 

 

 

Description

The MVKL pseudo-operation sign extends the 16-bit constant, cst16, and

 

places it in dst.

 

The MVKL instruction is equivalent to the MVK instruction (page 3-183),

 

except that the MVKL instruction disables the constant range checking

 

normally performed by the assembler/linker. This allows the MVKL instruction

 

to be paired with the MVKH instruction (page 3-185)to generate 32-bit

 

constants.

 

 

To load 32-bit constants, such as 1234 ABCDh, use the following pair of

 

instructions:

 

MVKL

.S1

0x0ABCD, A4

 

MVKLH .S1

0x1234, A4

 

This could also be used:

 

MVKL

.S1

0x1234ABCD, A4

 

MVKH

.S1

0x1234ABCD, A4

Use this to load the address of a label:

MVKL .S2 label, B5

MVKH .S2 label, B5

Execution

if (cond) scst dst

 

else nop

SPRU733

Instruction Set

3-187

Page 247
Image 247
Texas Instruments TMS320C67X/C67X+ DSP manual Move Signed Constant Into Register and Sign Extend, Mvkl