Skip to content

Commit e54f26a

Browse files
committed
8284992: Fix misleading Vector API doc for LSHR operator
Reviewed-by: psandoz
1 parent 2dd882a commit e54f26a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorOperators.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -68,6 +68,8 @@
6868
*
6969
* <li>{@code ESIZE} &mdash; the size in bytes of the operand type
7070
*
71+
* <li>{@code EMASK} &mdash; the bit mask of the operand type, where {@code EMASK=(1<<(ESIZE*8))-1}
72+
*
7173
* <li>{@code intVal}, {@code byteVal}, etc. &mdash; the operand of a
7274
* conversion, with the indicated type
7375
* </ul>
@@ -548,7 +550,7 @@ static boolean opKind(Operator op, int bit) {
548550
public static final /*bitwise*/ Binary LSHL = binary("LSHL", "<<", VectorSupport.VECTOR_OP_LSHIFT, VO_SHIFT);
549551
/** Produce {@code a>>(n&(ESIZE*8-1))}. Integral only. */
550552
public static final /*bitwise*/ Binary ASHR = binary("ASHR", ">>", VectorSupport.VECTOR_OP_RSHIFT, VO_SHIFT);
551-
/** Produce {@code a>>>(n&(ESIZE*8-1))}. Integral only. */
553+
/** Produce {@code (a&EMASK)>>>(n&(ESIZE*8-1))}. Integral only. */
552554
public static final /*bitwise*/ Binary LSHR = binary("LSHR", ">>>", VectorSupport.VECTOR_OP_URSHIFT, VO_SHIFT);
553555
/** Produce {@code rotateLeft(a,n)}. Integral only. */
554556
public static final /*bitwise*/ Binary ROL = binary("ROL", "rotateLeft", VectorSupport.VECTOR_OP_LROTATE, VO_SHIFT);

0 commit comments

Comments
 (0)