Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

MIPS assembly multiplication

$
0
0
mult	$t3,$t4		#  multiply 32-bit quantities in $t3 and $t4, and store 64-bit
			#  result in special registers Lo and Hi:  (Hi,Lo) = $t3 * $t4



So, the result of a multiplication is a 64bit number. Is it possible to return this number in a register? Obviously one can not simply just mfhi and mflo into one register. I guess, that if the Hi register == 0, then one can simply just ignore it. However if Hi is not empty, then how would one represent the multiplication? Just print the Hi register and then print the Lo register? Just store both components in separate registers or spaces in memory with the knowledge that they both represent one number?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>