Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!spdcc!iecc!compilers-sender From: kers@otter.hpl.hp.com (Chris Dollin) Newsgroups: comp.compilers Subject: Re: SPARC tagged data Keywords: Lisp, design, optimize Message-ID: Date: 7 May 91 13:35:47 GMT References: <9104291542.AA11213@flora.techfak.uni-bielefeld.de> Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: kers@otter.hpl.hp.com (Chris Dollin) Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 22 Approved: compilers@iecc.cambridge.ma.us In-Reply-To: moss@cs.umass.edu's message of 30 Apr 91 12:32:34 GMT 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. -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.