Move Signed Constant Into Register and Sign Extend

MVK

 

 

 

 

Move Signed Constant Into Register and Sign Extend

 

 

 

 

 

 

 

MVK

 

 

 

 

 

 

 

 

 

 

Syntax

 

 

 

 

MVK (.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

Execution

Pipeline

The 16-bit signed constant, cst, is sign extended and placed in dst.

In most cases, the C6000 assembler and linker issue a warning or an error when a constant is outside the range supported by the instruction. In the case of MVK .S, a warning is issued whenever the constant is outside the signed 16-bit range, −32768 to 32767 (or FFFF 8000h to 0000 7FFFh).

For example:

MVK .S1 0x00008000X, A0

will generate a warning; whereas:

MVK .S1 0xFFFF8000, A0

will not generate a warning.

if (cond) scst dst else nop

Pipeline

StageE1

Read

Written dst

Unit in use

.S

 

 

SPRU733

Instruction Set

3-183

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