This is the mail archive of the gcc-help@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: Enabling soft-float support in a new target


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Hi GCCers, Ian

after completing a first pass over the newlib port for a simple RISC
target (let's call it "risc"), i'm  trying to add softfloat support to
its gcc port. It works for INTEGER_ONLY.

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.
I have also added related stuff (SOFT_FLOAT, HARD_FLOAT) flags in
config/risc/risc.h as well as the -msoft-float option (to force use of
soft-float at compile time).

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?

I have a few more questions:

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?
2. What code generation patterns are needed for softfloat to work?
None, or the "movsf", "movdf" ones?

Thanks in advance.

Kind regards
Nikolaos Kavvadias



Ian Lance Taylor wrote:

> nkavv@physics.auth.gr writes:
>
>> i'm trying to add soft-float support for a simple RISC target.
>
>
> Copy the code in config/mips/t-mips, appropriately modified for
> your target.
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFFT1ptMPiy0tCWlz4RAtv0AJ9hIbeHyeC0eUPQJZ20BnzEwy0P6QCguKVW
zsxGRvd+H1BMt1o8VDCuYIg=
=/G9L
-----END PGP SIGNATURE-----


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