0

I want to find source code implementation of these functions based on soft floating point

__aeabi_dcmpeq

__aeabi_dcmplt

__aeabi_dmul

Basically, I want to to use soft floating point implementation of libgcc as my processor based on Cortex-M4 does not have FPU. Instead of using built in library libgcc.a using -lgcc switch, I want to use the source code implementation of floating point arithmetic functions in my application and want to use only those functions that are required for my application instead of adding whole of the library. So please can any one help where these functions are lying. I see these functions are there in "ieee754-df.S" such as "aeabi_dcmpeq". Are these functions meant for Soft floating point and generic for all ARM targets? but it seems me this is not the case.

  • There are freeBSD implementation: http://web.mit.edu/freebsd/head/lib/libc/arm/aeabi/aeabi_double.c http://web.mit.edu/freebsd/head/lib/libc/arm/aeabi/aeabi_asm_double.S – osgx Jun 30 '16 at 12:23
  • I want to use implementation of these functions from gcc source code – user3674043 Jun 30 '16 at 12:51
  • do you use static or dynamic linking with libgcc? static linking will only keep used functions. – osgx Jun 30 '16 at 13:10

1 Answers1

0

The functions are defined in libgcc in https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=blob;f=libgcc/config/arm/ieee754-df.S

There is softfloat implementation in NetBSD (NetBSD/src/lib/libc/softfloat/):

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/arch/arm/softfloat/

http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/lib/libc/arch/arm/softfloat/__aeabi_dcmplt.c

mirh
  • 514
  • 8
  • 14
osgx
  • 90,338
  • 53
  • 357
  • 513
  • I pick this function " aeabi_dcmpeq" from ieee754-def.S and include it in my application, I see these errors while building the application ../src/ieee754-df.S:1096: Error: lo register required -- `str lr,[sp,#-8]!' ../src/ieee754-df.S:1099: Error: Thumb does not support conditional execution ../src/ieee754-df.S:1100: Error: Thumb does not support conditional execution. These error seems me valid as I am building it for cortex-m4. So, how can I modify it to use it for cortex-m4/armv7e-m. How GCC manipulates it for multiple architecture and for cortex-m4/armv7e-m having no FPU – user3674043 Jul 01 '16 at 07:08
  • have you seen my above comment? – user3674043 Jul 15 '16 at 07:32