Benjamin Herrenschmidt bh40 at
Fri Sep 10 21:59:35 EST 1999

On Fri, Sep 10, 1999, Sacha Varma <sacha at> wrote:

>There was some talk of trapping an illegal instruction interrupt in
>Altivec-compiled code on non-Altivec processors and then emulating it in
>software, but as I recall this was thought to be maybe impossible (due to
>limited information about the illegal instruction and limits on what you can
>in the trap) or more effort than it's worth.

This is possible since Apple provides an emulator for developers (it's an
extension that you drop in your MacOS system folder and which traps the
illegal instruction interrupt).

>In the meantime to learn more about Altivec I've been working on a library to
>emulate the instructions in software (with appropriate #defines for the
>extensions in a header). If anyone's interested e-mail me and I'll let you
>if/when I'm done; I'm hoping to get the bulk of it done this weekend. (It'll
>C++ I'm afraid - the vector types lend themselves nicely to a template class,
>and a lot of the vec_* instructions are overloaded).

If your library can be turned into plain C, then we should be able to
implement the same emulation mecanism in Linux, but is it really
interesting ? It will be way too slow to be useful for anything but
developers prototyping Altivec code on G3s.

           Perso. e-mail: <mailto:bh40 at>
           Work   e-mail: <mailto:benh at>
BenH.      Web   : <>

** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list