This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Ecos Port to PPC509/PPC555


>>>>> "Jifl" == Jonathan Larmour <jlarmour@cygnus.co.uk> writes:

    >> Mostly correct, although one possible implementation requires
    >> no changes to existing interfaces: add a boolean field to the
    >> context structure to indicate whether or not the current thread
    >> has performed any floating point; trap FP exceptions and set
    >> this boolean for the current thread; [snip]

    Jifl> But you can't rely on FP exceptions being generated - they
    Jifl> don't for normal code, so I don't believe this is a viable
    Jifl> option unless I've misunderstood you.

On some architectures including the PPC (if I remember correctly), it
is possible to disable the floating point unit. The first operation
that attempts to access the floating point unit, even if it is just to
access a floating point register, will cause a hardware exception.
This is separate from normal floating point exceptions such as
overflow. 

    >> <snip>
    Sergei> You was right so far, but I can't agree with the last
    Sergei> statement. I'd prefer to don't save/restore FP context on
    Sergei> interrupts and all context switches. First, it is possible
    Sergei> to compile code that should never use FP with -msoft-float
    Sergei> to prevent compiler from generating FP instructions.
    >> 
    >> This is the first complication. Even if you compile most of eCos with
    >> -msoft-float, there are some bits such as libm which you will probably
    >> want to compile with -mhard-float. Furthermore these flags are only
    >> applicable to the PowerPC architecture, other architectures may need
    >> something different. In the current eCos build system there is no easy
    >> way to support this, although an ugly kludge would be possible.

    Jifl> Actually yes we do - the existing Configuration Tool allows
    Jifl> the overriding of flags on a per-package basis (although no
    Jifl> finer granularity than that). Its under Build->Options...

In the current build system there is some support to do this on a
per-package basis, but not automatically. It is necessary to create
some additional files, either manually or via the configuration tool.
This is not really acceptable for what is proposed here, and anyway
package-based granularity may not be good enough. Also I am not sure
we have ever documented how this part of the build system worked, and
it will change for the next release.

Bart Veer // eCos net maintainer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]