Mechanism to detect IEEE underflow exceptions on speculative...

Electrical computers: arithmetic processing and calculating – Electrical digital calculating computer – Particular function performed

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C708S525000, C712S222000, C712S244000

Reexamination Certificate

active

06571265

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Technical Field
This invention relates to processors, and in particular to methods for detecting underflow during selected processor operations.
2. Background Art
High-performance processors are being designed to execute multiple instructions in parallel at clock frequencies in excess of one gigahertz. However, the instruction-executing capabilities of these processors have begun to outstrip the availability of instructions to execute due to the limited amount of instruction level parallelism (ILP) in any given section of program code. ILP refers to the availability of instructions that can be executed in parallel.
An instruction can be scheduled to execute in parallel, i.e. simultaneously, with a group of instructions if the instruction does not require a result generated by one of the instructions in the group, i.e. if the instruction does not depend on any of the other instructions. To increase ILP, some compilers locate non-dependent instructions within a specified scope of the code section being scheduled, and schedule these non-dependent instructions for simultaneous execution with instructions in the code section.
Branch instructions complicate instruction scheduling by introducing an element of indeterminacy into the sequence of instructions executed by a processor (“execution path”). A branch instruction sends the processor down one of two or more execution paths, depending on the resolution of an associated branch condition. An instruction on one of the execution paths that follow the branch instruction is said to be “guarded” by the branch instruction, since its execution status, i.e. whether or not it should have been executed, is determined by how the branch is resolved. Control speculation is the compiler optimization through which an instruction is rescheduled for execution before the branch that guards its execution. Executing the instruction prior to the branch that guards it is deemed speculative, because it is not known whether the instruction actually needs to be executed until the branch condition is subsequently resolved.
When an instruction is speculatively executed, certain events that the instruction may trigger should not be registered until the instruction's execution status is resolved. For example, a processor performs various checks on the result generated by each floating-point instruction to determine whether the result meets certain size or format standards. A result that does not meet these standards is deemed exceptional and can trigger a call to an “exception handler”. The exceptions for floating-point operations are defined by the IEEE 754-1985 Standard for Binary Arithmetic Operations (IEEE 754). For example, an overflow (underflow) exception occurs when a numerical result is too large (small) to be represented in the format specified for the result.
The occurrence of an exception may be indicated by the state of a corresponding status flag that is set under control of the floating-point hardware that generates the result. When the exception is enabled (unmasked) and the corresponding status flag indicates the exception occurred, an exception handler is invoked to address the exception. If the exception is disabled (masked), the exception handler is not invoked even if the corresponding status flag indicates the exception occurred. Masking all exceptions for speculative instructions prevents a processor from expending resources on an instruction before its execution status is determined. If the speculatively executed instruction is not on the processor's execution path, any resource employed to handle an exception it raises are wasted.
One difficulty with speculatively executed floating-point instructions is that under IEEE 754 the underflow status flag is set under different conditions, depending on whether or not the underflow exception is masked. When the underflow exception is unmasked, the underflow status flag is set if a calculated number is smaller than the smallest number that can be represented in the format specified for the number, i.e. when the result is determined to be “tiny”. If the underflow exception is masked, the underflow exception status flag is set if the result is both “tiny” and “inexact”, i.e. it can not be expressed exactly. An instruction may thus generate different results, depending on whether it is executed normally, i.e. in its original order, or speculatively.
The present invention provides a mechanism for addressing these and other problems associated with exception handling for speculatively executed instructions.
SUMMARY OF THE INVENTION
The present invention provides a mechanism for detecting underflow conditions in speculatively executed floating-point instructions.
A method in accordance with the present invention masks an underflow exception for a floating-point instruction, and executes the instruction. If a result generated by the instruction is less than a specified minimum value, a status flag is set.
For one embodiment of the invention, the status flag is read if a point of registration associated with the instruction is reached and an unmasked underflow exception is raised if the status flag is set. For another embodiment of the invention, the status flag is a sticky bit in a floating-point status register, and the status flag is cleared by executing a clear flag(s) instruction.


REFERENCES:
patent: 4961161 (1990-10-01), Kojima
patent: 5410657 (1995-04-01), Olson et al.
patent: 5546551 (1996-08-01), Kohn
patent: 5673426 (1997-09-01), Shen et al.
patent: 5805918 (1998-09-01), Blomgren et al.
patent: 5812439 (1998-09-01), Hansen
patent: 5826070 (1998-10-01), Olson et al.
patent: 6044454 (2000-03-01), Schwarz et al.
patent: 6058470 (2000-05-01), Webb et al.
patent: 6151669 (2000-11-01), Huck et al.
patent: 6219685 (2001-04-01), Story
patent: US00/25490 (2000-09-01), None

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Mechanism to detect IEEE underflow exceptions on speculative... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Mechanism to detect IEEE underflow exceptions on speculative..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Mechanism to detect IEEE underflow exceptions on speculative... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3038185

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.