Decimal shift and divide instruction
AssigneeInternational Business Machines Corporation
InventorsJonathan D. Bradbury, Steven R. Carlough, Reid T. Copeland, Silvia Melitta Mueller, Eric M. Schwarz
Life of this patent
Estimating the term…
Abstract
An instruction to perform a shift and divide operation is executed. The executing includes shifting a value in a specified direction by a selected amount to provide a dividend, the selected amount being user-defined. The dividend is divided by a divisor to obtain a quotient. At least a subset of the quotient is selected as a result. The result is to be used in processing within the computing environment.
Claims12
A computer program product for facilitating processing within a computing environment, the computer program product comprising:
- a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:
- obtaining a single instruction for execution, the single instruction to perform a shift and divide operation;
- and
- executing the single instruction, the executing comprising:
- shifting a value in a specified direction by a selected amount to provide a dividend, the selected amount being user-defined;
- dividing the dividend by a divisor to obtain a quotient;
- selecting at least a subset of the quotient as a result in a signed packed decimal format;
- determining a sign for the result from a mask field of the single instruction;
- and
- placing the result and the sign in a selected location, wherein the sign is placed to a right of a decimal digit in the signed packed decimal format of the result in the selected location, the result to be used in processing within the computing environment.
A computer system for facilitating processing within a computing environment, the computer system comprising:
- a memory;
- and
- a processor in communication with the memory, wherein the computer system is configured to perform a method, said method comprising:
- obtaining a single instruction for execution, the single instruction to perform a shift and divide operation;
- and executing the single instruction, the executing comprising:
- shifting a value in a specified direction by a selected amount to provide a dividend, the selected amount being user-defined;
- dividing the dividend by a divisor to obtain a quotient;
- selecting at least a subset of the quotient as a result in a signed packed decimal format;
- determining a sign for the result from a mask field of the single instruction;
- and
- placing the result and the sign in a selected location, wherein the sign is placed to a right of a decimal digit in the signed packed decimal format of the result in the selected location, the result to be used in processing within the computing environment.
Dependencies are inferred from the claim text.