Exercises

1:

Discuss why a computer architecture may exhibit a considerable degree of similarity between its integer instruction set and its floating-point instruction set.

2:

What form(s) of the fmerge instruction would be equivalent to

  1. the fabs pseudo-op

  2. the fneg pseudo-op

  3. the fnegabs pseudo-op

  4. the mov pseudo-op

  5. setting f1 to +0.0

  6. setting f1 to +1.0

  7. setting f1 to 1.0

3:

(Documentation search) Explain why the optional address increment in ldfp instructions is of fixed size only.

4:

When two floating-point quantities are to be added, their binary points must be aligned by shifting bits in the fraction and simultaneously incrementing or decrementing the exponent field of one of them. Explain whether a more accurate result would be obtained by adjusting the smaller or the larger number.

5:

The integers that a computer can represent using 64 bits are evenly spaced. The floating-point numbers that a computer can represent using 64 bits are not. Explain.

6:

Write an Itanium assembly language program containing lists of the coefficients for two trinomials that will evaluate the product, ( a1 + b1x + c1x2)( a2 + b2y + c2y2), given values of x and y, putting the numeric result into register f8.

7:

The signum function, SGN(x), is defined as +1.0, 0, or 1.0 according to whether the argument is positive, zero, or negative. Write what you believe to be the shortest possible implementation of an in-line instruction sequence computing the signum function of data type double-precision floating-point for an argument of type double-precision floating-point (argument in register fa, result in register fs).

8:

Explain why, when a full signed 128-bit product is wanted, the low part should be captured using unsigned multiplication and the high part using signed multiplication (as asserted at the end of Section 8.7.2).

9:

Rewrite DECNUM2 to use data conversion instructions and floating-point division by 10. What is the largest magnitude of integer (expressed as a power of 2) that can be treated exactly by this method, assuming that the IEEE double-precision memory format was involved for intermediate storage somewhere along the line?

10:

Modify APPROXPI to print the mean and variance from N=10 replications for a given value of TOPS. Compute the standard deviation and the standard deviation of the mean, manually, from the variance. Explore resetting different values of TOPS to determine whether the standard deviation and/or the discrepancy between p and the mean are in proportion to the square root of TOPS (i.e., draw a graph plotting those results vertically versus the square root of TOPS horizontally).

11:

Write an assembly language function and test it from a main program written in a high-level language of your choice. Pass arguments to the function by reference, and pass a result back in register r8 or f8 as appropriate. Select one of the following:

  1. Function LOW( List,N) that finds the lowest value in a list of N signed floating-point numbers.

  2. Function POS_LOW( List,N) that returns the index location (counting from zero) where the lowest value occurs in a list of N signed floating-point numbers.



ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net