linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* mpc5200b and floating point
@ 2006-03-31 13:36 Sascha Hauer
  2006-03-31 18:27 ` Roger Larsson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sascha Hauer @ 2006-03-31 13:36 UTC (permalink / raw)
  To: linuxppc-embedded

Hi,

I'm working with a mpc5200b custom board and I'm trying to run an
application with floating point. All floating point variables seem to
zero all the time. Since I'm not very familiar with powerpc it might be
something stupid I have overlooked.
Any hints?

Thank you,

  Sascha Hauer

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

* Re: mpc5200b and floating point
  2006-03-31 13:36 mpc5200b and floating point Sascha Hauer
@ 2006-03-31 18:27 ` Roger Larsson
  2006-03-31 18:58   ` Dan Malek
  2006-03-31 18:36 ` White
  2006-04-03 10:10 ` Sascha Hauer
  2 siblings, 1 reply; 6+ messages in thread
From: Roger Larsson @ 2006-03-31 18:27 UTC (permalink / raw)
  To: linuxppc-embedded

On fredag 31 mars 2006 15.36, Sascha Hauer wrote:
> Hi,
>
> I'm working with a mpc5200b custom board and I'm trying to run an
> application with floating point. All floating point variables seem to
> zero all the time. Since I'm not very familiar with powerpc it might be
> something stupid I have overlooked.

Since a lot of PowerPC do not have floating point processor your tools
might be setup to compile without it (compare with sse2 on x86).

Check your compiler flags again.
Define -mcpu= and -mhard-float
Undefine -msoft-float

/RogerL

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

* Re: mpc5200b and floating point
  2006-03-31 13:36 mpc5200b and floating point Sascha Hauer
  2006-03-31 18:27 ` Roger Larsson
@ 2006-03-31 18:36 ` White
  2006-04-03  8:03   ` Sascha Hauer
  2006-04-03 10:10 ` Sascha Hauer
  2 siblings, 1 reply; 6+ messages in thread
From: White @ 2006-03-31 18:36 UTC (permalink / raw)
  To: linuxppc-embedded

Am Fri, 31 Mar 2006 15:36:20 +0200 schrieb Sascha Hauer
<s.hauer@pengutronix.de> :

Please check your Toolchain.
Have you build it ?

Do you use glibc or something like uclibc ?

At my beginning with mpc5200 i hat simular problems.

I had the wrong Compilerflags during build of my ToolChain.
(uclibc).

Good Luck.

> Hi,
> 
> I'm working with a mpc5200b custom board and I'm trying to run an
> application with floating point. All floating point variables seem to
> zero all the time. Since I'm not very familiar with powerpc it might be
> something stupid I have overlooked.
> Any hints?
> 
> Thank you,
> 
>   Sascha Hauer
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 

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

* Re: mpc5200b and floating point
  2006-03-31 18:27 ` Roger Larsson
@ 2006-03-31 18:58   ` Dan Malek
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Malek @ 2006-03-31 18:58 UTC (permalink / raw)
  To: Roger Larsson; +Cc: linuxppc-embedded


On Mar 31, 2006, at 1:27 PM, Roger Larsson wrote:

> Since a lot of PowerPC do not have floating point processor your tools
> might be setup to compile without it (compare with sse2 on x86).

Nearly all of the PowerPC do have floating point, only a few do not.
It's highly unlikely to find a PowerPC tool set that was custom
built to not enable floating point.  Don't forget that the compiler
flags are only a small part of the picture, you need matching
compiler run time support and application libraries as well.
Just using the compiler flags and not selecting the proper
libraries will not be a positive experience.


	-- Dan

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

* Re: mpc5200b and floating point
  2006-03-31 18:36 ` White
@ 2006-04-03  8:03   ` Sascha Hauer
  0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2006-04-03  8:03 UTC (permalink / raw)
  To: White; +Cc: linuxppc-embedded

On Fri, Mar 31, 2006 at 08:36:34PM +0200, White wrote:
> Am Fri, 31 Mar 2006 15:36:20 +0200 schrieb Sascha Hauer
> <s.hauer@pengutronix.de> :
> 
> Please check your Toolchain.
> Have you build it ?

I have built it with crosstool 0.38

> 
> Do you use glibc or something like uclibc ?

glibc

With -msoft-float everything is working fine, but with softfloat.
Without flags or with -mhard-float my toolchain (which is btw a
gcc-4.0.2, glibc 2.3.6) generates floating point instructions which I
can see in the objdump.
Since this seems more like a toolchain related problem, maybe the
crosstool ml is a better place for this.

Sascha

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

* Re: mpc5200b and floating point
  2006-03-31 13:36 mpc5200b and floating point Sascha Hauer
  2006-03-31 18:27 ` Roger Larsson
  2006-03-31 18:36 ` White
@ 2006-04-03 10:10 ` Sascha Hauer
  2 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2006-04-03 10:10 UTC (permalink / raw)
  To: linuxppc-embedded

On Fri, Mar 31, 2006 at 03:36:20PM +0200, Sascha Hauer wrote:
> Hi,
> 
> I'm working with a mpc5200b custom board and I'm trying to run an
> application with floating point. All floating point variables seem to
> zero all the time. Since I'm not very familiar with powerpc it might be
> something stupid I have overlooked.
> Any hints?

The problem turned out to be toolchain related. We chrooted into the
rootfs on an Ibook, same problem there. I'll take a closer look in my
toochain.

Thank you for your replies,

Sascha Hauer

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

end of thread, other threads:[~2006-04-03 10:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-31 13:36 mpc5200b and floating point Sascha Hauer
2006-03-31 18:27 ` Roger Larsson
2006-03-31 18:58   ` Dan Malek
2006-03-31 18:36 ` White
2006-04-03  8:03   ` Sascha Hauer
2006-04-03 10:10 ` Sascha Hauer

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 NNTP newsgroup(s).