MVK/MVKL - Move a Signed Constant into a Register and Sign-Extend ('C64x)
Syntax
//c6000 dsp 结构中包括寄存器文件A 和寄存器文件B,其中A包括单元.L1 .S1 .M1 .D1 B包括.D2 .M2 .S2 .L2
Opcode map field used... For operand type Unit Opfield
cst
dst scst16
sint .S1, .S2
cst
dst scst5
sint .L1, .L2 00101
cst
dst scst5
sint .D1, .D2 000000
.S Unit
.L Unit
.D Unit
Description
MVK .S1 0x00008000X, A0
will generate a warning, whereas
MVK .S1 0 x FFFF8000, A0
will not generate a warning.
The MVKL instruction is equivalent to the MVK instruction, except that the MVKL disables the constant range checking normally performed by the assembler/linker. This allows MVKL to be paired with MVKH to generate 32-bit constants.
To load 32-bit constants, such as 0x1234 ABCD, 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
Pipeline
Pipeline
Stage E1
Read
Written dst
Unit in use .L, .S, or .D
Instruction Type
Single Cycle
Delay Slots
0
See Also
MVKH, MVKLH
Example 1
MVK .L2 ?,B8
Example 2
MVK .D2 14,B8
Example 3
MVKL .S1 5678h,A8
Example 4
MVKL .S1 0C678h,A8

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/60369.html