Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What will be the value of the TOP field in the x87 FPU Status Word after two

ID: 3680529 • Letter: 1

Question

1. What will be the value of the TOP field in the x87 FPU Status Word after two FLD instructions have been issued?

2. If the variable B contained a double value of 80386.0, and it was repetitively multiplied by itself, what status bit in the x87 FPU Status Word would eventually be set?

a. Overflow Exception Flag

b. Zero Divide Exception Flag

c. Denormalized Operand Exception Flag

d. Stack Fault

3. (True or False) If a mask bit in the x87 FPU Control Word is set to 1, the corresponding exception represented by a bit in the x87 FPU Status Word is prevented.

4. Which of the following will avoid stack faults in the x87 floating point unit?

a. Use the FSAVE instruction to preserve the environment.

b. Always match each FLD instruction with an FSTP instruction

c. Only use double precision floating point, not 80-bit floating point

d, None of these

5. The FCOMI instruction sets:

a. The C0, C1, C2, and C3 status bits in the x87 status word

b. The C0, C2, and C3 status bits in the x87 status word

c. The ZF, PF, and CF flags in the EFLAGS register

d. None of these

6. What controls the precision of the x87 floating point unit?

a. PC field (bits 8 and 9 of the x87 FPU control word)

b. RC field of the x87 FPU control word (bits 10 and 11)

c. Precision exception mask of the x87 FPU control word

d. Size of the operand of the FLD instruction

7. Which instruction will save both the MMX and XMM registers as well as the x87 state?

a. FSTENV

b, FSAVE

c. FINIT

d. FXSAVE

8. The x87 tag register indicates the value in the registers of the x87 stack. Which instruction marks a register as empty?

a. FBLD

b. FCOMI

c. FISTP

d. FXCH

9. What does the FLDZ instruction do?

10. Which instruction determines if the ST[0] value is infinity?

a. FLD

b. FISTP

c. FTST

d. FXAM

11. Which x87 register would you use to determine if ST(3) was zero?

a. x87 Control Register

b. x87 Status Register

c. x87 Tag Register

d. None of these

12. What does the following sequence of code do? Assume Die, Too, Are, AreToo, For, and Airy are doubles, Too contains 2.0, For contains 4.0, and the x87 is initialized to use the size of doubles.

FLD Die

FDIV Too

FST Are

FMUL Are

FSTP AreToo

FLDPI

FMUL AreToo

FMUL For

FSTP Airy

It is:

Explanation / Answer

5. The FCOMI instruction sets:

c. The ZF, PF, and CF flags in the EFLAGS register

6. What controls the precision of the x87 floating point unit?

a. PC field (bits 8 and 9 of the x87 FPU control word)

7. Which instruction will save both the MMX and XMM registers as well as the x87 state?

d. FXSAVE

8. The x87 tag register indicates the value in the registers of the x87 stack. Which instruction marks a register as empty?

d. FXCH

9. What does the FLDZ instruction do?

This instruction is basically used to load +0.0 in the ST(0