Processor and method for generating a pointer
AssigneeInternational Business Machines Corporation
InventorJames Leigh Taylor
Life of this patent
Estimating the term…
Abstract
A processor is provided for calculating an output pointer to a first data item by combination of an input pointer to a second data item with an offset. The processor includes logic for generating, in a single operation, a zero value for the output pointer when the input pointer is zero and an output pointer value calculated as the offset value added to, or subtracted from, the input pointer value when the input pointer is non-zero.
Claims9
A processor for calculating an output pointer, pointing to a first data item, by combination of an input pointer, pointing to a second data item, with an offset, the processor comprising:
- logic for generating, in a single operation, a zero value for the output pointer when the value of the input pointer is zero and an output pointer value calculated as the offset value added to or subtracted from, the input pointer value when the input pointer value is non-zero.
A method in a processor for generating object code which calculates an output pointer to a first data member by combination of an input pointer to a second data member and an offset, the method comprising the steps of:
- compiling source code defining the mapping between the input and output pointers to generate object code which when executed on the processor of a data processing system causes, in a single operation, the generation of a zero output when the input pointer value is zero or the generation of an output pointer value equal to the offset value added to, or subtracted from, the input pointer value when the input pointer is non-zero.
A software compiler for generating object code which when executed on a processor calculates an output pointer to a first data member by combination of an input pointer to a second data member and an offset, the compiler including:
- means for generating a single instruction primitive which when executed on a processor of a data processing system causes the generation of a zero output when the input pointer value is zero and causes the generation of an output pointer value equal to the offset value added to, or subtracted from, the input pointer value when the input pointer value is non-zero.
A computer program product comprising a computer readable medium having recorded thereon object program code which when executed on a processor causes the processor to generate a value for an output pointer, pointing to a first data member, by combining a value for an input pointer, pointing to a second data member, and an offset, the object program code including a processor instruction that generates, in a single operation, a zero value for the output pointer when the input pointer value is zero and an output pointer value calculated as the offset value added to, or subtracted from, the input pointer value when the input pointer value is non-zero.
Processor Logic for calculating an effective address by combining a base address and an offset, the processor logic including load/store logic for generating, in a single operation, a zero value for the effective address when the base address is zero and an effective address calculated as the offset added to, or subtracted from, the base address when the base address is non-zero.
Dependencies are inferred from the claim text.