Liste des Groupes | Revenir à c arch |
On Sun, 1 Dec 2024 23:22:14 +0000, Chris M. Thomasson wrote:You don't for they are not portable at all. However, on systems were we can steal some bits of a pointer value in C/C++, well, we can do it and create some interesting algorithms.
On 11/29/2024 10:28 PM, Anton Ertl wrote:How are you going to write these algorithms when a pointer consumesJohn Levine <johnl@taugh.com> writes:>S/360 had 24 bit addresses and 32 bit registers. When doing address>
arithmetic
the high 8 bits of the register were ignored. That turned out to be a
really bad
decision since a few instructions and a lot of programming conventions
stored
other stuff in that high byte, causing severe pain a few years later
when
memories got bigger than 16 meg.
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.
Fwiw, stealing bits from pointers is a common practice in exotic
lock-free algorithms. It's not portable at all, but comes in handy!
all 64-bits of the register/memory container ?? VAS = 64-bits.
Les messages affichés proviennent d'usenet.