ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01969.html

Thanks,
Prathamesh

On 29 July 2016 at 22:13, Prathamesh Kulkarni
<prathamesh.kulka...@linaro.org> wrote:
> On 29 July 2016 at 05:40, Prathamesh Kulkarni
> <prathamesh.kulka...@linaro.org> wrote:
>> On 28 July 2016 at 20:14, Ramana Radhakrishnan
>> <ramana.radhakrish...@arm.com> wrote:
>>>
>>>> appear UNSUPPORTED.
>>>> That's because this config appears to define
>>>> __ARM_ARCH_EXT_IDIV__ however idiv appears not to be present.
>>>>
>>>> For instance __aeabi_div is called to perform
>>>> division for the following test-case:
>>>> int f(int x, int y)
>>>> {
>>>>   int r = x / y;
>>>>   return r;
>>>> }
>>>>
>>>> Compiling with -O2:
>>>> f:
>>>> @ args = 0, pretend = 0, frame = 0
>>>> @ frame_needed = 0, uses_anonymous_args = 0
>>>> push    {r4, lr}
>>>> bl      __aeabi_idiv
>>>> pop     {r4, pc}
>>>>
>>>> I assumed if __ARM_ARCH_EXT_IDIV was defined, then
>>>> there should have been idiv instead of call to __aeabi_div
>>>> or am I missing something ?
>>>>
>>>> Um I had configured with --with-tune=cortex-a9. Is that incorrect for
>>>> armv8l-unknown-linux-gnueabihf ?
>>>
>>> --with-tune shouldn't make a difference to code generation settings. The 
>>> code generation you are showing is certainly odd for this testcase  - and 
>>> not something I can reproduce on pristine trunk - so sounds like 
>>> something's broken by your patch . You should be seeing an sdiv in this 
>>> case in the output - Look at the .arch directive at the top of your file - 
>>> maybe that gives you a clue in terms of making sure that you had configured 
>>> the toolchain correctly.
>> Hi,
>> There is no .arch in the assembly however there's .cpu arm10dtmi at
>> the top, full assembly: http://pastebin.com/6tzckiG0
>> With pristine trunk (r238800), I still get __aeabi_idiv for the above 
>> test-case.
>> config opts: --enable-languages=c,c++ --target=armv8l-linux-gnueabihf
>> --with-arch=armv8-a --with-fpu=neon-fp-armv8 --with-float=hard
>> --with-mode=thumb --enable-multiarch --disable-multilib
>> Tried with native stage-1 build and cross build.
>> I verified that __ARM_ARCH_EXT_IDIV__ is defined, with following
>> test-case, which fails to compile.
>> #ifdef __ARM_ARCH_EXT_IDIV__
>> #error "has div insn"
>> #endif
>> int x;
> Apparently looks like I screwed sth in my build :/
> After re-building from scratch, I could get sdiv in the output -;)
> Verified that the patch does not regress on armv8l-unknown-linux-gnu
> and cross-tested on arm*-*-*.
> Ok for trunk ?
>
> Thanks,
> Prathamesh
>>
>> Thanks,
>> Prathamesh
>>>
>>>
>>> regards
>>> Ramana
>>>
>>>>
>>>> xgcc -v:
>>>> Using built-in specs.
>>>> COLLECT_GCC=armhf-bootstrap-build/gcc/xgcc
>>>> Target: armv8l-unknown-linux-gnueabihf
>>>> Configured with: ../gcc/configure --enable-languages=c,c++,fortran
>>>> --with-arch=armv8-a --with-fpu=neon-fp-armv8 --with-float=hard
>>>> --with-mode=thumb --enable-multiarch --with-tune=cortex-a9
>>>> --disable-multilib
>>>> Thread model: posix
>>>> gcc version 7.0.0 20160727 (experimental) (GCC)
>>>>
>>>> Thanks,
>>>> Prathamesh
>>>>>
>>>>> Thanks,
>>>>> Ramana
>>>

Reply via email to