Data processing apparatus and method
First Claim
1. A data processing apparatus comprising:
- processing circuitry configured to perform processing operations;
an instruction decoder responsive to program instructions to generate control signals for controlling said processing circuitry to perform said processing operations;
wherein;
said program instructions include a bitfield manipulation instruction identifying at least a first source data value comprising at least one first source data element each having N bits <
N−
1;
0>
, a second source data value comprising at least one second source data element each having N bits <
N−
1;
0>
, and a control value;
said control value includes information for indicating a bitfield width W, a source bit position A and a result bit position B, where 1≦
W≦
N, 0≦
A≦
N−
W and 0≦
B≦
N−
W; and
said instruction decoder is responsive to said bitfield manipulation instruction to generate control signals for controlling said processing circuitry to generate a result data value comprising at least one result data element, each result data element corresponding to a corresponding first source data element and a corresponding second source data element, each result data element having N bits <
N−
1;
0>
comprising;
(a) bits <
B+W−
1;
B>
having bit values corresponding to bits <
A+W−
1;
A>
of said corresponding first source data element; and
(b) if B+W<
N, bits <
N−
1;
B+W>
having bit values corresponding to a prefix value selected, in dependence on said control value, as one of (i) a first prefix value comprising bits each having a zero value, (ii) a second prefix value having the bit values of bits <
N−
1;
B+W>
of said corresponding second source data element, and (iii) a third prefix value having bit values corresponding to a sign extension of bits <
A+W−
1;
A>
of said corresponding first source data element.
1 Assignment
0 Petitions
Accused Products
Abstract
A data processing apparatus 2 comprises a processing circuit 4 and instruction decoder 6. A bitfield manipulation instruction controls the processing apparatus 2 to generate at least one result data element from corresponding first and second source data elements src1, src2. Each result data element includes a portion corresponding to a bitfield bf of the corresponding first source data element src1. Bits of the result data element that are more significant than the inserted bitfield bf have a prefix value p that is selected, based on a control value specified by the instruction, as one of a first prefix value having a zero value, a second prefix value having the value of a portion of the corresponding second source data element src2, and a third prefix value corresponding to a sign extension of the bitfield bf of the first source data element src1.
26 Citations
32 Claims
-
1. A data processing apparatus comprising:
-
processing circuitry configured to perform processing operations; an instruction decoder responsive to program instructions to generate control signals for controlling said processing circuitry to perform said processing operations;
wherein;said program instructions include a bitfield manipulation instruction identifying at least a first source data value comprising at least one first source data element each having N bits <
N−
1;
0>
, a second source data value comprising at least one second source data element each having N bits <
N−
1;
0>
, and a control value;said control value includes information for indicating a bitfield width W, a source bit position A and a result bit position B, where 1≦
W≦
N, 0≦
A≦
N−
W and 0≦
B≦
N−
W; andsaid instruction decoder is responsive to said bitfield manipulation instruction to generate control signals for controlling said processing circuitry to generate a result data value comprising at least one result data element, each result data element corresponding to a corresponding first source data element and a corresponding second source data element, each result data element having N bits <
N−
1;
0>
comprising;(a) bits <
B+W−
1;
B>
having bit values corresponding to bits <
A+W−
1;
A>
of said corresponding first source data element; and(b) if B+W<
N, bits <
N−
1;
B+W>
having bit values corresponding to a prefix value selected, in dependence on said control value, as one of (i) a first prefix value comprising bits each having a zero value, (ii) a second prefix value having the bit values of bits <
N−
1;
B+W>
of said corresponding second source data element, and (iii) a third prefix value having bit values corresponding to a sign extension of bits <
A+W−
1;
A>
of said corresponding first source data element.- View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18)
(a) a data element size N of said at least one first source data element, said at least one second source data element and said at least one result data element; and (b) which bits of said second portion indicate said most significant bit position S and said rotation parameter R.
-
-
11. The data processing apparatus according to claim 1, wherein if said first source data value comprises a plurality of first source data elements, said second source data value comprises a plurality of second source data elements and said result data value comprises a plurality of result data elements, then said control value includes data element ordering information for indicating an order with which said plurality of result data elements are arranged within said result data value.
-
12. The data processing apparatus according to claim 11, wherein if said first source data value comprises a plurality of first source data elements, said second source data value comprises a plurality of second source data elements and said result data value comprises a plurality of result data elements, then said result data value is equivalent to a first data value obtained by:
-
(a) generating an intermediate value comprising said result data elements ordered corresponding to the order of the corresponding first source data elements in said first source data value and the order of the corresponding second source data elements in said second source data value, and (b) performing at least one reordering iteration on said result data elements within said intermediate value to generate said first data value; each reordering iteration comprising determining whether a corresponding bit of said data element ordering information has a predetermined value, and if said corresponding bit of said data element ordering information has said predetermined value then exchanging pairs of groups of bits within said intermediate value.
-
-
13. The data processing apparatus according to claim 12, wherein said groups of bits within said intermediate value comprise numbers of bits that are multiples of a data element size N of said at least one first source data element, said at least one second source data element and said at least one result data element.
-
14. The data processing apparatus according to claim 12, wherein said groups of bits comprise different numbers of bits for different ones of said at least one reordering iteration.
-
15. The data processing apparatus according to claim 11, wherein:
-
said control value includes a first portion and a second portion each comprising a variable number of bits; and at least one of said instruction decoder and said processing circuitry is responsive to said bitfield manipulation instruction to determine the number of bits comprised by said first portion of said control value, and to determine based on the number of bits comprised by said first portion; (a) a data element size N of said at least one first source data element, said at least one second source data element and said at least one result data element; and (b) which bits of said second portion indicate said data element ordering information.
-
-
18. A virtual machine provided by a computer program which, when executed by a computer, provides an instruction execution environment according to the data processing apparatus as claimed in claim 1.
-
16. A data processing apparatus comprising:
-
processing means for performing processing operations; instruction decoding means for generating, in response to program instructions, control signals for controlling said processing circuitry to perform said processing operations;
wherein;said program instructions include a bitfield manipulation instruction identifying at least a first source data value comprising at least one first source data element each having N bits <
N−
1;
0>
, a second source data value comprising at least one second source data element each having N bits <
N−
1;
0>
, and a control value;said control value includes information for indicating a bitfield width W, a source bit position A and a result bit position B, where 1≦
W≦
N, 0≦
A≦
N−
W and 0≦
B≦
N−
W; andsaid instruction decoding means is responsive to said bitfield manipulation instruction to generate control signals for controlling said processing means to generate a result data value comprising at least one result data element, each result data element corresponding to a corresponding first source data element and a corresponding second source data element, each result data element having N bits <
N−
1;
0>
comprising;(a) bits <
B+W−
1;
B>
having bit values corresponding to bits <
A+W−
1;
A>
of said corresponding first source data element; and(b) if B+W<
N, bits <
N−
1;
B+W>
having bit values corresponding to a prefix value selected, in dependence on said control value, as one of (i) a first prefix value comprising bits each having a zero value, (ii) a second prefix value having the bit values of bits <
N−
1;
B+W>
of said corresponding second source data element, and (iii) a third prefix value having bit values corresponding to a sign extension of bits <
A+W−
1;
A>
of said corresponding first source data element.
-
-
17. A data processing method for a processing apparatus for performing processing operations, the method comprising:
-
in response to a bitfield manipulation instruction identifying at least a first source data value comprising at least one first source data element each having N bits <
N−
1;
0>
, a second source data value comprising at least one second source data element each having N bits <
N−
1;
0>
, and a control value, generating control signals for controlling said processing apparatus to generate a result data value comprising at least one result data element each having N bits <
N−
1;
0>
, each result data element corresponding to a corresponding first source data element and a corresponding second source data element;
wherein;said control value includes information for indicating a bitfield width W, a source bit position A and a result bit position B, where 1≦
W≦
N, 0≦
A≦
N−
W and 0≦
B≦
N−
W, and each result data element comprises;(a) bits <
B+W−
1;
B>
having bit values corresponding to bits <
A+W−
1;
A>
of said corresponding first source data element; and(b) if B+W<
N, bits <
N−
1;
B+W>
having bit values corresponding to a prefix value selected, in dependence on said control value, as one of (i) a first prefix value comprising bits each having a zero value, (ii) a second prefix value having the bit values of bits <
N−
1;
B+W>
of said corresponding second source data element, and (iii) a third prefix value having bit values corresponding to a sign extension of bits <
A+W−
1;
A>
of said corresponding first source data element.
-
-
19. A data processing apparatus comprising:
-
processing circuitry configured to perform processing operations; an instruction decoder responsive to program instructions to generate control signals for controlling said processing circuitry to perform said processing operations;
wherein;said program instructions include at least one instruction specifying a control value having a first portion for indicating a selected data size selected from a plurality of data sizes and a second portion for indicating at least one control parameter having a number of bits that varies in dependence on said selected data size, said first portion and said second portion each having a variable number of bits; and said instruction decoder is responsive to said at least one instruction to generate control signals for controlling said processing circuitry to perform a corresponding processing operation in dependence on said selected data size and said at least one control parameter; wherein when processing said at least one instruction, at least one of said instruction decoder and said processing circuitry is configured to identify the number of bits comprised by said first portion of said control value and, in dependence on said number of bits comprised by said first portion, to identify (a) said selected data size, and (b) which bits of said control value form said second portion for indicating said at least one control parameter. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32)
-
-
30. A data processing apparatus comprising:
-
processing means for performing processing operations; instruction decoding means for, in response to program instructions, generating control signals for controlling said processing means to perform said processing operations;
wherein;said program instructions include at least one instruction specifying a control value having a first portion for indicating a selected data size selected from a plurality of data sizes and a second portion for indicating at least one control parameter having a number of bits that varies in dependence on said selected data size, said first portion and said second portion each having a variable number of bits; and said instruction decoding means is responsive to said at least one instruction to generate control signals for controlling said processing means to perform a corresponding processing operation in dependence on said selected data size and said at least one control parameter; wherein when processing said at least one instruction, at least one of said instruction decoding means and said processing means is configured to identify the number of bits comprised by said first portion of said control value and, in dependence on said number of bits comprised by said first portion, to identify (a) said selected data size, and (b) which bits of said control value form said second portion for indicating said at least one control parameter.
-
-
31. A data processing method for a processing apparatus for performing processing operations in response to program instructions, comprising:
-
receiving at least one instruction specifying a control value having a first portion for indicating a selected data size selected from a plurality of data sizes and a second portion for indicating at least one control parameter having a number of bits that varies in dependence on said selected data size, said first portion and said second portion each having a variable number of bits; in response to said at least one instruction, identifying the number of bits comprised by said first portion of said control value; in dependence on said number of bits comprised by said first portion, identifying (a) said selected data size, and (b) which bits of said control value form said second portion for indicating said at least one control parameter; and controlling said processing apparatus to perform a corresponding processing operation in dependence on said selected data size and said at least one control parameter.
-
Specification