Re: SPARC tagged data

kers@otter.hpl.hp.com (Chris Dollin)
7 May 91 09:35:47

          From comp.compilers

Related articles
SPARC tagged data horst@techfak.uni-bielefeld.de (1991-04-29)
Re: SPARC tagged data eb%watergate@lucid.com (Eric Benson) (1991-04-30)
Re: SPARC tagged data moss@cs.umass.edu (1991-04-30)
Re: SPARC tagged data weitek!weaver@Sun.COM (1991-04-30)
Re: SPARC tagged data kers@otter.hpl.hp.com (1991-05-07)
Re: SPARC tagged data pardo@june.cs.washington.edu (1991-05-08)
Re: SPARC tagged data henry@zoo.toronto.edu (1991-05-09)
Re: SPARC tagged data pardo@june.cs.washington.edu (1991-05-10)
| List of all articles for this month |

Newsgroups: comp.compilers
From: kers@otter.hpl.hp.com (Chris Dollin)
In-Reply-To: moss@cs.umass.edu's message of 30 Apr 91 12:32:34 GMT
Keywords: Lisp, design, optimize
Organization: Hewlett-Packard Laboratories, Bristol, UK.
References: <9104291542.AA11213@flora.techfak.uni-bielefeld.de> <MOSS.91Apr30083234@ibis.cs.umass.edu>
Date: 7 May 91 09:35:47

Eliot Moss says:


      Well, I cannot speak for SPARC and say what the instructions were DESIGNED
      for, but as the moderator pointed out, they can be used to good effect in
      implementing languages such as Smalltalk and LISP, which used tagging to
      distinguish (small, i.e., 30-bit) integers from pointers. One uses a tag of
      00 in the low bits for integers, and a tag of 01 (say) for pointers. All
      offsets from pointers are scaled by -1 to compensate for the 01 in the low
      bits.


Doesn't this choice make inter-language working unnecessarily hard? It means
that structures containing pointers cannot be safely passed to (say) C
routines, because all the pointer values are wrong. (Structures that you
pass to foreign procedures need their numbers raw anyway.) Seems to me that
the fixnum tag should have been something other than 0.


Isn't it nice when hardware does *almost* what you want?
--
Regards, Kers.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.