This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Where is the code for __aeabi_fmul in gcc_eabi?

Hi, I am trying to find out where exactly the soft floating point code used in eabi for a M0+ comes from. When i compile a program using floating point using gcc_eabi, it generates code to carry out this operation. ( code included).

I downloaded the source for gcc_eabi and I've been trying to find out where this code comes from! i'm getting very conflicting info online.

  • Some sources say that the implementation used is the one in /src/gcc/libgcc/fp-bit.c
  • Others say it is the one in /src/gcc/libgcc/config/arm/ieee754-sf.S. (however this code doesnt seem to match the code generated by the compiler!)

Can someone who uses GCC on these devices please let me know where exactly this code (attached) is coming from when GCC sees a floating point multiply?

Thank you!

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
000001b4 <__aeabi_fmul>:
1b4: b5f0 push {r4, r5, r6, r7, lr}
1b6: 4657 mov r7, sl
1b8: 464e mov r6, r9
1ba: 4645 mov r5, r8
1bc: 0043 lsls r3, r0, #1
1be: b4e0 push {r5, r6, r7}
1c0: 0246 lsls r6, r0, #9
1c2: 4688 mov r8, r1
1c4: 0a76 lsrs r6, r6, #9
1c6: 0e1f lsrs r7, r3, #24
1c8: 0fc4 lsrs r4, r0, #31
1ca: 2f00 cmp r7, #0
1cc: d047 beq.n 25e <__aeabi_fmul+0xaa>
1ce: 2fff cmp r7, #255 ; 0xff
1d0: d025 beq.n 21e <__aeabi_fmul+0x6a>
1d2: 2300 movs r3, #0
1d4: 2580 movs r5, #128 ; 0x80
1d6: 469a mov sl, r3
1d8: 4699 mov r9, r3
1da: 00f6 lsls r6, r6, #3
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0