On Fri, 2 Jul 2021 16:41:16 GMT, Brian Burkhalter wrote:
>> Please consider this proposal to add a method
>> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
>> `java.lang.StrictMath`.
>
> Brian Burkhalter has refreshed the contents of this pull request, and
> previous commits
> Please consider this proposal to add a method
> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
> `java.lang.StrictMath`.
Brian Burkhalter has refreshed the contents of this pull request, and previous
commits have been removed. The incremental views will show differences com
On Fri, 2 Jul 2021 16:37:21 GMT, Brian Burkhalter wrote:
>> Please consider this proposal to add a method
>> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
>> `java.lang.StrictMath`.
>
> Brian Burkhalter has refreshed the contents of this pull request, and
> previous commits
> Please consider this proposal to add a method
> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
> `java.lang.StrictMath`.
Brian Burkhalter has updated the pull request incrementally with one additional
commit since the last revision:
8188044: Use multiplyHigh() to glevera
On 7/2/21 4:30 PM, Raffaello Giulietti wrote:
> FWIW, adinn's branchless code together with
> PR https://git.openjdk.java.net/jdk/pull/4660
> make both methods less vulnerable to timing attacks.
I doubt it, because HotSpot generates conditional select instructions for
the popular systems, at least
On 02/07/2021 16:30, Raffaello Giulietti wrote:
FWIW, adinn's branchless code together with
PR https://git.openjdk.java.net/jdk/pull/4660
make both methods less vulnerable to timing attacks.
That was indeed the point of the change. However, I doubt the difference
in timing is going to be signifi
FWIW, adinn's branchless code together with
PR https://git.openjdk.java.net/jdk/pull/4660
make both methods less vulnerable to timing attacks.
Greetings
Raffaello
On 2021-07-02 15:50, Andrew Haley wrote:
On Fri, 2 Jul 2021 11:06:06 GMT, Andrew Dinn wrote:
You can also do that branchlessly
On 7/2/21 12:26 PM, Raffaello Giulietti wrote:
> ... or even as a one liner, like in the test
>
> return Math.multiplyHigh(x, y) + ((x >> (Long.SIZE - 1)) & y) + ((y >>
> (Long.SIZE - 1)) & x);
It was hard to write, so it should be hard to read too! :-)
On Fri, 2 Jul 2021 13:47:40 GMT, Andrew Haley wrote:
>> You can also do that branchlessly which might prove better
>>
>> long result = Math.multiplyHigh(x, y);
>> result += (y & (x >> 63));
>> result += (x & (y >> 63));
>> return result;
>
>> You can also do t
On Fri, 2 Jul 2021 11:06:06 GMT, Andrew Dinn wrote:
> You can also do that branchlessly which might prove better
>
> ```
> long result = Math.multiplyHigh(x, y);
> result += (y & (x >> 63));
> result += (x & (y >> 63));
> return result;
> ```
I doubt very much that it would b
... or even as a one liner, like in the test
return Math.multiplyHigh(x, y) + ((x >> (Long.SIZE - 1)) & y) + ((y >>
(Long.SIZE - 1)) & x);
On 2021-07-02 13:08, Andrew Dinn wrote:
On Fri, 2 Jul 2021 09:39:46 GMT, Andrew Haley wrote:
src/java.base/share/classes/java/lang/Math.java line 12
On Fri, 2 Jul 2021 09:39:46 GMT, Andrew Haley wrote:
>> src/java.base/share/classes/java/lang/Math.java line 1211:
>>
>>> 1209: long z1 = t >>> 32;
>>> 1210:
>>> 1211: return x1 * y1 + z1 + (z0 >>> 32);
>>
>> Suggestion:
>>
>> long result = Math.multiplyHigh(x, y);
>>
On Fri, 2 Jul 2021 09:37:47 GMT, Andrew Haley wrote:
>> Brian Burkhalter has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8188044: Add @see links between multiplyHigh() and unsignedMultiplyHigh().
>
> src/java.base/share/classes/java/lang
On Thu, 1 Jul 2021 18:08:22 GMT, Brian Burkhalter wrote:
>> Please consider this proposal to add a method
>> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
>> `java.lang.StrictMath`.
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit
On Thu, 1 Jul 2021 18:08:22 GMT, Brian Burkhalter wrote:
>> Please consider this proposal to add a method
>> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
>> `java.lang.StrictMath`.
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit
On Thu, 1 Jul 2021 18:08:22 GMT, Brian Burkhalter wrote:
>> Please consider this proposal to add a method
>> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
>> `java.lang.StrictMath`.
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit
On Thu, 1 Jul 2021 18:08:22 GMT, Brian Burkhalter wrote:
>> Please consider this proposal to add a method
>> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
>> `java.lang.StrictMath`.
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit
> Please consider this proposal to add a method
> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
> `java.lang.StrictMath`.
Brian Burkhalter has updated the pull request incrementally with one additional
commit since the last revision:
8188044: Add @see links between multip
On Wed, 30 Jun 2021 23:13:06 GMT, Brian Burkhalter wrote:
> Please consider this proposal to add a method
> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
> `java.lang.StrictMath`.
Looks good.
-
Marked as reviewed by rriggs (Reviewer).
PR: https://git.openjdk.
On Wed, 30 Jun 2021 23:13:06 GMT, Brian Burkhalter wrote:
> Please consider this proposal to add a method
> `unsignedMultiplyHigh(long,long)` to each of `java.lang.Math` and
> `java.lang.StrictMath`.
This PR does not address intrinsics for the proposed method; that aspect can be
handled subse
Please consider this proposal to add a method `unsignedMultiplyHigh(long,long)`
to each of `java.lang.Math` and `java.lang.StrictMath`.
-
Commit messages:
- 8188044: We need Math.unsignedMultiplyHigh
Changes: https://git.openjdk.java.net/jdk/pull/4644/files
Webrev: https://webrevs
21 matches
Mail list logo