Re: SPARC tagged data (Henry Spencer)
Thu, 9 May 1991 17:58:26 GMT

          From comp.compilers

Related articles
SPARC tagged data (1991-04-29)
Re: SPARC tagged data (Eric Benson) (1991-04-30)
Re: SPARC tagged data (1991-04-30)
Re: SPARC tagged data weitek!weaver@Sun.COM (1991-04-30)
Re: SPARC tagged data (1991-05-07)
Re: SPARC tagged data (1991-05-08)
Re: SPARC tagged data (1991-05-09)
Re: SPARC tagged data (1991-05-10)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Henry Spencer)
Keywords: architecture
Organization: U of Toronto Zoology
References: <> <> <>
Date: Thu, 9 May 1991 17:58:26 GMT

In article <> (Chris Dollin) writes:
>Doesn't this choice make inter-language working unnecessarily hard? It means
>that structures containing pointers cannot be safely passed to (say) C ...

It may be impossible to pass structures to C anyway, because of other design
decisions made differently. Even calls between C and FORTRAN, which are
*much* closer in basic philosophy than C and Lisp-derived languages, have
many boobytraps and take careful attention on both ends.

Given that both ends know what is going on, actually, there is no disastrous
problem. The C code simply has to correct the values of incoming pointers
(in an inevitably machine-specific way -- all these conventions are quite
machine-specific!) before using them. This is, at worst, a fairly routine
problem of inter-language calls. It can be much worse.

>the fixnum tag should have been something other than 0.

Except that then you need a special adder which knows about it, because you
don't want the tag to change during (say) fixnum addition, and 0 is the only
one with that property. The low-bits-zero scheme potentially involves no
extra data-path hardware, because the same old adder will work and the
check-for-non-zero-bits hardware is already there for pointers.

>Isn't it nice when hardware does *almost* what you want?

Most Lispish-language users consider higher execution speed more important
than more convenient interlanguage calls. The hardware *is* doing what they
Henry Spencer @ U of Toronto Zoology utzoo!henry

Post a followup to this message

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