Apparatus and method for supporting a conversion instruction
AssigneeArm Limited
InventorsDavid Raymond Lutz, Neil Burgess, Kelvin Domnic Goveas
Life of this patent
Estimating the term…
Abstract
A data processing system includes instruction decoder circuitry responsive to a conversion instruction FCVTJS to convert a double precision floating point number into a 32-bit integer number. Right shifting circuitry performs a right shift upon at least part of the input number and left shifting circuitry performs a left shift of at least part of the input number. Selection circuitry serves to select one of the right shifted number and the left shifted number as a selected shifted number which forms at least part of the output number which is generated.
Claims13
Apparatus for processing data comprising:
- processing circuitry to perform one or more processing operations specified by program instruction;
- and
- an instruction decoder to decode said program instructions to generate one or more control signals to control said processing circuitry to perform processing operations specified by said program instruction;
- wherein
- said program instruction includes a conversion instruction to convert an input number to an output number;
- said processing circuitry comprises:
- right shifting circuitry to perform a right shift upon at least part of said input number to generate a right shifted number in response to said instruction decoder decoding said conversion instruction;
- left shifting circuitry to perform a left shift upon at least part of said input number to generate a left shifted number in response to said instruction decoder decoding said conversion instruction;
- and
- selection circuitry to select one of said right shifted number and said left shifted number as a selected shifted number to form at least part of said output number;
- wherein said input number is a floating-point number having an exponent value E and a significand value S, and said output number is an N-bit integer number having an integer value;
- wherein said selection circuitry is configured to select said left shifted number as said selected shifted number when said floating point number is greater than a maximum number representable as said integer number;
- and
- wherein in response to said conversion instruction, said instruction decoder is configured to control both the right shifting circuitry to perform the right shift and the left shifting circuitry to perform the left shift.
A method of processing data comprising:
- performing one or more processing operations specified by program instruction;
- and
- decoding said program instruction to generate one or more control signals to control performance of processing operations specified by said program instruction;
- wherein said program instruction includes a conversion instruction to convert an input number to an output number, which when decoded, generates one or more control signals to control performance of the processing operations including:
- performing a right shift upon at least part of said input number to generate a right shifted number in response to decoding of said conversion instruction;
- performing a left shift upon at least part of said input number to generate a left shifted number in response to decoding of said conversion instruction;
- and
- selecting one of said right shifted number and said left shifted number as a selected shifted number to form at least part of said output number;
- wherein said input number is a floating-point number having an exponent value E and a significand value S, and said output number is an N-bit integer number having an integer value;
- wherein said selecting includes selecting said left shifted number as said selected shifted number when said floating point number is greater than a maximum number representable as said integer number;
- and
- wherein both the right shift and the left shift are performed in response to the same conversion instruction.
Dependencies are inferred from the claim text.