public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* soft-float support
@ 2002-10-08 14:42 Graeme Peterson
  2002-10-08 15:37 ` Andrew Haley
  0 siblings, 1 reply; 5+ messages in thread
From: Graeme Peterson @ 2002-10-08 14:42 UTC (permalink / raw)
  To: gcc

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

^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <no.id>]

end of thread, other threads:[~2002-10-08 21:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-08 14:42 soft-float support Graeme Peterson
2002-10-08 15:37 ` Andrew Haley
2002-10-08 15:52   ` Graeme Peterson
2002-10-08 16:21   ` Graeme Peterson
     [not found] <no.id>
2002-10-08 16:26 ` Graeme Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).