Method and apparatus for performing range checks
AssigneeAT&T Bell Laboratories
InventorDwight D. Hill
Life of this patent
Estimating the term…
Abstract
Disclosed is a method and an apparatus for range checking a value in a programmable system. An instruction prefix LDRNG enables the checking of a value against one or both limits of a range of values. The value is calculated as part of the execution of a primary instruction which is any suitable instruction, such as ADD, MOVE, STORE, etc., that directly follows the prefix. During the execution of the primary instruction the range check is performed, and an exception is taken without completing execution of the primary instruction if the value does not lie within the range.
Claims30
A method of performing range checks of values in a programmable system, comprising the steps of:
- enabling the system for checking a value against at least one limit of a range of values, by executing a first instruction;
- obtaining the value, by executing in part a second instruction subsequent to executing the first instruction;
- comparing the value with the at least one limit during execution of the second instruction;
- and
- generating an indication during execution of the second instruction when the value lies outside of the range.
A method of performing range checks of values in a programmable system, comprising the steps of:
- selectively providing the system with a first instruction;
- enabling the system for checking a value against at least one limit of a range of values, by executing the first instruction;
- obtaining the value, by partly executing a second instruction after executing the first instruction;
- comparing the value with the at least one limit during execution of the second instruction, when the system is enabled for the checking;
- and
- generating an indication during execution of the second instruction when the value lies outside of the range and the system is enabled for the checking.
A method of performing a range check of a value in a programmable system which includes first, second, and third flag means, the method comprising the steps of:
- (1) obtaining at least one of a lower limit and an upper limit of a range of values by executing a first instruction;
- (2) setting at least the third flag means of the first, second, and third flag means, by executing the first instruction;
- (3) obtaining a value specified by a second instruction, by partly executing the second instruction directly following execution of the first instruction;
- (4) comparing the value with at least one of the lower and the upper limit during execution of the second instruction;
- (5) signaling during execution of the second instruction when both the value is exceeded by the lower limit and the first flag means are set;
- (6) signaling during execution of the second instruction when both the value exceeds the upper limit and the second flag means are set;
- (7) testing for signaling during execution of the second instruction when the third flag means are set;
- (8) continuing execution of the second instruction when the testing indicates no signaling;
- and
- (9) discontinuing execution of the second instruction when the testing indicates signaling.
A programmable system comprising:
- means responsive to execution of a first instruction for enabling the system to check a value against at least one limit of a range of values;
- instruction executing means for obtaining the value, by executing in part a second instruction subsequent to execution of the first instruction;
- means for comparing the value with the at least one limit during execution of the second instruction;
- and
- means responsive to the comparing means and to the enabling means for generating during execution of the second instruction an indication when the value lies outside of the range and the system is enabled to check the value against a limit of the range.
A programmable system comprising:
- instruction executing means for executing a first instruction and for obtaining a value by partly executing a second instruction;
- means responsive to the execution of the first instruction preceding execution of the second instruction for enabling the system to check during execution of the second instruction the value against at least one limit of a range of values;
- means for comparing the value with the at least one limit during execution of the second instruction;
- and
- means responsive to the comparing means and to the enabling means for generating an indication during execution of the second instruction when both the value lies outside of the range and the system is enabled to check the value against a limit of the range.
A programmable system comprising:
- storage means for storing as their contents upper and lower limits of a range of values;
- settable flag means;
- instruction execution means for executing instructions;
- means responsive to execution of a first instruction by the instruction execution means for selectively storing the upper and lower limits in the storage means and for selectively setting the flag means;
- means for generating a value in response to partial execution by the instruction execution means of a second instruction subsequent to the execution of the first instruction;
- means responsive to the means for generating a value, for comparing the value with the contents of the storage means and for generating a range check signal indicating results of the comparison, during execution of the second instruction;
- and
- means responsive during execution of the second instruction to the range check signal and to the flag means for controlling further execution of the second instruction by the execution means.
Dependencies are inferred from the claim text.