[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] uint64_t/int64_t => double broken on ARM
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] uint64_t/int64_t => double broken on ARM |
Date: |
Sun, 02 Feb 2014 19:43:44 +0800 |
User-agent: |
KMail/4.11.5 (Linux/2.6.38-ac2-ac100; KDE/4.11.5; armv7l; ; ) |
Le samedi 1 février 2014, 14:41:48 Daniel Glöckner a écrit :
> Hello Thomas,
>
> On Sat, Feb 01, 2014 at 07:04:24PM +0800, Thomas Preud'homme wrote:
> > Got a bit of time (and more importantly internet access) so it's now
> > fixed in mob. Thanks for reporting.
>
> your patch makes
>
> float f(unsigned long long x)
> {
> return x;
> }
>
> compile to
>
> ...
> bl __aeabi_ul2f
> vmov s0, r0
> vmov.32 d0[0], r0
> vmov.32 d0[1], r1
> ...
>
> with softfp ABI and it generates the superfluous move from r1 with hard
> float ABI. Maybe the cleanest solution is to temporarily change the ABI
> when calling these functions.
Right, I confused the size of the int with the size of the float the int is
converted to. It's easy to add a switch to test between float and double.
As to changing the ABI, there was actually something for it (see
floats_in_core_regs function). Strange indeed that it doesn't work since the
long long -> float conversion function are indeed considered for the special
ABI. I'll check more closely. Thanks for your attention.
Thomas