Question: # float.s # floating-point multiplication .text .globl fmult # Preconditions: # 1st parameter (a0) single precision floating point multiplicand # 2nd parameter (a1) single precision

 # float.s # floating-point multiplication .text .globl fmult # Preconditions: #

# float.s # floating-point multiplication .text .globl fmult # Preconditions: # 1st parameter (a0) single precision floating point multiplicand # 2nd parameter (a1) single precision floating point multiplier # Postconditions: # result (v0) single precision floating point product fmult: # v0 = 0, the default result # return if multiplicand is zero # return if multiplier is zero # place mask for leftmost bit in t5 # t5 = 0x80000000 # place sign of multiplicand in t0 # mask off exponent and significand # place sign of multiplier in t1 # mask off exponent and significand # place sign of product in t2 # t2 = xor of signs # place exponent of multiplicand in t0 # shift to remove sign bit # shift to remove significand bits # subract exponent bias # place exponent of multiplier in t1 # shift to remove sign bit # shift to remove significand bits # subract exponent bias # place exponent of product in t3 # ignore the possibility of overflow or underflow # t3 = sum of exponents # add exponent bias # place significand of multiplicand in t0 # shift to remove exponent # restore implicit 1 to left of significand # place significand of multiplier in t1 # shift to remove exponent # restore implicit 1 to left of significand # place significand of product in t4 # ignore rounding and overflow # multiply significands (unsigned) # t4 = high word of product # branch if already normalized # shift significand to normalize # adjust exponent norm: # shift to remove implicit 1 # assemble product in v0 # shift exponent into proper position # shift significand into proper position # place sign in v0 # place exponent in v0 # place significand in v0 return: # return

Complete the assembly code for the fmult function. Ignore the possibility of overflow and underflow, and do not round the result. If you need an immediate value that is larger than 16 bits, such as for a mask, use the li pseudo-instruction to first load the value into a register. After restoring the implicit most-significant bit of the significand, it is a 24-bit number with 23 bits to the right of the binary point and 1 bit to the left. When multiplying two such numbers, the result is a 48-bit number with 46 bits to the right of the binary point and 2 bits to the left. Check the left-most bit of the result to determine whether or not it is necessary to normalize. Complete the assembly code for the fmult function. Ignore the possibility of overflow and underflow, and do not round the result. If you need an immediate value that is larger than 16 bits, such as for a mask, use the li pseudo-instruction to first load the value into a register. After restoring the implicit most-significant bit of the significand, it is a 24-bit number with 23 bits to the right of the binary point and 1 bit to the left. When multiplying two such numbers, the result is a 48-bit number with 46 bits to the right of the binary point and 2 bits to the left. Check the left-most bit of the result to determine whether or not it is necessary to normalize

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!