Apparatus and method for controlling instruction execution behaviour
First Claim
1. An apparatus, comprising:
- a set of bounded pointer storage elements, each bounded pointer storage element to store a pointer having associated range information indicative of an allowable range of addresses when using said pointer;
a set of data registers to store data values;
processing circuitry to execute a sequence of instructions; and
a control storage element to store a current instruction context;
the processing circuitry being responsive to execution of at least one instruction in said sequence that specifies a pointer reference for a required pointer, where the pointer reference is within at least a first subset of values;
to use the pointer reference to identify one of the data registers whose stored data value forms the required pointer, when the current instruction context identifies a default state;
to use the pointer reference to identify one of the bounded pointer storage elements whose stored pointer forms the required pointer, when the current instruction context identifies a bounded pointer state;
to determine an address from the required pointer;
when the current instruction context identifies the bounded pointer state, to perform a bound check operation to check that the determined address is within the allowable range of addresses indicated by the associated range information for said one of the bounded pointer storage elements; and
when the current instruction context identifies the default state, to perform a default bound check operation to check that the determined address is within a default allowable range of addresses.
1 Assignment
0 Petitions
Accused Products
Abstract
An apparatus and method are provided for controlling instruction execution behaviour. The apparatus includes a set of data registers for storing data values, and a set of bounded pointer storage elements, where each bounded pointer storage element stores a pointer having associated range information indicative of an allowable range of addresses when using that pointer. A control storage element stores a current instruction context, and that current instruction context is used to influence the behaviour of at least one instruction executed by processing circuitry, that at least one instruction specifying a pointer reference for a required pointer, where the pointer reference is within at least a first subset of values (in one embodiment the behaviour is influenced irrespective of the value of the required pointer). In particular, when the current instruction context identifies a default state, the processing circuitry uses the pointer reference to identify one of the data registers whose stored data value forms the required pointer. However, when the current instruction context identifies a bounded pointer state, the processing circuitry instead uses the pointer reference to identify one of the bounded pointer storage elements whose stored pointer forms the required pointer. This allows an instruction set to be provided that can be used for both bounded pointer aware code and bounded pointer unaware code, without significantly increasing the pressure on instruction set encoding space.
-
Citations
25 Claims
-
1. An apparatus, comprising:
-
a set of bounded pointer storage elements, each bounded pointer storage element to store a pointer having associated range information indicative of an allowable range of addresses when using said pointer; a set of data registers to store data values; processing circuitry to execute a sequence of instructions; and a control storage element to store a current instruction context; the processing circuitry being responsive to execution of at least one instruction in said sequence that specifies a pointer reference for a required pointer, where the pointer reference is within at least a first subset of values; to use the pointer reference to identify one of the data registers whose stored data value forms the required pointer, when the current instruction context identifies a default state; to use the pointer reference to identify one of the bounded pointer storage elements whose stored pointer forms the required pointer, when the current instruction context identifies a bounded pointer state; to determine an address from the required pointer; when the current instruction context identifies the bounded pointer state, to perform a bound check operation to check that the determined address is within the allowable range of addresses indicated by the associated range information for said one of the bounded pointer storage elements; and when the current instruction context identifies the default state, to perform a default bound check operation to check that the determined address is within a default allowable range of addresses. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
-
-
24. A method of controlling instruction execution behaviour within an apparatus having a set of bounded pointer storage elements, each bounded pointer storage element for storing a pointer having associated range information indicative of an allowable range of addresses when using said pointer, and having a set of data registers for storing data values, the method comprising:
-
storing within a control storage element a current instruction context; on executing at least one instruction that specifies a pointer reference for a required pointer, where the pointer reference is within at least a first subset of values; using the pointer reference to identify one of the data registers whose stored data value forms the required pointer, when the current instruction context identifies a default state; using the pointer reference to identify one of the bounded pointer storage elements whose stored pointer forms the required pointer, when the current instruction context identifies a bounded pointer state; determining an address from the required pointer; when the current instruction context identifies the bounded pointer state, performing a bound check operation to check that the determined address is within the allowable range of addresses indicated by the associated range information for said one of the bounded pointer storage elements; and when the current instruction context identifies the default state, performing a default bound check operation to check that the determined address is within a default allowable range of addresses.
-
-
25. An apparatus, comprising:
-
a set of bounded pointer storage means, each bounded pointer storage means for storing a pointer having associated range information indicative of an allowable range of addresses when using said pointer; a set of data register means for storing data values; processing means for executing a sequence of instructions; and a control storage means for storing a current instruction context; the processing means, responsive to execution of at least one instruction in said sequence that specifies a pointer reference for a required pointer, where the pointer reference is within at least a first subset of values; for using the pointer reference to identify one of the data register means whose stored data value forms the required pointer, when the current instruction context identifies a default state; for using the pointer reference to identify one of the bounded pointer storage means whose stored pointer forms the required pointer, when the current instruction context identifies a bounded pointer state; for determining an address from the required pointer; when the current instruction context identifies the bounded pointer state, for performing a bound check operation to check that the determined address is within the allowable range of addresses indicated by the associated range information for said one of the bounded pointer storage means; and when the current instruction context identifies the default state, for performing a default bound check operation to check that the determined address is within a default allowable range of addresses.
-
Specification