Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Bo Persson Newsgroups: comp.lang.c++ Subject: Re: Examples of current platforms/architectures where sizeof(void*) > sizeof(int*) ? Date: Wed, 1 Sep 2021 11:15:23 +0200 Lines: 54 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net CTdDaz7sPiOGIZVFEwCirgwktD/JIQ9wiHvvU+5tfrzhu1iSfG Cancel-Lock: sha1:jdwGBHgPc/uTCDqkzHNUMtue/jo= User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: Content-Language: sv Xref: csiph.com comp.lang.c++:80959 On 2021-09-01 at 10:51, Bonita Montero wrote: > Am 01.09.2021 um 10:48 schrieb Bo Persson: >> On 2021-09-01 at 10:44, Bonita Montero wrote: >>> Am 01.09.2021 um 10:37 schrieb Bo Persson: >>>> On 2021-09-01 at 10:10, Bonita Montero wrote: >>>>> Am 01.09.2021 um 08:55 schrieb Christian Gollwitzer: >>>>> >>>>>> On the contrary. It makes the hardware design simpler. You can >>>>>> address more memory with a smaller number of bits in the registers. >>>>> >>>>> Having the same registers with different types of differnt sets of >>>>> registers with different types makes them more complex. >>>> >>>> The famous example is the Cray supercomputers that had vector >>>> registers with 64x64-bits. You never stored pointers in those. >>> >>> That's sth. totally different than pointer-typed registers. >> >> Yes, but having different sets of registers with different types made >> the total design *less* complex. > > And what's when you have a pointer to a structure with differently > typed members ? You'd have to make a special lea with a special > destination-type before you store or fetch the member. > Do you really still believe such pointers would make the design > of a CPU simpler ? No. The Cray only got 64-bit words from memory (or 64x64-bits for vector computations). Sure, text processing would be a bit hard, but that wasn't a concern for the Cray design. > And think further: if you have sth like a MMU, you would have to > translate those pointers back to unified pointers. No, the word addresses *are* what the memory hardware is using. There are no rules that 64-bit data must have a 64-bit address. Even the current x86-64 doesn't care to send all 64-bits on the address bus. > >> >>> >>>> By using 64-bit words, they could get away with using only 24-bits >>>> in their dedicated address registers. A simplification of that part. >>>> >>>> >>> >> >