Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Лаб2012 / 25366517.pdf
Скачиваний:
80
Добавлен:
02.02.2015
Размер:
3.33 Mб
Скачать

FLOATING-POINT EXCEPTIONS SUMMARY

Table C-4. Exceptions Generated with SSE2 Instructions (Contd.)

Instruction

Description

#I

#D

#Z

#O

#U

#P

 

 

 

 

 

 

 

 

SUBPD

Subtract Packed Double-

Y

Y

 

Y

Y

Y

 

Precision.

 

 

 

 

 

 

SUBSD

Subtract Scaler Double-

Y

Y

 

Y

Y

Y

 

Precision.

 

 

 

 

 

 

UCOMISD

Compare lower DP FP number in

Y

Y

 

 

 

 

 

XMM1 register with lower DP FP

 

 

 

 

 

 

 

number in XMM2/Mem and set

 

 

 

 

 

 

 

the status flags accordingly.

 

 

 

 

 

 

UNPCKHPD

Interleaves DP FP numbers from

 

 

 

 

 

 

 

the high halves of XMM1 and

 

 

 

 

 

 

 

XMM2/Mem into XMM1 register.

 

 

 

 

 

 

UNPCKLPD

Interleaves DP FP numbers from

 

 

 

 

 

 

 

the low halves of XMM1 and

 

 

 

 

 

 

 

XMM2/Mem into XMM1 register.

 

 

 

 

 

 

XORPD

XOR 128 bits from XMM2/Mem

 

 

 

 

 

 

 

to XMM1 register.

 

 

 

 

 

 

C.5 SSE3 INSTRUCTIONS

Table C-5 lists the SSE3 instructions that have at least one of the following characteristics:

have floating-point operands

generate floating-point results

For each instruction, the table summarizes the floating-point exceptions that the instruction can generate.

Table C-5. Exceptions Generated with SSE3 Instructions

Instruction

Description

#I

#D

#Z

#O

#U

#P

ADDSUBPD

Add /Sub packed DP FP

Y

Y

 

Y

Y

Y

 

numbers from XMM2/Mem to

 

 

 

 

 

 

 

XMM1.

 

 

 

 

 

 

ADDSUBPS

Add /Sub packed SP FP

Y

Y

 

Y

Y

Y

 

numbers from XMM2/Mem to

 

 

 

 

 

 

 

XMM1.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FISTTP

See Table C-2.

Y

 

 

 

 

Y

 

 

 

 

 

 

 

 

HADDPD

Add horizontally packed DP FP

Y

Y

 

Y

Y

Y

 

numbers XMM2/Mem to XMM1.

 

 

 

 

 

 

HADDPS

Add horizontally packed SP FP

Y

Y

 

Y

Y

Y

 

numbers XMM2/Mem to XMM1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HSUBPD

Sub horizontally packed DP FP

Y

Y

 

Y

Y

Y

 

numbers XMM2/Mem to XMM1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C-10 Vol. 1

FLOATING-POINT EXCEPTIONS SUMMARY

Table C-5. Exceptions Generated with SSE3 Instructions (Contd.)

Instruction

Description

#I

#D

#Z

#O

#U

#P

HSUBPS

Sub horizontally packed SP FP

Y

Y

 

Y

Y

Y

 

numbers XMM2/Mem to XMM1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LDDQU

Load unaligned integer 128-bit.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MOVDDUP

Move 64 bits representing one

 

 

 

 

 

 

 

DP data from XMM2/Mem to

 

 

 

 

 

 

 

XMM1 and duplicate.

 

 

 

 

 

 

MOVSHDUP

Move 128 bits representing 4

 

 

 

 

 

 

 

SP data from XMM2/Mem to

 

 

 

 

 

 

 

XMM1 and duplicate high.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MOVSLDUP

Move 128 bits representing 4

 

 

 

 

 

 

 

SP data from XMM2/Mem to

 

 

 

 

 

 

 

XMM1 and duplicate low.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Vol. 1 C-11

FLOATING-POINT EXCEPTIONS SUMMARY

C-12 Vol. 1

D

Guidelines for

Writing X87 FPU

Exception Handlers

APPENDIX D

GUIDELINES FOR WRITING X87 FPU

EXCEPTION HANDLERS

As described in Chapter 8, Programming with the x87 FPU, the IA-32 Architecture supports two mechanisms for accessing exception handlers to handle unmasked x87 FPU exceptions: native mode and MS-DOS compatibility mode. The primary purpose of this appendix is to provide detailed information to help software engineers design and write x87 FPU exception-handling facilities to run on PC systems that use the MS-DOS compatibility mode1 for handling x87 FPU exceptions. Some of the information in this appendix will also be of interest to engineers who are writing native-mode x87 FPU exception handlers. The information provided is as follows:

Discussion of the origin of the MS-DOS x87 FPU exception handling mechanism and its relationship to the x87 FPU’s native exception handling mechanism.

Description of the IA-32 flags and processor pins that control the MS-DOS x87 FPU exception handling mechanism.

Description of the external hardware typically required to support MS-DOS exception handling mechanism.

Description of the x87 FPU’s exception handling mechanism and the typical protocol for x87 FPU exception handlers.

Code examples that demonstrate various levels of x87 FPU exception handlers.

Discussion of x87 FPU considerations in multitasking environments.

Discussion of native mode x87 FPU exception handling.

The information given is oriented toward the most recent generations of IA-32 processors, starting with the Intel486. It is intended to augment the reference information given in Chapter 8, Programming with the x87 FPU.

A more extensive version of this appendix is available in the application note AP-578, Software and Hardware Considerations for x87 FPU Exception Handlers for Intel Architecture Processors (Order Number 243291), which is available from Intel.

1Microsoft Windows* 95 and Windows 3.1 (and earlier versions) operating systems use almost the same x87 FPU exception handling interface as MS-DOS. The recommendations in this appendix for a MS-DOS compatible exception handler thus apply to all three operating systems.

Vol. 1 D-1

Соседние файлы в папке Лаб2012