Re: Keeping other stuff with addresses

Liste des GroupesRevenir à c arch 
Sujet : Re: Keeping other stuff with addresses
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.arch
Date : 02. Dec 2024, 00:22:14
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <viir36$2qq41$9@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 11/29/2024 10:28 PM, Anton Ertl wrote:
John 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!

 The designers of ARM A64 could think beyond that and designed in the
top-byte-ignore feature.  Apparently this made AMD and Intel see the
light:
 AMD added the upper-address ignore feature, which, when enabled,
ignores the top 7 bits.  One problem with this in the Linux kernel
(and maybe other OSs) is that the Linux kernel expects the top bit to
be set only for kernel addresses.  Not sure how that works with ARMs
top-byte ignore feature, which is supported since Linux 5.4 in 2019
using the PR_SET_TAGGED_ADDR_CTRL option of the prctl() call.
 Intel added the linear address masking feature, with two variants:
LAM_U57 ignores bits 57-62 (but not the MSB), allowing 6 bits for
other uses; LAM_U48 ignores bits 48-62, allowing 15 bits for other
uses.  These variants require bit 63 to have the same value as bit
56/47; another bit could be made available by ignoring bit 56/47 (the
information is in bit 63 anyway), but Intel apparently decided that
programmers don't need that extra bit.
 RISC-V has the pointer-masking extension, which ignores the top 7 bits
(like AMD's upper-address ignore) or optionally 16 bits.
 See <https://muxup.com/2023q4/storing-data-in-pointers> and
<https://lwn.net/Articles/902094/>.
 Concerning the kernel requirements, as someone who has implemented
Prolog with tagging, having to untag on passing an address to the
kernel would be only a minimal cost.  Not having to unmask on every
memory access would be quite useful.  Having the top bit always be 0
with the tags in the 6 bits below would not have been a restriction
for us (we used 4-bit tags); OTOH, if one more bit was available,
programmers would find good uses for it.
 
These days I'd say the relevant N is the size of arithmetic registers but a
lot of marketers appear to disagree with me.
 Which arithmetic registers on an Intel processor?  The 64 bits of a
GPR?  The 128 bits of an XMM register?  The 256 bits of a YMM
register?  The 512 bits of a ZMM register?  Note that until recently,
Intel sold you the same silicon either with only XMM or with XMM and
YMM registers.  They sell consumer CPUs with XMM, YMM, and ZMM
registers, but more recent consumer and small-server CPUs have
reverted to only supporting XMM and YMM registers.
 - anton

Date Sujet#  Auteur
28 Nov 24 * What is an N-bit machine?91John Dallman
28 Nov 24 +* Re: What is an N-bit machine?67Michael S
30 Nov 24 i`* Re: What is an N-bit machine?66John Levine
30 Nov 24 i +* Re: What is an N-bit machine?11Stephen Fuld
30 Nov 24 i i`* Re: What is an N-bit machine?10John Levine
30 Nov 24 i i +* Re: What is an N-bit machine?2Michael S
1 Dec 24 i i i`- Re: What is an N-bit machine?1Paul A. Clayton
1 Dec 24 i i `* Re: What is an N-bit machine?7MitchAlsup1
1 Dec 24 i i  +* Re: What is an N-bit machine?2Thomas Koenig
1 Dec 24 i i  i`- Re: What is an N-bit machine?1Anton Ertl
2 Dec 24 i i  `* Re: What is an N-bit machine?4Terje Mathisen
3 Dec 24 i i   +* Re: What is an N-bit machine?2Brian G. Lucas
3 Dec 24 i i   i`- Re: What is an N-bit machine?1Stephen Fuld
15 Dec 24 i i   `- Re: What is an N-bit machine?1Waldek Hebisch
30 Nov 24 i `* Keeping other stuff with addresses (was: What is an N-bit machine?)54Anton Ertl
30 Nov 24 i  +* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)22Anton Ertl
30 Nov 24 i  i`* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)21Thomas Koenig
30 Nov 24 i  i `* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)20Anton Ertl
30 Nov 24 i  i  `* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)19Michael S
30 Nov 24 i  i   `* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)18Anton Ertl
30 Nov 24 i  i    +* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)12Michael S
1 Dec 24 i  i    i`* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)11Anton Ertl
1 Dec 24 i  i    i `* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)10Thomas Koenig
1 Dec 24 i  i    i  +* Re: Keeping other stuff with addresses4David Schultz
1 Dec 24 i  i    i  i`* Re: Keeping other stuff with addresses3Thomas Koenig
4 Dec 24 i  i    i  i `* Re: Keeping other stuff with addresses2MitchAlsup1
4 Dec 24 i  i    i  i  `- Re: Keeping other stuff with addresses1John Levine
1 Dec 24 i  i    i  `* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)5Tim Rentsch
1 Dec 24 i  i    i   +* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)3Thomas Koenig
1 Dec 24 i  i    i   i+- Re: Keeping other stuff with addresses (was: What is an N-bit machine?)1Michael S
1 Dec 24 i  i    i   i`- Re: Keeping other stuff with addresses (was: What is an N-bit machine?)1Brett
2 Dec 24 i  i    i   `- Re: Keeping other stuff with addresses1Terje Mathisen
30 Nov 24 i  i    +* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)3John Levine
1 Dec 24 i  i    i`* What is an N-bit machine?2Anton Ertl
16 Dec23:39 i  i    i `- Re: What is an N-bit machine?1Waldek Hebisch
1 Dec 24 i  i    `* Re: Keeping other stuff with addresses (was: What is an N-bit machine?)2Thomas Koenig
1 Dec 24 i  i     `- Re: Keeping other stuff with addresses (was: What is an N-bit machine?)1Anton Ertl
1 Dec 24 i  +- Re: Keeping other stuff with addresses (was: What is an N-bit machine?)1Anton Ertl
2 Dec 24 i  +* Re: Keeping other stuff with addresses28Chris M. Thomasson
2 Dec 24 i  i`* Re: Keeping other stuff with addresses27MitchAlsup1
2 Dec 24 i  i `* Re: Keeping other stuff with addresses26Chris M. Thomasson
3 Dec 24 i  i  `* Re: Keeping other stuff with addresses25Chris M. Thomasson
3 Dec 24 i  i   `* Re: Keeping other stuff with addresses24Stefan Monnier
3 Dec 24 i  i    +* Re: Keeping other stuff with addresses21John Levine
3 Dec 24 i  i    i+* Re: Keeping other stuff with addresses18Stefan Monnier
4 Dec 24 i  i    ii`* Re: Keeping other stuff with addresses17John Levine
4 Dec 24 i  i    ii `* Re: Keeping other stuff with addresses16Stefan Monnier
4 Dec 24 i  i    ii  +* Re: Keeping other stuff with addresses13MitchAlsup1
4 Dec 24 i  i    ii  i+- Re: Keeping other stuff with addresses1Thomas Koenig
4 Dec 24 i  i    ii  i+* Re: Keeping other stuff with addresses3Stefan Monnier
4 Dec 24 i  i    ii  ii+- Re: Keeping other stuff with addresses1MitchAlsup1
5 Dec 24 i  i    ii  ii`- Re: Keeping other stuff with addresses1Keith Thompson
5 Dec 24 i  i    ii  i+- Re: bytes, Keeping other stuff with addresses1John Levine
22 Dec00:22 i  i    ii  i`* unaligned load/store (was: Re: Keeping other stuff with addresses)7Jonathan Thornburg
22 Dec02:27 i  i    ii  i +* Re: unaligned load/store5MitchAlsup1
22 Dec11:01 i  i    ii  i i+* Re: unaligned load/store3Thomas Koenig
22 Dec12:06 i  i    ii  i ii+- Re: unaligned load/store1Anton Ertl
22 Dec12:42 i  i    ii  i ii`- Re: unaligned load/store1John Dallman
22 Dec22:04 i  i    ii  i i`- Re: unaligned load/store1Thomas Koenig
22 Dec11:33 i  i    ii  i `- Re: unaligned load/store (was: Re: Keeping other stuff with addresses)1Anton Ertl
4 Dec 24 i  i    ii  `* Re: bits and bytes, Keeping other stuff with addresses2John Levine
4 Dec 24 i  i    ii   `- Re: bits and bytes, Keeping other stuff with addresses1Stefan Monnier
3 Dec 24 i  i    i`* Re: Keeping other stuff with addresses2MitchAlsup1
4 Dec 24 i  i    i `- Re: Keeping other stuff with addresses1Chris M. Thomasson
4 Dec 24 i  i    `* Re: Keeping other stuff with addresses2Chris M. Thomasson
4 Dec 24 i  i     `- Re: Keeping other stuff with addresses1Stefan Monnier
4 Dec 24 i  `* Re: Keeping other stuff with addresses2Keith Thompson
4 Dec 24 i   `- Re: Keeping other stuff with addresses1MitchAlsup1
28 Nov 24 +* Re: What is an N-bit machine?18Thomas Koenig
28 Nov 24 i+* Re: What is an N-bit machine?2MitchAlsup1
28 Nov 24 ii`- Re: What is an N-bit machine?1Brett
28 Nov 24 i`* Re: What is an N-bit machine?15Lawrence D'Oliveiro
29 Nov 24 i `* Re: What is an N-bit machine?14John Dallman
29 Nov 24 i  +* Re: What is an N-bit machine?9Lynn Wheeler
29 Nov 24 i  i+- Re: What is an N-bit machine?1John Dallman
29 Nov 24 i  i`* IBM and Amdahl history (Re: What is an N-bit machine?)7Anton Ertl
29 Nov 24 i  i +- Re: IBM and Amdahl history (Re: What is an N-bit machine?)1Lynn Wheeler
29 Nov 24 i  i +- Re: IBM and Amdahl history (Re: What is an N-bit machine?)1Lynn Wheeler
29 Nov 24 i  i `* Re: IBM and Amdahl history (Re: What is an N-bit machine?)4Lawrence D'Oliveiro
30 Nov 24 i  i  `* Re: IBM and Amdahl history (Re: What is an N-bit machine?)3Anton Ertl
1 Dec 24 i  i   +- Re: IBM and Amdahl history (Re: What is an N-bit machine?)1John Dallman
1 Dec 24 i  i   `- Re: IBM and Amdahl history (Re: What is an N-bit machine?)1Lawrence D'Oliveiro
29 Nov 24 i  `* Re: What is an N-bit machine?4Lawrence D'Oliveiro
30 Nov 24 i   +- Re: What is an N-bit machine?1Brett
30 Nov 24 i   +- Re: market power, What is an N-bit machine?1John Levine
30 Nov 24 i   `- Re: What is an N-bit machine?1Lynn Wheeler
28 Nov 24 +- Re: What is an N-bit machine?1MitchAlsup1
28 Nov 24 +- Re: What is an N-bit machine?1Lynn Wheeler
29 Nov 24 `* Re: What is an N-bit machine?3Anton Ertl
29 Nov 24  +- Re: What is an N-bit machine?1Thomas Koenig
22 Dec22:37  `- Re: What is an N-bit machine?1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal