Architecture

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MADD

 

 

 

 

Multiply/Add

 

 

MADD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

31

26 25

21 20

16 15

11 10

6 5

0

 

 

 

MADD / MADDU

 

 

rs

 

rt

 

rd

 

0

 

MADD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

011100

 

 

 

 

 

 

 

 

00000

 

000000

 

 

6

 

 

5

 

5

 

5

 

5

 

6

 

 

Format :

MADD rs, rt

MADD rd, rs, rt

Description :

Multiplies the contents of general registers rs and rt, treating both values as two's complement, and puts the double-word result in special registers HI and LO. An overflow exception is never raised. The low-order word of the multiplication result is put in general register rd and in special register LO, whereas the high-order word of the result is put in special register HI.

If rd is omitted in assembly language, 0 is used as the default value. To guarantee correct operation even if an interrupt occurs, neither of the two instructions following MADD should be DIV or DIVU instructions which modify the HI and LO register contents.

Operation :

T:t (HI LO) + GPR[rs]*GPR[rt]

LO t31..0 HI t63..32

GPR[rd] t31..0

Exceptions :

None

155

Page 166
Image 166
Toshiba TX39 user manual Multiply/Add