public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Soft float for i486
@ 1998-03-13 18:29 Peter Barada
  1998-03-16 20:25 ` Jim Wilson
  1998-06-28  2:05 ` Jeffrey A Law
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Barada @ 1998-03-13 18:29 UTC (permalink / raw)
  To: egcs, pbarada

I'm trying to build a cross-compiler using egcs-980302, and I want to
target a i486 chip that does NOT have floating point, and I don't want
to emulate the instructions.

I've found the following fragment in gcc/config/a29k/t-a29kbare :

# These are really part of libgcc1, but this will cause them to be
# built correctly, so... 

LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c

dp-bit.c: $(srcdir)/config/fp-bit.c
	cat $(srcdir)/config/fp-bit.c > dp-bit.c

fp-bit.c: $(srcdir)/config/fp-bit.c
	echo '#define FLOAT' > fp-bit.c
	cat $(srcdir)/config/fp-bit.c >> fp-bit.c


I'm just trying to figure a good place to put them (or should I just
shove them in t-i386bare and be done with it)?

Perhaps every target should have thos so -msoft-float will actually
work for any target...

Any ideas?

-- 
Peter Barada                            pbarada@wavemark.com
Wizard                                  781-270-7098 x226
WaveMark Technologies, Inc.             781-270-0193 (fax)

"Real men know that you should never attempt to accomplish with words
what you can do with a flame thrower" --Bruce Ferstein

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Soft float for i486
  1998-03-13 18:29 Soft float for i486 Peter Barada
@ 1998-03-16 20:25 ` Jim Wilson
  1998-06-28  2:05 ` Jeffrey A Law
  1 sibling, 0 replies; 4+ messages in thread
From: Jim Wilson @ 1998-03-16 20:25 UTC (permalink / raw)
  To: Peter Barada; +Cc: egcs

	I'm just trying to figure a good place to put them (or should I just
	shove them in t-i386bare and be done with it)?

t-i386bare looks like the right place for this.  It is surprising that it
isn't there already.

	Perhaps every target should have thos so -msoft-float will actually
	work for any target...

It isn't appropriate for every target.  For instance, most UNIX operating
systems assume the CPU has an FPU, and won't work if it doesn't.  Hence there
is no need for soft-float code, though I suppose it does no harm to have it
there.  Also, some systems have their own soft-float code which gcc calls
instead of using its own soft-float code.  Also, some systems require a
different ABI when soft-float, because the FP registers are missing, and
hence just adding the fp-bit.c files don't solve the problem, we need to
multilib to solve the problem.

Jim

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Soft float for i486
  1998-03-13 18:29 Soft float for i486 Peter Barada
  1998-03-16 20:25 ` Jim Wilson
@ 1998-06-28  2:05 ` Jeffrey A Law
  1998-07-01 10:51   ` Michael Meissner
  1 sibling, 1 reply; 4+ messages in thread
From: Jeffrey A Law @ 1998-06-28  2:05 UTC (permalink / raw)
  To: Peter Barada; +Cc: egcs

  In message <199803140044.TAA22071@miacomet.wavemark.com>you write:
  > 
  > I'm trying to build a cross-compiler using egcs-980302, and I want to
  > target a i486 chip that does NOT have floating point, and I don't want
  > to emulate the instructions.
  > 
  > I've found the following fragment in gcc/config/a29k/t-a29kbare :
  > 
  > # These are really part of libgcc1, but this will cause them to be
  > # built correctly, so... 
  > 
  > LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
  > 
  > dp-bit.c: $(srcdir)/config/fp-bit.c
  > 	cat $(srcdir)/config/fp-bit.c > dp-bit.c
  > 
  > fp-bit.c: $(srcdir)/config/fp-bit.c
  > 	echo '#define FLOAT' > fp-bit.c
  > 	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
  > 
  > 
  > I'm just trying to figure a good place to put them (or should I just
  > shove them in t-i386bare and be done with it)?
Going over some of my old mail.  I never saw anyone respond to this.


Yup.  That's the right place for them.

  > Perhaps every target should have thos so -msoft-float will actually
  > work for any target...
It's a thought, at least for embedded targets, probably not worth it
for native targets.

I'd be kind of suprised if more than a few embedded targets don't
already handle the soft-float stuff.

jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Soft float for i486
  1998-06-28  2:05 ` Jeffrey A Law
@ 1998-07-01 10:51   ` Michael Meissner
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 1998-07-01 10:51 UTC (permalink / raw)
  To: law; +Cc: pbarada, egcs

Jeffrey A Law writes:
|   In message <199803140044.TAA22071@miacomet.wavemark.com>you write:
|   > 
|   > I'm trying to build a cross-compiler using egcs-980302, and I want to
|   > target a i486 chip that does NOT have floating point, and I don't want
|   > to emulate the instructions.
|   > 
|   > I've found the following fragment in gcc/config/a29k/t-a29kbare :
|   > 
|   > # These are really part of libgcc1, but this will cause them to be
|   > # built correctly, so... 
|   > 
|   > LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
|   > 
|   > dp-bit.c: $(srcdir)/config/fp-bit.c
|   > 	cat $(srcdir)/config/fp-bit.c > dp-bit.c
|   > 
|   > fp-bit.c: $(srcdir)/config/fp-bit.c
|   > 	echo '#define FLOAT' > fp-bit.c
|   > 	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
|   > 
|   > 
|   > I'm just trying to figure a good place to put them (or should I just
|   > shove them in t-i386bare and be done with it)?
| Going over some of my old mail.  I never saw anyone respond to this.
| 
| 
| Yup.  That's the right place for them.

Actually, as it exists in egcs, config/fp-bit.c is not up to handling
the x86.  This is because config/fp-bit.c only handle 32 and 64 bit
floating point, and not the 80 bit fp that the x86 supports.  I know
that we've talked about doing this within Cygnus, but the changes are
not on the main branchline.

|   > Perhaps every target should have thos so -msoft-float will actually
|   > work for any target...
| It's a thought, at least for embedded targets, probably not worth it
| for native targets.
| 
| I'd be kind of suprised if more than a few embedded targets don't
| already handle the soft-float stuff.

You do get better fp performance if you are not trapping to the kernel 
(assuming you have a kernel) to do the emulation, but instead just
calling the routine directly.

| jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-07-01 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-13 18:29 Soft float for i486 Peter Barada
1998-03-16 20:25 ` Jim Wilson
1998-06-28  2:05 ` Jeffrey A Law
1998-07-01 10:51   ` Michael Meissner

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).