答复: 答复: [RFR] Re: jdk9 builds status

Alex Kashchenko akashche at redhat.com
Thu Jun 2 15:10:23 UTC 2016


Hi,

On 06/02/2016 03:18 PM, yangyongyong wrote:
> "What happens if a future compiler pushes something different?"
> This makes sense. " compile -O0" does not push other things for now, that's what the comment " This is a leaf method " means.
>
> All the best.
>
>>> -----邮件原件-----
>>> 发件人: Edward Nevill [mailto:edward.nevill at gmail.com]
>>> 发送时间: 2016年6月2日 22:08
>>> 收件人: yangyongyong
>>> 抄送: Anton Kozlov; andrey.petushkov at gmail.com; akashche at redhat.com;
>>> aarch32-port-dev at openjdk.java.net
>>> 主题: Re: 答复: [RFR] Re: jdk9 builds status
>>>
>>> Hi,
>>>
>>> This solution makes me nervous. It relies on the fact that the compiler only
>>> pushes RFP, hence it adds 'BytesPerWord'. What happens if a future compiler pushes
>>> something different? Or if we compile -O0 as in a slowdebug build.

I just re-checked slowdebug and fastdebug builds side-by-side (with 
noinline), as expected, this variant works with fastdebug and fails with 
slowdebug:

return (address) sp + BytesPerWord;

and this variant works with slowdebug and fails with fastdebug:

return (address) sp;

>>>
>>> I think the asm version is more shock proof.
>>>
>>> All the best,
>>> Ed.
>>>
>>> On Thu, 2016-06-02 at 13:12 +0000, yangyongyong wrote:
>>>> Hi, all,
>>>>
>>>> Has someone tried the following patch:
>>>>
>>>> === Patch begin ===
>>>> diff -r 79bf1547b28d src/os_cpu/linux_aarch32/vm/os_linux_aarch32.cpp
>>>> --- a/src/os_cpu/linux_aarch32/vm/os_linux_aarch32.cpp	Sat May 14
>>> 17:34:57 2016 +0100
>>>> +++ b/src/os_cpu/linux_aarch32/vm/os_linux_aarch32.cpp	Wed Jun 01
>>> 10:08:09 2016 +0800
>>>> @@ -81,7 +81,7 @@
>>>>   #define SPELL_REG_SP "sp"
>>>>   #define SPELL_REG_FP "fp"
>>>>
>>>> -address os::current_stack_pointer() {
>>>> +__attribute__ ((noinline)) address os::current_stack_pointer() {
>>>>     register void* sp __asm__ (SPELL_REG_SP);
>>>>     // This is a leaf method. Only rfp has been pushed.
>>>>     return (address) sp + BytesPerWord; === Patch end ===
>>>>
>>>> it fixes a crash caused by fastdebug version build with with gcc 4.7.1
>>>>
>>>> All the best.
>>>>
>>>
>


-- 
-Alex


More information about the aarch32-port-dev mailing list