igor!davidm@uunet.UU.NET (David Moore) writes:>The chief advantage of register+short immediate addressing is to avoid>having to increment large numbers of induction variables in loops.

I think it's also useful in implementing runtimes that use tagged garbage
collectors. A common scheme is to use the low bit of a word to encode its
status. If the bit is 0, then the word is a 31-bit integer. If the bit
is 1, then the word is a pointer. Any memory access adds 3 to the word to
get an address on a word boundary.

I suppose that if register+short immediate addressing wasn't available
then you could dedicate a register to hold the 3 offset, provided that the
addition of this offset wasn't any slower. (I don't know enough about
specific chips to comment on this.)

Dave.
[Some architectures scale the offset by the size of the datum, which often
makes Lisp implementors unhappy. -John]
--