DIVU

Unsigned division

DIVU

DIVide Unsigned


[Syntax]

DIVU src, dest

 

[Operation]

dest = dest / src;

 

[Function]

-

This instruction divides dest by src as unsigned 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.

 

[Instruction Format]

Syntax

Processng Size

Operand

Code Size

(Byte)

src

dest

DIVU src, dest

L

#SIMM:8

Rd

4

L

#SIMM:16

Rd

5

L

#SIMM:24

Rd

6

L

#IMM:32

Rd

7

L

Rs

Rd

3

L

[Rs].memex

Rd

3(memex == UB)

4(memex != UB)

L

dsp:8[Rs].memex

Rd

4(memex == UB)

5(memex != UB)

L

dsp:16[Rs].memex

Rd

5(memex == UB)

6(memex != UB)

[Flag Change]

Flag

C

Z

F

O

Change

 

[Condition]

O:The flag is set if the divisor (src) is 0; otherwise it is cleared.

 

[Description Example]

DIVU #10, R2

DIVU R1, R2

DIVU [R1], R2

DIVU 3[R1].UB, R2