[LLVMdev] troubles with llvm-gcc 4.0 and APFloat on X86_64
Dale Johannesen
dalej at apple.com
Mon Oct 22 10:03:41 PDT 2007
On Oct 22, 2007, at 2:08 AM, Dietmar Ebner wrote:
> hi,
>
> i've got some more things to note. first, the issue is not related to
> x86_64 being the host machine - it also happens on i686/linux.
>
> next, i think (one of) the problem(s) is the use of
> [HOST_]WORDS_BIG_ENDIAN instead of [HOST_]FLOAT_WORDS_BIG_ENDIAN in
> llvm-convert.cpp (see patch below).
>
> this fixes single precision floating point but breaks double
> precision.
> for arm-softfloat-linux-gnu, FLOAT_WORDS_BIG_ENDIAN is true while
> WORDS_BIG_ENDIAN is false. as far as i've seen, there's only a single
> flag for endianess in the llvm target description string, so i don't
> really understand how this is supposed to work.
Agree. I think those two match on all the targets I've tried.
I think the right approach is to use REAL_VALUE_TO_TARGET_SINGLE for
float
and REAL_VALUE_TO_TARGET_DOUBLE for double, then the two endiannesses
can be handled separately.
> i wonder how other people are cross compiling for arm-linux-gnu?
> any help would be highly appreciated!
More information about the llvm-dev
mailing list