Browse Prior Art Database

Method to Insure that all Imprecise Floating-Point Signals are Delivered before Program Exit

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

Publishing Venue

IBM

Related People

Linam, SD: AUTHOR [+2]

Abstract

Disclosed is a software method to insure that all floating point traps are reported before a program exits on processors which support imprecise floating point exceptions.

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

Method to Insure that all Imprecise Floating-Point Signals are Delivered
before Program Exit

      Disclosed is a software method to insure that all floating
point traps are reported before a program exits on processors which
support imprecise floating point exceptions.

      Certain models of the RISC System/6000* implement imprecise
floating-point interrupts.  "Imprecise" means that several
instructions can execute between an instruction which would cause a
floating-point exception and the hardware actually reporting that
exception by an interrupt.  This means that a timing condition can
exist where a program could never have the last floating-point
interrupt reported before the program exits.

      A short subroutine (fp_flush_imprecise) is provided by the AIX*
operating system which has a sequence of instructions that guarantee
that all pending imprecise interrupts are reported immediately.

      This subroutine is used in conjunction with an AIX facility
called atexit().  atexit() allows the user to register certain code
which should be run immediately before the program exits.  A program
which uses imprecise floating-point interrupts uses the atexit()
facility to register the fp_flush_imprecise() subroutine to run just
before program exit.  This will insure that all imprecise
floating-point interrupts are delivered.

*  Trademark of IBM Corp.