Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method to Report if a Floating-Point Interrupt was Precise or Imprecise

IP.com Disclosure Number: IPCOM000113114D
Original Publication Date: 1994-Jul-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 77K

Publishing Venue

IBM

Related People

Linam, SD: AUTHOR [+3]

Abstract

Disclosed is a method for a program to determine if a floating-point exception trap on a RISC System/6000* processor was precise or imprecise. The RISC System/6000 and PowerPC* processors are capable of generating traps when floating-point exceptions occur. Depending on a selectable mode, these traps can be either precise or imprecise. Precise means that the instruction address at the time of the trap points to the instruction which caused the trap; imprecise means it points somewhere beyond that instruction.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Method to Report if a Floating-Point Interrupt was Precise or Imprecise

      Disclosed is a method for a program to determine if a
floating-point exception trap on a RISC System/6000* processor was
precise or imprecise.  The RISC System/6000 and PowerPC* processors
are capable of generating traps when floating-point exceptions occur.
Depending on a selectable mode, these traps can be either precise or
imprecise.  Precise means that the instruction address at the time of
the trap points to the instruction which caused the trap; imprecise
means it points somewhere beyond that instruction.

      Also, certain floating-point operations (such as square root)
are implemented in hardware on certain platforms and not others.
Where not implemented in hardware such instructions must be
implemented in software.  Such a software routine must be able to
generate a trap for an exceptional operation.  In this case the trap
will always be considered imprecise, since there is no single
instruction associated with the operation.  Additionally, users can
cause floating-point exception traps using the kill() system call.
This case is also always considered imprecise.

      A signal handler is a user subroutine that is run when certain
interrupts occur.  A user can create a signal handler subroutine
which will run when a floating-point exception trap occurs.  A signal
handler subroutine must be able to determine if a trap was precise or
imprecise, because the actions the signal handler subroutine can take
depend on this.

      The PowerPC hardware architecture defines a bit in the SRR1
register hich, at the time of a trap caused by a floating-point
exception, indicates if the trap was precise or imprecise.  The POWER
architecture for the RISC System/6000 has no such indicator.  In the
POWER architecture all models have a precise trapping mode, where
floating-point traps are precise.  Some models have an imprecise trap
mode as well, and the hardware is designed such that traps generated
in this mode are always imprecise.  On POWER architecture platforms
precise floating-point interrupts are presented on the Program
Interrupt (PI) vector.  Imprecise interrupt...