4 ms·
Furthermore, SPARC, like most RISC at the time, didn't support unaligned accesses, so to a large extent you got tag checking for free. Eg. assuming "01" tags f
by FullyFunctional 9y ago
Furthermore, SPARC, like most RISC at the time, didn't support unaligned accesses, so to a large extent you got tag checking for free. Eg. assuming "01" tags for pointers and a simple two-word CONS cell, car would simple be one load instruction.
ld %rd, [%r1 - 1]
if %r1 didn't have a "01" tag, this would trap.
Finally, SPARC reserved 8 registers for "global" use, that
is registers what wouldn't be otherwise used by the compiler.
Use was as simple as
register int *sp asm("%g3");
which was immensely valuable for VM implementations (and others).
Unfortunately, the tagged add instructions didn't get much use; perhaps SPARC wasn't a big enough base to justify designing around it.
- ScottBurson 9y agoThere certainly were Lisp implementations that used it -- notably Franz Allegro Common Lisp, which I used for years, FWIW.
- lispm 9y agoEric Benson claimed that this was added for Lucid CL: https://compilers.iecc.com/comparch/article/91-04-082 https://compilers.iecc.com/comparch/article/91-04-082 > Yes, the tagged arithmetic instructions were put in the SPARC architecture for Lucid Common Lisp.
- ScottBurson 9y agoThat could be true. But I'd like to hear what the Franz people have to say about it before I accept it as the whole truth.
- lispm 9y agoDon't forget that Lucid was the OEM for the Lisp implementation in SUN Common Lisp and the SUN Symbolic Programming Environment. http://ftp.lanet.lv/ftp/sun-info/sunflash/1990/Aug/20.01.lisp http://ftp.lanet.lv/ftp/sun-info/sunflash/1990/Aug/20.01.lis... http://3e8.org/pub/scheme/doc/lisp-pointers/v2i2/p5-endelman.pdf http://3e8.org/pub/scheme/doc/lisp-pointers/v2i2/p5-endelman...
- ScottBurson 9y agoInteresting. I never knew about that, or had long forgotten. The assertion about the editor being written in Common Lisp is especially surprising; is that true? I never used Lucid or SPE, but I certainly did use Lucid Emacs -- in fact I still use XEmacs daily. Why would they have written a second editor?
- lispm 9y agoLucid had an editor called Helix. It was based on CMUCL's Hemlock. Probably that's also the editor SUN used in SPE. Hemlock is a Emacs variant written in Common Lisp. Lispworks's and Clozure CL's editor also started from Hemlock.
- lukego 9y ago... and these days tag checking seems to be almost for free on out-of-order processors (e.g. x86) because the check is only a couple of instructions with a predictable control dependency and no data dependency.
- ScottBurson 9y agoRight. This is probably one reason TADDCC was omitted from SPARC64.