This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: question on arm soft-fp function __aeabi_d2uiz
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: "Amker.Cheng" <amker dot cheng at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 08 May 2011 10:05:31 +0200
- Subject: Re: question on arm soft-fp function __aeabi_d2uiz
- References: <BANLkTinDnwj5vzf60FCVtGpuuh9XT3YmQg@mail.gmail.com>
"Amker.Cheng" <amker.cheng@gmail.com> writes:
> I also tried the code on x86-cygwin, which prints 0xFFFFFFFF.
> I am wondering why __aeabi_d2uiz returns 0 for negative double values.
> Is this behavior defined by arm fpu and it's different with x86 in fpu
> implementation?
Converting a negative float value to an unsigned integer type results in
undefined behaviour, so any result is valid. This is different from
converting a negative integer value to unsigned, where the modulo rule
is applied.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."