[8u] RFR: JDK-8164041: support old pre-c++11 toolchains and ucLibc
Andrey Petushkov
andrey.petushkov at gmail.com
Thu Aug 25 08:40:32 UTC 2016
Hi Ed, All,
Please consider the updated patch which should allow to build for ARMv6
prior to revision K. Here
http://cr.openjdk.java.net/~apetushkov/8164041/webrev.01/
Please note that at first it's attempted to use the inline assembly and
only if not not possible the fallback is done to gcc intrinsics. The reason
is that we know that assembly is more robust. Unfortunately due to
differences in set of macros defined by different toolchains the selection
condition in the #if look really crazy. I've tried to check every single
symbol which could mean ldrexd is available, since I've met the case when
only __ARM_ARCH_6ZK__ is defined and nothing else. If you're aware that
it's guaranteed that some of checks are redundant please let me know
Thanks,
Andrey
On Wed, Aug 24, 2016 at 7:38 PM Andrey Petushkov <andrey.petushkov at gmail.com>
wrote:
> On the second thought, the last instruction is "beq" and it really should
> not matter whether it's included into "it" or not. Will check and let you
> know
>
> On Wed, Aug 24, 2016 at 7:28 PM Andrey Petushkov <
> andrey.petushkov at gmail.com> wrote:
>
>> Hmm, interesting. I will investigate. There are 3 "*eq" instructions to
>> follow hence there should be 3 additional "t"s after "it"
>>
>> Anyway, please don't bother now, have a good time there! :)
>>
>> Andrey
>>
>> On Wed, Aug 24, 2016 at 7:09 PM Alex Kashchenko <akashche at redhat.com>
>> wrote:
>>
>>> Hi Andrey,
>>>
>>> On 08/24/2016 06:25 PM, Andrey Petushkov wrote:
>>> > Hi Alex,
>>> >
>>> > You, you're right and thank you for the fix! One small correction, I
>>> > believe there should be "itttt" rather than "ittt" :)
>>>
>>> I believe it is "ittt" (sorry, cannot check right now, currently on
>>> vacation), as I remember jvm hangs on startup with "itttt". But of
>>> course this is a very minor detail that will be immediately clear from
>>> thumb builds.
>>>
>>> >
>>> > I'll include this fix into second revision of the patch update in
>>> > accordance with the results of discussion with Ed
>>> >
>>> > Regards,
>>> > Andrey
>>> >
>>> > PS. Pardon for delay, was busy preparing the C1 monster, it did not
>>> come
>>> > easy for some reason
>>> >
>>> > On Fri, Aug 19, 2016 at 9:51 AM Alex Kashchenko <akashche at redhat.com>
>>> wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> On 08/15/2016 07:06 PM, Andrey Petushkov wrote:
>>> >>> Hi All,
>>> >>>
>>> >>> We met a necessity to support an older kind of gcc toolchain which
>>> does
>>> >> not fully conform to c++ 11 and in particular do not have __atomic
>>> API as
>>> >> well as have some other peculiarities. In addition the support of
>>> ucLibc
>>> >> was desired.
>>> >>>
>>> >>> The resulting changes are here:
>>> >> http://cr.openjdk.java.net/~apetushkov/8164041/webrev/ <
>>> >> http://cr.openjdk.java.net/~apetushkov/8164041/webrev/>
>>> >>> Checked with running on OpenWRT-based distribution
>>> >>>
>>> >>> When implementing the replacement code we also chosen to always use
>>> the
>>> >> assembly implementation and not builtins because:
>>> >>> - there is no harm, the assembly is no worse than that gcc can
>>> generate
>>> >>> - the code is more clear
>>> >>> - there is no reliable way to determine if gcc has flaws or not, so
>>> the
>>> >> detection directives look really ugly
>>> >>>
>>> >>> Thanks,
>>> >>> Andrey
>>> >>>
>>> >>
>>> >> A small fix for thumb mode (that is default on ubuntu xenial): in
>>> >> Atomic::cmpxchg add "ittt eq" before the "cmpeq". Otherwise it will
>>> fail
>>> >> on thumb with:
>>> >>
>>> >> {standard input}: Assembler messages:
>>> >> {standard input}:926: Error: thumb conditional instruction should be
>>> in
>>> >> IT block -- `cmpeq r6,r2'
>>> >> {standard input}:927: Error: thumb conditional instruction should be
>>> in
>>> >> IT block -- `strexdeq lr,r3,r4,[r0]'
>>> >> {standard input}:928: Error: thumb conditional instruction should be
>>> in
>>> >> IT block -- `cmpeq lr,#1'
>>> >> /home/u1604/jdk8u/hotspot/make/linux/makefiles/rules.make:157: recipe
>>> >> for target 'atomic.o' failed
>>> >>
>>> >>
>>> >> --
>>> >> -Alex
>>> >>
>>> >
>>>
>>>
>>> --
>>> -Alex
>>>
>>
More information about the aarch32-port-dev
mailing list