Rev. 1.50, 10/04, page 277 of 448
10.1.36 MOVCO (Move Conditional): Data Transfer Instruction
Format
Operation
Instruction Code
Cycle
T Bit
MOVCO.L R0,@Rn
LDST
→
T
if (T==1) R0
→
(Rn)
0
→
LDST
0000nnnn01110011
1 LDST
Description:
MOVCO is used in combination with MOVLI to realize an atomic read-modify-
write operation in a single processor.
This instruction copies the value of the LDST flag to the T bit. When the T bit is set to 1, the value
of R0 is stored at the address in Rm. If the T bit is cleared to 0, the value is not stored at the
address in Rm. Finally, the LDST flag is cleared to 0. Since the LDST flag is cleared by an
instruction or exception, storage by the MOVCO instruction only proceeds when no interrupt or
exception has occurred between the execution of the MOVLI and MOVCO instructions.
Notes:
None
Operation:
MOVCO(long n) /* MOVCO Rn,@Rn */
{
T = LDST;
if(T==1)
Write_Long(R[n],R[0]);
LDST = 0;
PC += 2
}
Summary of Contents for SuperH SH-4A
Page 2: ...Rev 1 50 10 04 page ii of xx ...
Page 8: ...Rev 1 50 10 04 page viii of xx ...
Page 116: ...Rev 1 50 10 04 page 96 of 448 ...
Page 178: ...Rev 1 50 10 04 page 158 of 448 ...
Page 206: ...Rev 1 50 10 04 page 186 of 448 ...
Page 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Page 446: ...Rev 1 50 10 04 page 426 of 448 ...
Page 468: ...Rev 1 50 10 04 page 448 of 448 ...
Page 471: ......
Page 472: ...SH 4A Software Manual ...