This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
soft-float support
- From: "Graeme Peterson" <gp at qnx dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 8 Oct 2002 14:37:40 -0400 (EDT)
- Subject: soft-float support
Hi, all.
I have done some searching, and it seems that gcc (in this case
2.95.3 targetting ppc-QNX6) does not have support for statically
linked software emulated floating point instructions.
Consider the following C source:
double a, b, c;
int main(int argc, char **argv) {
c = a + b;
return 0;
}
Compiling it normally, I get an fadd instruction. Using -msoft-float
I get a call to __adddf3 in libgcc.a in place of the fadd. This
looks good, but objdump -d of gcc/nof/libgcc.a shows me:
00000000 <__adddf3>:
0: fc 21 10 2a fadd f1,f1,f2
4: 4e 80 00 20 blr
So I am still getting the fadd, and I have to call out to get it.
Can someone clarify for me what is required to get this going? Do
I need to implement the floating point emulation and tell gcc to
use it in place of the fadd in the __adddf3 call? If so, how do I
do that?
I found some news postings on this, and they all talk about patches
to glibc to support this. We don't use glibc, but have our own libc.
Any and all clarification on this issue appreciated.
Cheers, and TIA.
GP