IP Library Granted Patent US 12693859
Granted Patent B2
US 12693859 · App. 18/732,923 · Granted Jul 28, 2026

Convert instruction with overflow result control

Inventors: Kerstin Claudia Schelm (Stuttgart, DE); Bruce Conrad Giamei (Lagrangeville, NY); Timothy J Slegel (Staatsburg, NY); Jonathan D. Bradbury (Poughkeepsie, NY); Reid Copeland (Ontario, CA); Xin Guo (Toronto, CA); Michael Klein (Schoenaich, DE); Petra Leber (Ehningen, DE); Andreas Wagner (Wildberg, DE)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F9/30025G06F9/30038G06F9/30094G06F9/30036G06F9/30185
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 12693859
App. No.
18/732,923
Granted
Jul 28, 2026
Kind
B2
Abstract

An instruction configured to perform data conversion is executed. The executing the instruction includes determining that an overflow condition exists in a change of a value, specified by the instruction, from one data format to another data format. It is determined that an overflow result control of the instruction is set to a selected value. A result of executing the instruction is provided. The providing the result includes placing a chosen default value in a result location based on determining that the overflow condition exists and that the overflow result control is set to the selected value.

Claims (88)

1 . A computer program product comprising:

a set of one or more computer-readable storage media; and

program instructions, collectively stored in the set of one or more computer-readable storage media, for causing at least one computing device to perform computer operations including:

executing an instruction on a computing device of the at least one computing device, the instruction configured to perform data conversion, the executing the instruction including:

determining that an overflow condition exists in a change of a value, specified by the instruction, from one data format to another data format, wherein the determining that the overflow condition exists includes:

executing the instruction to perform up to a selected number of converting operations to change the value from the one data format to the another data format, the selected number of converting operations being dependent on a size of a result location; and

determining that one or more additional operations over the selected number of converting operations is to be performed to complete the change of the value from the one data format to the another data format, wherein the determining that the one or more additional operations is to be performed signifies that the overflow condition exists, and

wherein the determining that the overflow condition exists occurs absent performing the one or more additional operations, such that one or more processing cycles are saved by not completing the change and still detecting the overflow condition;

determining that an overflow result control of the instruction is set to a selected value; and

providing a result of executing the instruction, the providing the result including placing a chosen default value in the result location based on determining that the overflow condition exists and that the overflow result control is set to the selected value.

2 . The computer program product of claim 1 , wherein the one data format is a decimal data format and the another data format is a binary data format.

3 . The computer program product of claim 1 , wherein the chosen default value includes a selected number of zeros.

4 . The computer program product of claim 1 , wherein the overflow result control is included in a mask field of the instruction.

5 . The computer program product of claim 1 , wherein the value is included in at least one register specified by the instruction, the overflow result control is included in a mask field of the instruction and the result location is at least one register specified by the instruction.

6 . The computer program product of claim 1 , wherein the instruction further includes a condition code set control, and based on the condition code set control being set to a particular value, a condition code is provided based on executing the instruction.

7 . The computer program product of claim 1 , wherein the computer operations further include:

executing the instruction another time, wherein the executing the instruction the another time includes:

determining that the overflow condition exists in the change of another value from the one data format to the another data format;

determining that the overflow result control of the instruction is set to another selected value; and

providing another result of executing the instruction the another time, the providing the another result including placing at least a portion of a result value of the change of the another value in the result location based on determining that the overflow condition exists and that the overflow result control is set to the another selected value.

8 . The computer program product of claim 1 , wherein the computer operations further include:

executing the instruction a further time, wherein the executing the instruction the further time includes:

determining that the overflow condition does not exist in the change of a further value from the one data format to the another data format; and

providing a further result of executing the instruction the further time, the providing the further result including placing a result value of the change of the further value in the result location based on determining that the overflow condition does not exist.

9 . A computer system comprising:

at least one computing device;

a set of one or more computer-readable storage media; and

program instructions, collectively stored in the set of one or more computer-readable storage media, for causing the at least one computing device to perform computer operations including:

executing an instruction on a computing device of the at least one computing device, the instruction configured to perform data conversion, the executing the instruction including:

determining that an overflow condition exists in a change of a value, specified by the instruction, from one data format to another data format, wherein the determining that the overflow condition exists includes:

executing the instruction to perform up to a selected number of converting operations to change the value from the one data format to the another data format, the selected number of converting operations being dependent on a size of a result location; and

determining that one or more additional operations over the selected number of converting operations is to be performed to complete the change of the value from the one data format to the another data format, wherein the determining that the one or more additional operations is to be performed signifies that the overflow condition exists, and

wherein the determining that the overflow condition exists occurs absent performing the one or more additional operations, such that one or more processing cycles are saved by not completing the change and still detecting the overflow condition;

determining that an overflow result control of the instruction is set to a selected value; and

providing a result of executing the instruction, the providing the result including placing a chosen default value in the result location based on determining that the overflow condition exists and that the overflow result control is set to the selected value.

10 . The computer system of claim 9 , wherein the value is included in at least one register specified by the instruction, the overflow result control is included in a mask field of the instruction and the result location is at least one register specified by the instruction.

11 . The computer system of claim 9 , wherein the computer operations further include:

executing the instruction a further time, wherein the executing the instruction the further time includes:

determining that the overflow condition does not exist in the change of a further value from the one data format to the another data format; and

providing a further result of executing the instruction the further time, the providing the further result including placing a result value of the change of the further value in the result location based on determining that the overflow condition does not exist.

12 . The computer system of claim 9 , wherein the instruction further includes a condition code set control, and based on the condition code set control being set to a particular value, a condition code is provided based on executing the instruction.

13 . The computer system of claim 9 , wherein the computer operations further include:

executing the instruction another time, wherein the executing the instruction the another time includes:

determining that the overflow condition exists in the change of another value from the one data format to the another data format;

determining that the overflow result control of the instruction is set to another selected value; and

providing another result of executing the instruction the another time, the providing the another result including placing at least a portion of a result value of the change of the another value in the result location based on determining that the overflow condition exists and that the overflow result control is set to the another selected value.

14 . A computer-implemented method comprising:

executing an instruction on a computing device, the instruction configured to perform data conversion, the executing the instruction including:

determining that an overflow condition exists in a change of a value, specified by the instruction, from one data format to another data format, wherein the determining that the overflow condition exists includes:

executing the instruction to perform up to a selected number of converting operations to change the value from the one data format to the another data format, the selected number of converting operations being dependent on a size of a result location;

determining that one or more additional operations over the selected number of converting operations is to be performed to complete the change of the value from the one data format to the another data format, wherein the determining that the one or more additional operations is to be performed signifies that the overflow condition exists, and

wherein the determining that the overflow condition exists occurs absent performing the one or more additional operations, such that one or more processing cycles are saved by not completing the change and still detecting the overflow condition;

determining that an overflow result control of the instruction is set to a selected value; and

providing a result of executing the instruction, the providing the result including placing a chosen default value in the result location based on determining that the overflow condition exists and that the overflow result control is set to the selected value.

15 . The computer-implemented method of claim 14 , wherein the value is included in at least one register specified by the instruction, the overflow result control is included in a mask field of the instruction and the result location is at least one register specified by the instruction.

16 . The computer-implemented method of claim 14 , further including:

executing the instruction a further time, wherein the executing the instruction the further time includes:

determining that the overflow condition does not exist in the change of a further value from the one data format to the another data format, and

providing a further result of executing the instruction the further time, the providing the further result including placing a result value of the change of the further value in the result location based on determining that the overflow condition does not exist.

17 . The computer-implemented method of claim 14 , wherein the instruction further includes a condition code set control, and based on the condition code set control being set to a particular value, a condition code is provided based on executing the instruction.

18 . The computer-implemented method of claim 14 , further including:

executing the instruction another time, wherein the executing the instruction the another time includes:

determining that the overflow condition exists in the change of another value from the one data format to the another data format;

determining that the overflow result control of the instruction is set to another selected value; and

providing another result of executing the instruction the another time, the providing the another result including placing at least a portion of a result value of the change of the another value in the result location based on determining that the overflow condition exists and that the overflow result control is set to the another selected value.

19 . A computer program product comprising:

a set of one or more computer-readable storage media; and

program instructions, collectively stored in the set of one or more computer-readable storage media, for causing at least one computing device to perform computer operations including:

executing an instruction on a computing device of the at least one computing device, the executing the instruction including:

executing, as part of executing the instruction, at least one converting operation of a plurality of converting operations to be executed to change a value specified by the instruction from one data format to another data format, wherein the at least one converting operation but less than the plurality of converting operations is executed;

determining that an overflow condition occurred based on executing the at least one converting operation, wherein the determining is performed based on executing the at least one converting operation to change the value from the one data format to the another data format and prior to completing execution of the plurality of converting operations to change the value, in which one or more processing cycles are saved by not completing the change and still detecting the overflow condition;

determining that an overflow result control of the instruction is set to a selected value; and

providing a result of executing the instruction, the providing the result including placing a chosen default value in a result location based on determining that the overflow condition occurred and that the overflow result control is set to the selected value.

20 . The computer program product of claim 19 , wherein the value is included in at least one register specified by the instruction, the overflow result control is included in a mask field of the instruction and the result location is at least one register specified by the instruction.

21 . The computer program product of claim 19 , wherein the instruction further includes a condition code set control, and based on the condition code set control being set to a particular value, a condition code is provided based on executing the instruction.

22 . A computer-implemented method comprising:

executing an instruction on a computing device, the executing the instruction including:

executing, as part of executing the instruction, at least one converting operation of a plurality of converting operations to be executed to change a value specified by the instruction from one data format to another data format, wherein the at least one converting operation but less than the plurality of converting operations is executed;

determining that an overflow condition occurred based on executing the at least one converting operation, wherein the determining is performed based on executing the at least one converting operation to change the value from the one data format to the another data format and prior to completing execution of the plurality of converting operations to change the value, in which one or more processing cycles are saved by not completing the change and still detecting the overflow condition;

determining that an overflow result control of the instruction is set to a selected value; and

providing a result of executing the instruction, the providing the result including placing a chosen default value in a result location based on determining that the overflow condition occurred and that the overflow result control is set to the selected value.

23 . The computer-implemented method of claim 22 , wherein the value is included in at least one register specified by the instruction, the overflow result control is included in a mask field of the instruction and the result location is at least one register specified by the instruction.

24 . The computer-implemented method of claim 22 , wherein the instruction further includes a condition code set control, and based on the condition code set control being set to a particular value, a condition code is provided based on executing the instruction.

25 . The computer-implemented method of claim 22 , further including:

executing the instruction another time, wherein the executing the instruction the another time includes:

determining that the overflow condition exists in the change of another value from the one data format to the another data format;

determining that the overflow result control of the instruction is set to another selected value; and

providing another result of executing the instruction the another time, the providing the another result including placing at least a portion of a result value of the change of the another value in the result location based on determining that the overflow condition exists and that the overflow result control is set to the another selected value.