Re: FSQRT mnemonic missing from PPC-ASM.LISP

Gary Byers <[email protected]> Sun, 12 Jan 2003 06:07:05 -0700 (MST)
Newsgroups gmane.lisp.openmcl.bugs
Message-ID <[email protected]>

On Fri, 10 Jan 2003, Gary Byers wrote:

>
>
> On Fri, 10 Jan 2003, Randall Beer wrote:
>
> > I just discovered that the FSQRT mnemonic is missing from the
> > DEFPARAMETER for *PPC-OPCODES*  in PPC-ASM.LISP. The net effect of this
> > is that one can't assemble any PPC LAP code containing FSQRTs.
> >
> > Randy Beer
> >
> >
>
> FSQRT and FSQRTS are both categorized as "optional PPC instructions".
> (My guess is that most PPC implementations opt to implement them;
> I'm fairly sure that the PPC 601 didn't, but don't know about other
> CPUs.)
>

I don't know where to find a list of PPC CPUs that do/don't support
FSQRT and FSQRTS; Appendix B of both the Motorola 750 (G3) and 7450 (a
G4 implementation) Users Manuals indicate that neither of those
processors do.

> I agree that assembler should recognize FSQRT/FSQRTS; if there's
> really any issue of whether or not these instructions are implemented,
> there may need to be some mechanism to select a target architecture.

There seems to be such an issue and therefore a need for some such
mechanism.

Attempting to execute an unimplemented instruction will generally
lead to an unhandled exception; some versions of the Linux kernel
may emulate unimplemented FP instructions under some conditions.

>
> (You can currently assemble PPC64 instructions, which are definitely
> not implemented on 32-bit CPUs.)
>
This isn't true yet; it'll be true in 0.14.

It -is- true that the assembler will let you assemble instructions
that you probably can't execute (e.g., because they're supervisor-only
or something.)  It seems like it'd be consistent to assemble fsqrt[.]
(it looks like fsqrts[.] is already there), but you may have a bit of
trouble finding a platform that lets you execute one.