IP Library › Granted Patent US 10,289,420
Granted Patent B2
US 10,289,420 · App. 14/953,308 · Granted May 14, 2019

Lightweight interrupts for floating point exceptions using enable bit in branch event status and control register (BESCR)

Inventors: Giles R. Frazier (Austin, TX); Michael Karl Gschwind (Chappaqua, NY)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F9/3861G06F9/30101G06F9/4486
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,289,420
App. No.
14/953,308
Granted
May 14, 2019
Kind
B2
Abstract

Embodiments relate to lightweight interrupts for floating point exceptions. An aspect includes, based on an exception occurring in a floating point unit of a processor during execution of an application, sending a lightweight interrupt corresponding to the exception to the application; and handling the exception by an exception handler of the application.

Claims (29)

1. A computer implemented method for lightweight interrupts for floating point exceptions via a branch event status and control register (BESCR) of a processor, wherein the BESCR of the processor includes a floating point exception enable bit, the computer implemented method comprising:

determining the status of the floating point exception enable bit of the BESCR;

when the floating point exception enable bit of the BESCR is set, based on an exception occurring in a floating point unit of the processor in response to a floating point operation issued during execution of an application, sending a lightweight interrupt corresponding to the exception to the application and handling the exception by an exception handler of the application; and

when the floating point exception enable of the BESCR is not set, polling a floating point status configuration register (FPSCR) of the processor by the application to determine whether the exception occurred and handling the exception by the exception handler of the application.

2. The computer implemented method of claim 1 , wherein the BESCR of the processor further includes a floating point exception occurred bit.

3. The computer implemented method of claim 2 , further comprising, based on the exception occurring, setting the floating point exception occurred bit of the BESCR, and unsetting the floating point exception enable bit of the BESCR.

4. The computer implemented method of claim 2 , further comprising, based on completion of handling of the exception by the exception handler of the application, unsetting the floating point exception occurred bit of the BESCR, and setting the floating point exception enable bit of the BESCR.

5. The computer implemented method of claim 1 , wherein the lightweight interrupt is sent to the application further based on a configuration of a machine state register of the processor, and further comprising, based on the configuration of the machine state register being set to disable handling of floating point exceptions by the application, handling the exception by supervisor software.

6. A computer program product for implementing lightweight interrupts for floating point exceptions via a branch event status and control register (BESCR) of a processor, wherein the BESCR of the processor includes a floating point exception enable bit, the computer program product comprising:

a computer readable storage medium having program instructions embodied therewith, the program instructions readable by a processing circuit to cause the processing circuit to perform a method comprising:

determining the status of the floating point exception enable bit of the BESCR;

when the floating point exception enable bit of the BESCR is set, based on an exception occurring in a floating point unit of the processor in response to a floating point operation issued during execution of an application, sending a lightweight interrupt corresponding to the exception to the application and handling the exception by an exception handler of the application; and

when the floating point exception enable of the BESCR is not set polling a floating point status configuration register (FPSCR) of the processor by the application to determine whether the exception occurred and handling the exception by the exception handler of the application.

7. The computer program product of claim 6 , wherein the BESCR of the processor further includes a floating point exception occurred bit.

8. The computer program product of claim 7 , the method further comprising, based on the exception occurring, setting the floating point exception occurred bit of the BESCR, and unsetting the floating point exception enable bit of the BESCR.

9. The computer program product of claim 7 , the method further comprising, based on completion of handling of the exception by the exception handler of the application, unsetting the floating point exception occurred bit of the BESCR, and setting the floating point exception enable bit of the BESCR.

10. The computer program product of claim 6 , wherein the lightweight interrupt is sent to the application further based on a configuration of a machine state register of the processor, and further comprising, based on the configuration of the machine state register being set to disable handling of floating point exceptions by the application, handling the exception by supervisor software.

11. A computer system for lightweight interrupts for floating point exceptions, the computer system comprising:

a memory; and

a processor, communicatively coupled to said memory, wherein the processor includes a floating point unit and a branch event status and control register (BESCR), wherein the BESCR of the processor includes a floating point exception enable bit, wherein the computer system configured to perform a method comprising:

determining the status of the floating point exception enable bit of the BESCR;

when the floating point exception enable bit of the BESCR is set, based on an exception occurring in a floating point unit of the processor in response to a floating point operation issued during execution of an application, sending a lightweight interrupt corresponding to the exception to the application and handling the exception by an exception handler of the application; and

when the floating point exception enable of the BESCR is not set polling a floating point status configuration register (FPSCR) of the processor by the application to determine whether the exception occurred and handling the exception by the exception handler of the application.

12. The computer system of claim 11 , wherein the BESCR of the processor further includes a floating point exception occurred bit.

13. The computer system of claim 12 , the method further comprising, based on the exception occurring, setting the floating point exception occurred bit of the BESCR, and unsetting the floating point exception enable bit of the BESCR.

14. The computer system of claim 12 , the method further comprising, based on completion of handling of the exception by the exception handler of the application, unsetting the floating point exception occurred bit of the BESCR, and setting the floating point exception enable bit of the BESCR.

15. The computer implemented method of claim 1 , the method further comprising when the floating point exception enable of the BESCR is set, disabling polling the FPSCR of the processor by the application.

16. The computer program product of claim 6 , the method further comprising, when the floating point exception enable of the BESCR is set, disabling polling the FPSCR of the processor by the application.

17. The computer system of claim 11 , the method further comprising, when the floating point exception enable of the BESCR is set, disabling polling the FPSCR of the processor by the application.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 28, 2015
From: FRAZIER, GILES R.; GSCHWIND, MICHAEL KARL
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 037161/0368 →
Continuity (1)
Related Publication 20170153897A1 · Jun 1, 2017