Sujet : Re: Keeping other stuff with addresses
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.archDate : 04. Dec 2024, 02:43:15
Autres entêtes
Organisation : None to speak of
Message-ID : <87wmggp6j0.fsf@nosuchdomain.example.com>
References : 1 2 3 4
User-Agent : Gnus/5.13 (Gnus v5.13)
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
[...]
The technique of putting stuff in unused bits of an address has its
drawbacks, but it also has benefits, in particular type information is
often stored there (even on architectures that do not ignore any
bits). Of course AMD and Intel have the bad examples of S/360 and
68000 in mind, and did not want to have anything to do with that
during the first two decades of AMD64.
[...]
One example of this that I haven't seen mentioned here is used by the C
and C++ compilers for Cray vector machines (I've used the T90 and SV1).
These systems had a 64-bit word size, and were heavily optimized
for floating-point operations. Hardware addresses referred to 64-bit
words. Compatibility with other systems required support for 8-bit
bytes (CHAR_BIT==8). This was implemented in generated code by using
the high-order 3 bits of an address as a byte offset.
The fact that all byte addressing was implemented in software meant
that, for example, string manipulation was remarkably slow -- but it
worked.
(I'm using the past tense because I don't know whether any of these
systems are still in use.)
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */