DIV
|
Signed division
|
DIV
|
DIVide
|
[Syntax]
DIV src, dest
[Operation]
dest = dest / src;
[Function]
- | This instruction divides dest by src as signed values and places the quotient in dest. The quotient is rounded towards 0. |
- | The calculation is performed in 32 bits and the result is placed in 32 bits. |
- | The value of dest is undefined when the divisor (src) is 0 or when overflow is generated after the operation. |
[Instruction Format]
|
|
|
|
|
DIV src, dest
|
|
#SIMM:8
|
Rd
|
|
|
#SIMM:16
|
Rd
|
|
|
#SIMM:24
|
Rd
|
|
|
#IMM:32
|
Rd
|
|
|
Rs
|
Rd
|
|
|
[Rs].memex
|
Rd
|
|
|
dsp:8[Rs].memex
|
Rd
|
|
|
dsp:16[Rs].memex
|
Rd
|
|
[Flag Change]
Conditions
O : This flag is set if the divisor (src) is 0 or the calculation is -2147483648 / -1; otherwise it is cleared.
[Description Example]
DIV #10, R2
DIV R1, R2
DIV [R1], R2
DIV 3[R1].B, R2