[8u] RFR 8130150: Implement BigInteger.montgomeryMultiply intrinsic
Vladimir Kempik
vladimir.kempik at oracle.com
Fri Feb 19 16:28:00 UTC 2016
Hello
Here is updated webrev for 8130150 for jdk8.
only hotspot part was updated.
http://cr.openjdk.java.net/~vkempik/8130150/webrev_hs.01
Changes:
sharedRuntime_x86_64.cpp
a) use asm volatile instead of __asm__
b) don't use montgomery_square on Solaris.
Testing: jprt, included testcase.
THanks, Vladimir.
On 19.02.2016 0:05, Vladimir Kozlov wrote:
> Okay.
>
> On 2/18/16 12:38 PM, Vladimir Kempik wrote:
>> Hello
>>
>> To be clear.
>>
>> I'm proposing :
>> 1)if(0), only for Solaris (via ifdef Solaris )
>> 2)volatile asm.
>>
>> That is the combination that passes all jprt tests.
>>
>> I'll prepare updated webrev a bit later this week.
>> Vladimir.
>>
>> Отправлено с iPad
>>
>>> 18 февр. 2016 г., в 23:25, Vladimir Kozlov
>>> <vladimir.kozlov at oracle.com> написал(а):
>>>
>>> To be clear. You are proposing only the next change nothing else we
>>> discussed before. Right?
>>>
>>> - if (len >= MONTGOMERY_SQUARING_THRESHOLD) {
>>> + if (0) {
>>> ::montgomery_square(a, n, m, (unsigned long)inv, longwords);
>>>
>>> What about 'volatile asm'? Using C code instead of asm?
>>>
>>> In general I am fine with that since it looks like it is only
>>> performance issue.
>>>
>>> Thanks,
>>> Vladimir
>>>
>>>> On 2/18/16 4:16 AM, Vladimir Kempik wrote:
>>>> Hello
>>>>
>>>> Vladimir Kozlov, do you think I can backport this to jdk8/7 with
>>>> mentioned workaround (for solaris amd64 only) and then
>>>> create a bug to investigate why montgomery_square fails with jdk8/7
>>>> and solaris studio 12u1 compiler ?
>>>>
>>>> It passed the jprt tests now.
>>>>
>>>> If so It's ok I'll prepare.
>>>>
>>>> Thanks.
>>>>> On 18.02.2016 14:45, Andrew Haley wrote:
>>>>>> On 02/18/2016 11:41 AM, Vladimir Kempik wrote:
>>>>>> making this routine to always use montgomery_multiply helped to
>>>>>> workaround the issue
>>>>> OK, so possibly a bug in montgomery_square. I'm not sure what
>>>>> "helped" means, though. I guess it doesn't mean "fixes the bug".
>>>>>
>>>>> Andrew.
>>>>>
>>>>
More information about the hotspot-compiler-dev
mailing list