Shift significand of decimal floating point data
AssigneeInternational Business Machines Corporation
InventorsShawn D. Lundvall, Eric M. Schwarz, Ronald M. Smith, Sr., Phil C. Yeh
Life of this patent
Estimating the term…
Abstract
A decimal floating point finite number in a decimal floating point format is composed from the number in a different format. A decimal floating point format includes fields to hold information relating to the sign, exponent and significand of the decimal floating point finite number. Other decimal floating point data, including infinities and NaNs (not a number), are also composed. Decimal floating point data are also decomposed from the decimal floating point format to a different format. For composition and decomposition, one or more instructions may be employed, including a shift significand instruction.
Claims18
A method for executing a machine instruction in a central processing unit, the method comprising:
- obtaining, by a processor, a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising an opcode, one register field, another register field, an index field, a base field, and a displacement value;
- performing a shift function on a significand of a decimal floating point datum as that function is defined by the opcode of the machine instruction, wherein the significand is stored in a location designated by the one register field, the shift function comprising shifting in one direction one or more decimal digits of the significand a number of positions specified by a plurality of second operand bits determined using the index field, the base field and displacement value of the machine instruction;
- and
- placing a result of the shift function in a location designated by the other register field.
A computer system for executing a machine instruction in a central processing unit, the system comprising:
- a memory;
- and
- a processor in communications with the memory, wherein the computer system is configured to perform a method comprising:
- obtaining a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising an opcode, one register field, another register field, an index field, a base field, and a displacement value;
- performing a shift function on a significand of a decimal floating point datum as that function is defined by the opcode of the machine instruction, wherein the significand is stored in a location designated by the one register field, the shift function comprising shifting in one direction one or more decimal digits of the significand a number of positions specified by a plurality of second operand bits determined using the index field, the base field and displacement value of the machine instruction;
- and
- placing a result of the shift function in a location designated by the other register field.
A computer program product for executing a machine instruction in a central processing unit, the computer program product comprising a non-transitory computer readable storage medium readable by a processor and storing instructions for execution by the processor for performing a method comprising:
- obtaining a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising an opcode, one register field, another register field, an index field, a base field, and a displacement value;
- performing a shift function on a significand of a decimal floating point datum as that function is defined by the opcode of the machine instruction, wherein the significand is stored in a location designated by the one register field, the shift function comprising shifting in one direction one or more decimal digits of the significand a number of positions specified by a plurality of second operand bits determined using the index field, the base field and displacement value of the machine instruction;
- and
- placing a result of the shift function in a location designated by the other register field.
Dependencies are inferred from the claim text.