This preview shows page 1. Sign up to view the full content.
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 having the low-order 4 bytes and dest having the high-order 4 bytes. Homework Problem 3.40 [Category 2]: The fscale instruction computes the function Ü ¡ ¾ÊÌ ´Ýµ for ﬂoating-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 ﬂoating-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