Texas Instruments TMS320C67X/C67X+ DSP User Manual

Page 243

Advertising
background image

Move Signed Constant Into Register and Sign Extend

MVK

3-183

Instruction Set

SPRU733

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

1

5

16

1 1

Opcode map field used...

For operand type...

Unit

cst16
dst

scst16
sint

.S1, .S2

Description

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.

Execution

if (cond) scst → dst

else nop

Pipeline
Stage

E1

Read

Written

dst

Unit in use

.S

Pipeline

Advertising