Summary
Clarify the specification of logical shift right vector operator VectorOperator.LSHR
.
Problem
The symbolic expression of VectorOperator.LSHR
is not precise for sub-word operation types of byte
and short
.
Solution
For sub-word operand types the operand needs to be masked by a bit mask whose value is (1<<ESIZE*8)-1
.
Specification
Add the following item to the class documentation after the definition of ESIZE
:
* <li>{@code EMASK} — the bit mask of the operand type, where {@code EMASK=(1<<ESIZE*8)-1}
Change the specification of LSHR
to be:
/** Produce {@code (a&EMASK)>>>(n&(ESIZE*8-1))}. Integral only. */
public static final /*bitwise*/ Binary LSHR
- csr of
-
JDK-8284992 Fix misleading Vector API doc for LSHR operator
-
- Resolved
-