On Oct 9, 2017, at 12:05 PM, Qing Zhao <qing.z...@oracle.com> wrote:
> 
>>>> Thanks a lot for Wilco’s help on this bug. 
>>>> 
>>>> Yes, Aarch64 does NOT do anything wrong.  
>>>> 
>>>> The implementation of __builtin_update_setjmp_buf is not correct. It takes 
>>>> a pointer
>>>> as an operand and treats the Mode of the pointer as Pmode, which is not 
>>>> correct.
>>>> a conversion from ptr_mode to Pmode is needed for this pointer.
>>>> 
>>>> bootstrapped on aarch64-unknown-linux-gnu.
>>>> testing on aarch64-unknown-linux-gnu is running.
>>>> 
>>> 
>>> This is more believable for AArch64, but we need to be careful here.  I
>>> think this needs testing on at least one other target that has a
>>> ilp32-on-64-bit ABI, eg x86_64's x32 ABI.
>> 
>> I just built the latest upstream GCC on x86_64 Linux. and use it to compile 
>> the testing case in PR80295 with the following options:
>> 
>> [qinzhao@qzh-ol6-test 80295]$ cat t.c
>> void f (void *b) { __builtin_update_setjmp_buf (b); }
>> [qinzhao@qzh-ol6-test 80295]$ sh t
>> /home/qinzhao/Install/latest/bin/gcc -m32 t.c
>> 
>> it compiles successfully on x86_64.  no similar issue as aarch64. 
>> 
>> DId  I use the correct option on X86 (i.e -m32)?
> 
> I also tried -mx32,  the compilation had no issue. 
> 
> With the latest GCC + my patch, on X86,  the testing case still has No any 
> issue with -m32 or -mx32. 
> 
> my testing on aarch64-unknown-linux-gnu has finished, no any regression. 

More testing on x86_64-pc-linux-gnu, bootstrapped and gcc testing,  No any 
regression.

> 
> Is my patch Okay?
> 
> thanks.
Qing

Reply via email to