324_Book

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ,%eax,1) %ebx %ebp,%esp %ebp Figure 3.38: Disassembled Code For Problem 3.36. Homework Problem 3.39 [Category 2]: Use the asm statement to implement a function with the following prototype: void full_umul(unsigned x, unsigned y, unsigned dest); This function should compute the full 64-bit product of its arguments and store the results in the destination array, with dest[0] having the low-order 4 bytes and dest[1] having the high-order 4 bytes. Homework Problem 3.40 [Category 2]: The fscale instruction computes the function Ü ¡ ¾ÊÌ ´Ýµ for floating-point values Ü and Ý , where ÊÌ denotes the round-toward-zero function, rounding positive numbers downward and negative numbers upward. The arguments to fscale come from the floating-point register stack, with Ü in %st(0) and Ý in %st(1). It writes the computed value written %st(0) without popping the second argument. (The actual implementation of this instruction works by adding ÊÌ ´Ý µ to the exponent of Ü). Using an asm statement, implem...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online