SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Clear Bit Field Bounded by Two Immediate Values
CLR ucst5_1, ucst5_2, src2, dst
Functional unit = L
32 bit
31 | 30 | 29 | 28 | 27 | 26 | 25 | 21 | 20 | 16 | 15 | 13 | 12 | 10 | 9 | 0 |
x | x | x | x | x | x | ucst5_1 | ucst5_2 | dst | src2 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5 | 5 | 3 | 3 | opcode |
For ucst5_1 ≥ ucst5_2, the field in src2 as specified by ucst5_2 to ucst5_1 is cleared to all 0s and the resulting value of src2 is written to dst. src2 is left unchanged. ucst5_2 is the LSB of the field and ucst5_1 is the MSB of the field. In other words, ucst5_2 and ucst5_1 represent the beginning and ending bits, respectively, of the field to be cleared to all 0s. The LSB location of src2 is bit 0 and the MSB location of src2 is bit 31.
Valid values of ucst5_1 and ucst5_2 are:
For ucst5_1 < ucst5_2, the result is undefined.
In the following example, ucst5_2 is 15 and ucst5_1 is 23.
CSR:EQ = (dst == 0)
dst = src2
for( i = 0; i < 32; i++) {
if ( i >= ucst5_2 && i <= ucst5_2) dst[i] = 0;
};