Patent ID: 6675292
Filing Date: 2004-01-06
Classification: G06F

Abstract:
A method for handling IEEE 754 standard exceptions, the method comprising:employing a floating-point status register to report IEEE 754 exceptions comprising: providing a floating-point trap type field within said floating-point status register, said floating-point trap type field configured to indicate a floating-point exception cause; providing a trap enable mask field within said floating-point status register, said trap enable mask field configured to selectively mask or enable IEEE 754 standard exceptions, wherein the trap enable mask field includes flags corresponding to each of the IEEE 754 standard exceptions; providing a current exception field within said floating-point status register, said current exception field configured to indicate the occurrence of enabled IEEE 754 standard exceptions, wherein the current exception field includes flags corresponding to each of the IEEE 754 standard exceptions; providing an accrued exception field within said floating-point status register, said accrued exception field configured to indicate the occurrence of masked IEEE 754 standard exceptions, wherein the accrued exception field includes flags corresponding to each of the IEEE 754 standard exceptions; executing a first instruction; determining if an IEEE 754 exception occurred during execution of said first instruction; if an IEEE 754 exception did not occur during execution of said first instruction, clearing said current exception field and executing a next instruction; if executing said first instruction results in an IEEE 754 exception, determining if said first instruction was an SIMD instruction; if said first instruction was a regular non-SIMD instruction, determining if said IEEE 754 exception is masked by said trap enable mask field; if said IEEE 754 exception is masked by said trap enable mask field, logically ORing the corresponding IEEE 754 exception bit with a previous accrued exception field value, to create an updated accrued exception value, and placing said updated accrued exception value in said accrued exception field and clearing said current exception field; if said IEEE 754 exception is not masked by said trap enable mask field, setting said floating-point trap type field to IEEE 754 exception and setting a bit corresponding to the occurred IEEE 754 exception in said current exception field and executing an appropriate exception handler; if said first instruction causing said IEEE 754 exception is a SIMD instruction, determining if said IEEE 754 exception is masked by said trap enable mask field; if said IEEE 754 exception is not masked, clearing both said accrued exception field and said current exception field, and setting said floating-point trap type field to indicate an unfinished FPop exception has occurred and determining which of said SIMD sub-instructions generated said IEEE 754 exception; if said IEEE 754 exception is masked, logically ORing corresponding IEEE 754 exception bits resulting from said SMID sub-instructions with a previous accrued exception field value, to create an updated accrued exception value and placing said updated accrued exception value in said accrued exception field and clearing said current exception field.