Subject: Re: Transmeta's Crusoe as a host for neo-Lispm, or not?
From: Erik Naggum <>
Date: 2000/01/26
Newsgroups: comp.lang.lisp
Message-ID: <>

* Barry Margolin <>
| I'm not familiar with the Pentium III architecture (I haven't really
| studied an instruction set since the Z80).  Could you give some examples
| of the features you're talking about?

  I'd like to, but that needs delving back into the documentation and doing
  quite a bit of research.  I have not found time for it in the past few
  days, and a three-week break is coming up fast, so I have to disappoint
  you with long response times on this one.

| Are these things like the MMX instructions (those were in the Pentium II,
| as well, weren't they)?

  the simplest idea is to use published knowledge of the core architecture
  to schedule register updates, memory transactions, etc, vastly more
  efficiently.  several new instructions have also been added to make life
  a lot easier for particular tasks -- but actually being able to use them
  well requires significant effort on both the part of the programmers and
  the compiler writers.

| I know it has lots of bit-twiddling instructions that are supposed to be
| useful for graphics, and I think some DSP-related instructions, but
| neither of these seem like they would be of much assistance in Lisp.

  once I understood what they were doing, they were useful mathematical
  functions and transformations that required you to shape your problem in
  a particular way to be able to use.  some of these "contortions" would
  not be something a Lisp compiler would ordinarily engage in at all.
  however, I wanted to be able to use these instructions and looked at how
  I would have to go about that, but in the end, I decided against adding
  instructions to the compiler.

| How do other applications make use of these features?

  inlined assembly, or even whole functions in assembly language.  there
  are few compilers out there that can make full use of these things, but
  the instruction scheduling isn't terribly hard to codify.  the best part
  is that when it's done properly, it doesn't affect performance on the
  older processors.  the new instructions are sometimes expanded as macros
  by the better assemblers into instruction sequences for older processors.

| Isn't there some way to use the instructions and trap into macrocode when
| running on an older processor?

  there are a whole bunch of CPU flags which tell you whether these new
  features are available or not, so you would typically prepare a fat
  binary that contained several versions of the same function according to
  processor to make optimal use of these features.  many games do this.