This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question on arm soft-fp function __aeabi_d2uiz


"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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]