Re: Enabling soft-float support in a new target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nikolaos Kavvadias <nkavv@xxxxxxxxxxxxxxx> writes:

> First, i've taken example from t-mips Makefile fragment to take
> account fp-bit.c, dp-bit.c in compilation. Second, i've added the
> following segment in the
> gcc/gcc/config.gcc script for the risc-*-* target.
> 
>         case "$with_float" in
>         "" \
>         | soft | hard | softfp)
>             # OK
>             ;;
>         *)
>             echo "Unknown floating point type used in
> --with-float=$with_float" 1>&2
>             exit 1
>             ;;
>         esac
> 
> After adding that, i assumed that --with-float=soft would do the job.
> However, make stops with complaining the target (risc-elf) does not
> support softfloat.

Did you add
    supported_defaults="float"
somwhere?  Look for the existing uses.

> However, it seems that the original MIPS target does not require
> adding --with-float=soft in order to generate softfloat-aware
> libraries (later on). Is this true?

Yes, most MIPS targets use multilibs to generate softfloat libraries.
See, e.g., config/mips/t-elf.  Look at MULTILIB_*, and at the
documentation for those Makefile variables

> 1. Is it possible to use softfloat for a target that does not have
> floating-point registers? Are these needed at all in such case?

Yes.  Yes.

> 2. What code generation patterns are needed for softfloat to work?
> None, or the "movsf", "movdf" ones?

Yes, you still need movsf, etc., although they are likely to be
duplicates of movsi, etc. (you can use mode macros to simplify this).
You don't necessarily need anything else.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux