[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian SuperH port


In the article <[🔎] 20010315211208.A6830@stm.lbl.gov>,
David Schleef <ds@schleef.org> wrote:

> > However, there is little difference between them except that only the
> > latter have FPU instructions, so I think kernel level math emulation
> > (not yet implemented) could cope with this problem.
> What exactly is involved in math emulation?  I've written one
> before for the m68k, and would be willing to do it again if it
> is really helpful and needed.  Is there a math library available
> for the SH3, i.e., in glibc?  If so, it would be relatively easy
> to write the code that handles FPU exceptions and emulates the
> instructions.  If not, there are ones available in C, i.e., no
> assembly speedups.

Wow, that sounds really good.

You can see datails in SH-3/4 Programming Manual PDFs from Hitachi.


Concerning hardware specs, refer to SH7750 for SH-4 or SH7709A for
SH-3, which are used in common platforms.  I suppose the emulation
itself is possible.  They can trap "reserved instruction" exceptions.

I'm not familiar with GNU toolchain and glibc, though the floating
point code seems to be in libgcc.a.  Math library functions can
normally be used on SH-3.

> Could the additional unsupported instructions be emulated as
> well?  I think that decreasing the number of necessary
> sub-architectures is a big bonus.

I agree.

YAEGASHI Takeshi <t@keshi.org>

Reply to: