[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tagged Architectures, a question
Date: Thu, 15 Oct 87 11:10:28 PDT
From: Bil Lewis <email@example.com>
I'm teaching a class on Lisp, and I wish to be accurate in my statements.
I'm not sure who knows this, so I'll just throw the question out & hope.
There are machines that specifically tag all data words with type
information, and use this for dispatching to correct routines. I believe
that a number of the big number crunchers did this. CDC, Burroughs,
When they encountered X+Y, the data was loaded into the registers, the
instruction + was called, and the hardware took care of deciding if it
should call the FP add, the integer add, etc. Did these machines
tag anything more than numeric data?
The CDC did not have tagged data, it did ALL the arithmetic in the floating point
unit (with the exception of operations on 15 bit indicies). Integers were floats with
a zero mantissa. you got errors when your number grew past 2^48. Cray's behave
similarly, (since they share the designer) but I think they have real integer
I can beleive that burroughs had tags (their machines had lots of neat but
unfortunately entirely too modern bits that went beyond most of their customer base,
and made their hardware bulkier than the competitions) but I don't know for certain.
A machine that definitely DID have tag bits was the IBM 1620 (it was a decimal
machine that worked on variable length data. It was intended for the scientific
market. individual 'digits' had a tag bit, a sign bit, and I beleive two others (one
of which caused the the typewriter to print that digit with a line OVER it, the other
had something to do with carry) Addition was done by lookup in memory resident
tables, which you could damage if you weren't careful.)
Some of the special purpose personal machines also have hardware tags:
the D-machines, the Lispms, etc.(?) On the Lispms, however, it is the
POINTERS that are tagged with the type of the object pointed to, not
the actual data word.
lispms have tags on data fields as well. That is why cadrs' and explorer takes 2
words to store a float (with 25 bits in each word) and the 'bolics machines have 32
bit fixnums and single-floats even tho the machine has 36 bit words (the 'bolics uses
variable width tags)
Taking the Symbolics I machine as an example (32 bit pointers with
8 more bits for tag + GC)...
Now I understand that when I call (CAR FOO), the hardware does a
data type check (in parallel) of the pointer for FOO. What happens,
however, when I call (+ X Y), when X and/or Y are either bignums or
large FP numbers? Do I do the checking on the tag bits for the pointers
in X & Y? If so, then when I do the indirection to the actual data
words, am I adding two 32 bits quantities whose tag bits are ignored, or
am I adding two 40 bit quantities (mod GC)?
assuming you mean a 40 bit machine that uses fixed width tags, it would add two 32
bit quantities ignoring (in the recent models) or masking (in cadrs) the tag fields.
The explorer does use fixed tags, and when you add two integers, the ALU ignores the
top 7 bits.
In other words, is the data itself ever tagged on these machines?
If not, are the tag bits even used? If so, what are they used for?
And while we're at it, am I correct in calling the GC bits ``tag bits''?
CDR-coding bits are also tag bits?
as mentioned above data is tagged. cdr code bits are part of the tag for the cons
data type. the cdr code bits indicate where to find the other half of the cons cell.
what do you mean by GC bits? there is a bit to indicate a forwarding pointer that the
gc uses when moving things around, but since the MIT derived machines don't use
mark/sweep GC's there aren't bits specificaly sacred to the GC. (tho mucking with
almost any of the tag bits is a good way to cause your machine to die some hours
later when the GC finally finds it.)