requisites for soft-fp support for a new target

Chung-Ju Wu jasonwucj@gmail.com
Wed May 14 03:22:00 GMT 2014


2014-05-13 22:05 GMT+08:00 Sheheryar Zahoor Qazi
<sheheryar.zahoor.qazi@gmail.com>:
> Hi,
> I am working on an 18-bit opensource soft-core processor at my
> university. My task is to emulate floating point operation since there
> is no hardware unit for float operations. I have the cross compiler
> and binutils for my target. But upon calling atest program, it gives
> the following error:
>
> : In function `test':
> (.text+0x0): undefined reference to `__floatsisf'
>  In function `test':
> : In function `test':
> (.text+0x2c): undefined reference to `__mulsf3'
> : In function `test':
> (.text+0x2e): undefined reference to `__fixsfsi'
>
> I realize there needs a machine dependent sfp-machine.h file and I
> have it for my architecture modified. Can anyone explain me the
> changes required to be make in the config.gcc file to link my target
> to soft-fp libraries? and do I need any more changes in gcc build?
>
> Thanks
>
> Sheheryar

Hi, Sheheryar,

  1. Add sfp-machine.h
  2. In the libgcc/config.host, add soft-fp makefile fragment like this:
      tmake_file="${tmake_file} t-softfp-sfdf t-softfp
  3. If required, add t-softfp-excl or t-softfp-tf in the tmake_file as well.
     (See t-softfp for details.)

With the changes above, the necessary soft-fp modules will be compiled
into your libgcc.a.


Best regards,
jasonwucj



More information about the Gcc-help mailing list