RACW
|
Round the accumulator word
|
RACW
|
Round ACcumulator Word
|
[Syntax]
RACW src
[Operation]
signed long long tmp;
tmp = (signed long long) ACC << src;
tmp = tmp + 0000000080000000h;
if (tmp > (signed long long) 00007FFF00000000h)
ACC = 00007FFF00000000h;
else if (tmp < (signed long long) FFFF800000000000h)
ACC = FFFF800000000000h;
else
ACC = tmp & FFFFFFFF00000000h
[Function]
- | This instruction rounds the value of the accumulator into a word and stores the result in the accumulator. |
- | The RACW instruction is executed according to the following procedures. |
- | The value of the accumulator is shifted to the left by one or two bits as specified by src |
- | The value of the accumulator changes according to the value of 64 bits after the contents have been shifted to the left by one or two bits. |
[Instruction Format]
|
|
|
RACW src
|
#IMM:1
(IMM:1 = 1~2)
|
|
[Flag Change]
- | This instruction does not affect the states of flags. |
[Description Example]
RACW #1
RACW #2