Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and appears to be fixed. Will keep monitoring.


devel / comp.arch / Debunking CISC vs RISC code density

SubjectAuthor
* Debunking CISC vs RISC code densityMarcus
`* Re: Debunking CISC vs RISC code densityAnton Ertl
 +- Re: Debunking CISC vs RISC code densityThomas Koenig
 +* Re: Debunking CISC vs RISC code densityMitchAlsup
 |`* Re: Debunking CISC vs RISC code densityBGB
 | `* Re: Debunking CISC vs RISC code densityMitchAlsup
 |  `* Re: Debunking CISC vs RISC code densityJimBrakefield
 |   `* Re: Debunking CISC vs RISC code densityMitchAlsup
 |    +* Re: Debunking CISC vs RISC code densityJimBrakefield
 |    |`* Re: Debunking CISC vs RISC code densityMitchAlsup
 |    | `* Re: Debunking CISC vs RISC code densityJimBrakefield
 |    |  `* Re: Debunking CISC vs RISC code densityMitchAlsup
 |    |   +* Re: Debunking CISC vs RISC code densityEricP
 |    |   |`* Re: Debunking CISC vs RISC code densityBGB
 |    |   | +* Re: Debunking CISC vs RISC code densityMitchAlsup
 |    |   | |+* Re: Debunking CISC vs RISC code densityScott Lurndal
 |    |   | ||`* Re: Debunking CISC vs RISC code densityMitchAlsup
 |    |   | || `- Re: Debunking CISC vs RISC code densityScott Lurndal
 |    |   | |+* Re: Debunking CISC vs RISC code densityEricP
 |    |   | ||`* Re: Debunking CISC vs RISC code densityStephen Fuld
 |    |   | || `* Re: Debunking CISC vs RISC code densityEricP
 |    |   | ||  +- Re: Debunking CISC vs RISC code densityStephen Fuld
 |    |   | ||  `* Re: Debunking CISC vs RISC code densityJimBrakefield
 |    |   | ||   `* Re: Debunking CISC vs RISC code densityMitchAlsup
 |    |   | ||    `* Re: Debunking CISC vs RISC code densityJimBrakefield
 |    |   | ||     `* Re: Debunking CISC vs RISC code densityMitchAlsup
 |    |   | ||      `* Re: Debunking CISC vs RISC code densityThomas Koenig
 |    |   | ||       `- Re: Debunking CISC vs RISC code densityMitchAlsup
 |    |   | |`- Re: Debunking CISC vs RISC code densityPeter Lund
 |    |   | `* Re: Debunking CISC vs RISC code densityTerje Mathisen
 |    |   |  `- Re: Debunking CISC vs RISC code densityTerje Mathisen
 |    |   +- Re: Debunking CISC vs RISC code densityJohnG
 |    |   `* Re: Debunking CISC vs RISC code densityMarcus
 |    |    `* Re: Debunking CISC vs RISC code densityMitchAlsup
 |    |     `- Re: Debunking CISC vs RISC code densityMarcus
 |    +* Re: Debunking CISC vs RISC code densityThomas Koenig
 |    |`* Re: Debunking CISC vs RISC code densityrobf...@gmail.com
 |    | `* Re: Debunking CISC vs RISC code densityBernd Linsel
 |    |  `- Re: Debunking CISC vs RISC code densityrobf...@gmail.com
 |    `* Re: Debunking CISC vs RISC code densityBGB
 |     `* Re: Debunking CISC vs RISC code densityrobf...@gmail.com
 |      +- Re: Debunking CISC vs RISC code densityScott Lurndal
 |      `- Re: Debunking CISC vs RISC code densityMitchAlsup
 `* Re: Debunking CISC vs RISC code densityPaul A. Clayton
  +* Re: Debunking CISC vs RISC code densityMitchAlsup
  |`* Re: Debunking CISC vs RISC code densityScott Lurndal
  | `- Re: Debunking CISC vs RISC code densityMitchAlsup
  `* Re: Debunking CISC vs RISC code densityStephen Fuld
   `- Re: Debunking CISC vs RISC code densityBGB

Pages:12
Debunking CISC vs RISC code density

<tmhjrh$3jl6t$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29262&group=comp.arch#29262

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: m.del...@this.bitsnbites.eu (Marcus)
Newsgroups: comp.arch
Subject: Debunking CISC vs RISC code density
Date: Sun, 4 Dec 2022 08:56:33 +0100
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <tmhjrh$3jl6t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 4 Dec 2022 07:56:33 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="2c0dd34ea751df74051015d630ccf351";
logging-data="3790045"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UEBmjfGceK9uWw+tAVD0qKTsme/1Wlcw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
Cancel-Lock: sha1:4BGanTpviUMOI6mTBqM+JJhf9TU=
Content-Language: en-US
 by: Marcus - Sun, 4 Dec 2022 07:56 UTC

Hi!

I wanted to get a better feeling for the machine code density on
different contemporary (modern) ISA:s, including my own ISA MRISC32 of
course. I posted an article with my thoughts and the results:

https://www.bitsnbites.eu/cisc-vs-risc-code-density/

The short is that with GCC and optimizations turned on, the code for
RISC machines is roughly equally dense or denser compared to "modern"
CISC machines (x86_64 and z/Arch). Also, x86_64 appears to have an
average instruction size of ~4 bytes (i.e. same as a fixed size RISC ISA).

/Marcus

Re: Debunking CISC vs RISC code density

<2022Dec4.113313@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29267&group=comp.arch#29267

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Debunking CISC vs RISC code density
Date: Sun, 04 Dec 2022 10:33:13 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 25
Message-ID: <2022Dec4.113313@mips.complang.tuwien.ac.at>
References: <tmhjrh$3jl6t$1@dont-email.me>
Injection-Info: reader01.eternal-september.org; posting-host="f71e9b82ca0642d8befb58df19c180f9";
logging-data="3855745"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18liIyPiKyq3P/3rURRJQaJ"
Cancel-Lock: sha1:WGCxAmSlJJx7b1/Ehvg6pDR8ZwA=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sun, 4 Dec 2022 10:33 UTC

Marcus <m.delete@this.bitsnbites.eu> writes:
>https://www.bitsnbites.eu/cisc-vs-risc-code-density/

The -Os results may not be representative of real-world programs, but
may be more informative wrt. instruction set density. If on
architecture A -O2 and -O3 unroll more than on architecture B, this
will look with your method like architecture A has less code density.
-Os should minimize these kinds of effects.

Concerning "dynamic code density", if the purpose of code density is
to minimize I-cache misses, the way to go would be to measure I-cache
misses (maybe with a cache simulator to get comparable cache sizes and
get rid of prefetching artifacts; and with different I-cache sizes to
see how consistent the difference is). Instruction fetch bandwidth is
another interesting issue, with a few problems: Do you account
instruction fetches from mispredictions, or extra bytes fetched behind
a taken branch?

I wonder if there is really substance to the myth of greater code
density from CISCs, even in the past.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Debunking CISC vs RISC code density

<tmil52$ctup$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29281&group=comp.arch#29281

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-d844-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Debunking CISC vs RISC code density
Date: Sun, 4 Dec 2022 17:24:50 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tmil52$ctup$1@newsreader4.netcologne.de>
References: <tmhjrh$3jl6t$1@dont-email.me>
<2022Dec4.113313@mips.complang.tuwien.ac.at>
Injection-Date: Sun, 4 Dec 2022 17:24:50 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-d844-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:d844:0:7285:c2ff:fe6c:992d";
logging-data="423897"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sun, 4 Dec 2022 17:24 UTC

Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
> Marcus <m.delete@this.bitsnbites.eu> writes:
>>https://www.bitsnbites.eu/cisc-vs-risc-code-density/
>
> The -Os results may not be representative of real-world programs, but
> may be more informative wrt. instruction set density. If on
> architecture A -O2 and -O3 unroll more than on architecture B, this
> will look with your method like architecture A has less code density.
> -Os should minimize these kinds of effects.

So, it is obviously not only a question of the ISA, but also of
the compiler. If the cost function of the compiler in question
is good (which is questionable), then it should make choices in
the right ballpark.

But unless major distributions are compiled with -Os, the results
are not going to matter for most users (and I've seen cases
where -Os produced larger code than -O3 :-)

So, unless this is an embedded system, I think Marcus' benchmark
is probably one of the best options.

[...]

> I wonder if there is really substance to the myth of greater code
> density from CISCs, even in the past.

Good question.

Re: Debunking CISC vs RISC code density

<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29292&group=comp.arch#29292

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:1139:b0:6fa:9084:50c3 with SMTP id p25-20020a05620a113900b006fa908450c3mr33463395qkk.292.1670183166317;
Sun, 04 Dec 2022 11:46:06 -0800 (PST)
X-Received: by 2002:a05:6830:2aa5:b0:66e:4d5a:25f4 with SMTP id
s37-20020a0568302aa500b0066e4d5a25f4mr17313080otu.274.1670183166018; Sun, 04
Dec 2022 11:46:06 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sun, 4 Dec 2022 11:46:05 -0800 (PST)
In-Reply-To: <2022Dec4.113313@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:7d65:940a:3e39:425;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:7d65:940a:3e39:425
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sun, 04 Dec 2022 19:46:06 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3397
 by: MitchAlsup - Sun, 4 Dec 2022 19:46 UTC

On Sunday, December 4, 2022 at 4:44:31 AM UTC-6, Anton Ertl wrote:
> Marcus <m.de...@this.bitsnbites.eu> writes:
> >https://www.bitsnbites.eu/cisc-vs-risc-code-density/
>
> The -Os results may not be representative of real-world programs, but
> may be more informative wrt. instruction set density. If on
> architecture A -O2 and -O3 unroll more than on architecture B, this
> will look with your method like architecture A has less code density.
> -Os should minimize these kinds of effects.
>
> Concerning "dynamic code density", if the purpose of code density is
> to minimize I-cache misses, the way to go would be to measure I-cache
> misses (maybe with a cache simulator to get comparable cache sizes and
> get rid of prefetching artifacts; and with different I-cache sizes to
> see how consistent the difference is). Instruction fetch bandwidth is
> another interesting issue, with a few problems: Do you account
> instruction fetches from mispredictions, or extra bytes fetched behind
> a taken branch?
<
a) the purpose of greater code density is also to execute fewer instructions.
<
In the early 1980s, Mark Horowitz stated that <Stanford> MIPS executed
50% more instructions at 6× the frequency for a 4× performance advantage.
I, personally, want to chip away at that 50% adder, and adding constants
to a rather std RISC instruction set has given a 25% advantage. My 66000
only executes 75%-79% as many instructions as RISC-V.
>
> I wonder if there is really substance to the myth of greater code
> density from CISCs, even in the past.
<
Given that RISC-V compressed has similar code density as several of the
CISC chips, it is competing against, apparently there is no longer "such a
great distance" between CISC code density and RISC code density.
<
AND at this point one needs to refocus on how much work is encoded
in <how few of> the application instructions.
>
> - anton
> --
> 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
> Mitch Alsup, <c17fcd89-f024-40e7...@googlegroups.com>

Re: Debunking CISC vs RISC code density

<tmlv42$1t3n$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29327&group=comp.arch#29327

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Debunking CISC vs RISC code density
Date: Mon, 5 Dec 2022 17:33:19 -0600
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <tmlv42$1t3n$1@dont-email.me>
References: <tmhjrh$3jl6t$1@dont-email.me>
<2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 5 Dec 2022 23:33:22 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="8dade071050c277af8e53b6631eb07c3";
logging-data="62583"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DjBaV3jpZ3dwHjTQ8laOz"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.1
Cancel-Lock: sha1:0yNAw7/uXe54ta1eXToVJZTPRw0=
Content-Language: en-US
In-Reply-To: <d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com>
 by: BGB - Mon, 5 Dec 2022 23:33 UTC

On 12/4/2022 1:46 PM, MitchAlsup wrote:
> On Sunday, December 4, 2022 at 4:44:31 AM UTC-6, Anton Ertl wrote:
>> Marcus <m.de...@this.bitsnbites.eu> writes:
>>> https://www.bitsnbites.eu/cisc-vs-risc-code-density/
>>
>> The -Os results may not be representative of real-world programs, but
>> may be more informative wrt. instruction set density. If on
>> architecture A -O2 and -O3 unroll more than on architecture B, this
>> will look with your method like architecture A has less code density.
>> -Os should minimize these kinds of effects.
>>
>> Concerning "dynamic code density", if the purpose of code density is
>> to minimize I-cache misses, the way to go would be to measure I-cache
>> misses (maybe with a cache simulator to get comparable cache sizes and
>> get rid of prefetching artifacts; and with different I-cache sizes to
>> see how consistent the difference is). Instruction fetch bandwidth is
>> another interesting issue, with a few problems: Do you account
>> instruction fetches from mispredictions, or extra bytes fetched behind
>> a taken branch?
> <
> a) the purpose of greater code density is also to execute fewer instructions.
> <
> In the early 1980s, Mark Horowitz stated that <Stanford> MIPS executed
> 50% more instructions at 6× the frequency for a 4× performance advantage.
> I, personally, want to chip away at that 50% adder, and adding constants
> to a rather std RISC instruction set has given a 25% advantage. My 66000
> only executes 75%-79% as many instructions as RISC-V.

Similar probably for things like Jumbo encodings in my case, which can
somewhat cut down on the need for constant loads.

>>
>> I wonder if there is really substance to the myth of greater code
>> density from CISCs, even in the past.
> <
> Given that RISC-V compressed has similar code density as several of the
> CISC chips, it is competing against, apparently there is no longer "such a
> great distance" between CISC code density and RISC code density.
> <
> AND at this point one needs to refocus on how much work is encoded
> in <how few of> the application instructions.

Also why I am currently more in support of "limited variable length"
encodings, say:
16/32/64/96, or 16/32/48/64/96
Rather than fully variable length byte-oriented encodings.

The limited case provides nearly the same code density, but can be a lot
easier and more efficient to decode.

Granted, the most optimal encoding scheme within this space is more
subject to debate.

Does not entirely avoid the "how much stuff can I fit into a 32 bit
encoding?" issue, if the 32-bit encoding space is still the central hub
that all of the other encodings revolve around.

>>
>> - anton
>> --
>> 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
>> Mitch Alsup, <c17fcd89-f024-40e7...@googlegroups.com>

Re: Debunking CISC vs RISC code density

<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29330&group=comp.arch#29330

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:1dca:b0:3a6:979a:71c1 with SMTP id bn10-20020a05622a1dca00b003a6979a71c1mr16445968qtb.659.1670287040460;
Mon, 05 Dec 2022 16:37:20 -0800 (PST)
X-Received: by 2002:a05:6808:7db:b0:354:4a19:f09e with SMTP id
f27-20020a05680807db00b003544a19f09emr31518320oij.61.1670287040166; Mon, 05
Dec 2022 16:37:20 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Mon, 5 Dec 2022 16:37:19 -0800 (PST)
In-Reply-To: <tmlv42$1t3n$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:a10e:aa9:d91c:2ee0;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:a10e:aa9:d91c:2ee0
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 06 Dec 2022 00:37:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5314
 by: MitchAlsup - Tue, 6 Dec 2022 00:37 UTC

On Monday, December 5, 2022 at 5:33:25 PM UTC-6, BGB wrote:
> On 12/4/2022 1:46 PM, MitchAlsup wrote:
> > On Sunday, December 4, 2022 at 4:44:31 AM UTC-6, Anton Ertl wrote:
> >> Marcus <m.de...@this.bitsnbites.eu> writes:
> >>> https://www.bitsnbites.eu/cisc-vs-risc-code-density/
> >>
> >> The -Os results may not be representative of real-world programs, but
> >> may be more informative wrt. instruction set density. If on
> >> architecture A -O2 and -O3 unroll more than on architecture B, this
> >> will look with your method like architecture A has less code density.
> >> -Os should minimize these kinds of effects.
> >>
> >> Concerning "dynamic code density", if the purpose of code density is
> >> to minimize I-cache misses, the way to go would be to measure I-cache
> >> misses (maybe with a cache simulator to get comparable cache sizes and
> >> get rid of prefetching artifacts; and with different I-cache sizes to
> >> see how consistent the difference is). Instruction fetch bandwidth is
> >> another interesting issue, with a few problems: Do you account
> >> instruction fetches from mispredictions, or extra bytes fetched behind
> >> a taken branch?
> > <
> > a) the purpose of greater code density is also to execute fewer instructions.
> > <
> > In the early 1980s, Mark Horowitz stated that <Stanford> MIPS executed
> > 50% more instructions at 6× the frequency for a 4× performance advantage.
> > I, personally, want to chip away at that 50% adder, and adding constants
> > to a rather std RISC instruction set has given a 25% advantage. My 66000
> > only executes 75%-79% as many instructions as RISC-V.
> Similar probably for things like Jumbo encodings in my case, which can
> somewhat cut down on the need for constant loads.
> >>
> >> I wonder if there is really substance to the myth of greater code
> >> density from CISCs, even in the past.
> > <
> > Given that RISC-V compressed has similar code density as several of the
> > CISC chips, it is competing against, apparently there is no longer "such a
> > great distance" between CISC code density and RISC code density.
> > <
> > AND at this point one needs to refocus on how much work is encoded
> > in <how few of> the application instructions.
> Also why I am currently more in support of "limited variable length"
> encodings, say:
> 16/32/64/96, or 16/32/48/64/96
> Rather than fully variable length byte-oriented encodings.
<
I have never been a fan of fully variable length encodings--I saw the disaster
Intel 432 was first hand. PDP-11 (and 68K) were pretty tolerable ISA-wise,
VAX was overboard--although if there was some way to encode PDP-11
ISA such that you got 1 immediate and 1 displacement per instruction it
would have been a better design. On the whole:: IBM 360 is also pretty
tolerable ISA-wise (although I have no idea what they did to ISA in the
transformation to 64-bit Z-series.
<
I support 32-64-96-128-160-------------BUT
<
Everything comes in word (32-bit) containers-------------------AND
<
Everything Decode needs is found in the first word----------------AND
<
The variable length can be determined in 4 gates of delay and 30 total gates.
>
> The limited case provides nearly the same code density, but can be a lot
> easier and more efficient to decode.
>
> Granted, the most optimal encoding scheme within this space is more
> subject to debate.
>
Can we agree that code sizes that are within a handful of %-age points
are "essentially" equal ?
>
> Does not entirely avoid the "how much stuff can I fit into a 32 bit
> encoding?" issue, if the 32-bit encoding space is still the central hub
> that all of the other encodings revolve around.
<
It is not "how much stuff" you can get in, but in how few bits.

Re: Debunking CISC vs RISC code density

<40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29332&group=comp.arch#29332

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:514d:b0:3a5:258c:d69c with SMTP id ew13-20020a05622a514d00b003a5258cd69cmr65151589qtb.279.1670289469749;
Mon, 05 Dec 2022 17:17:49 -0800 (PST)
X-Received: by 2002:a05:6870:9f0c:b0:13c:97e9:5d40 with SMTP id
xl12-20020a0568709f0c00b0013c97e95d40mr37764715oab.42.1670289469404; Mon, 05
Dec 2022 17:17:49 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Mon, 5 Dec 2022 17:17:49 -0800 (PST)
In-Reply-To: <e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.50.14.162; posting-account=AoizIQoAAADa7kQDpB0DAj2jwddxXUgl
NNTP-Posting-Host: 136.50.14.162
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: jim.brak...@ieee.org (JimBrakefield)
Injection-Date: Tue, 06 Dec 2022 01:17:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 6990
 by: JimBrakefield - Tue, 6 Dec 2022 01:17 UTC

On Monday, December 5, 2022 at 6:37:22 PM UTC-6, MitchAlsup wrote:
> On Monday, December 5, 2022 at 5:33:25 PM UTC-6, BGB wrote:
> > On 12/4/2022 1:46 PM, MitchAlsup wrote:
> > > On Sunday, December 4, 2022 at 4:44:31 AM UTC-6, Anton Ertl wrote:
> > >> Marcus <m.de...@this.bitsnbites.eu> writes:
> > >>> https://www.bitsnbites.eu/cisc-vs-risc-code-density/
> > >>
> > >> The -Os results may not be representative of real-world programs, but
> > >> may be more informative wrt. instruction set density. If on
> > >> architecture A -O2 and -O3 unroll more than on architecture B, this
> > >> will look with your method like architecture A has less code density..
> > >> -Os should minimize these kinds of effects.
> > >>
> > >> Concerning "dynamic code density", if the purpose of code density is
> > >> to minimize I-cache misses, the way to go would be to measure I-cache
> > >> misses (maybe with a cache simulator to get comparable cache sizes and
> > >> get rid of prefetching artifacts; and with different I-cache sizes to
> > >> see how consistent the difference is). Instruction fetch bandwidth is
> > >> another interesting issue, with a few problems: Do you account
> > >> instruction fetches from mispredictions, or extra bytes fetched behind
> > >> a taken branch?
> > > <
> > > a) the purpose of greater code density is also to execute fewer instructions.
> > > <
> > > In the early 1980s, Mark Horowitz stated that <Stanford> MIPS executed
> > > 50% more instructions at 6× the frequency for a 4× performance advantage.
> > > I, personally, want to chip away at that 50% adder, and adding constants
> > > to a rather std RISC instruction set has given a 25% advantage. My 66000
> > > only executes 75%-79% as many instructions as RISC-V.
> > Similar probably for things like Jumbo encodings in my case, which can
> > somewhat cut down on the need for constant loads.
> > >>
> > >> I wonder if there is really substance to the myth of greater code
> > >> density from CISCs, even in the past.
> > > <
> > > Given that RISC-V compressed has similar code density as several of the
> > > CISC chips, it is competing against, apparently there is no longer "such a
> > > great distance" between CISC code density and RISC code density.
> > > <
> > > AND at this point one needs to refocus on how much work is encoded
> > > in <how few of> the application instructions.
> > Also why I am currently more in support of "limited variable length"
> > encodings, say:
> > 16/32/64/96, or 16/32/48/64/96
> > Rather than fully variable length byte-oriented encodings.
> <
> I have never been a fan of fully variable length encodings--I saw the disaster
> Intel 432 was first hand. PDP-11 (and 68K) were pretty tolerable ISA-wise,
> VAX was overboard--although if there was some way to encode PDP-11
> ISA such that you got 1 immediate and 1 displacement per instruction it
> would have been a better design. On the whole:: IBM 360 is also pretty
> tolerable ISA-wise (although I have no idea what they did to ISA in the
> transformation to 64-bit Z-series.
> <
> I support 32-64-96-128-160-------------BUT
> <
> Everything comes in word (32-bit) containers-------------------AND
> <
> Everything Decode needs is found in the first word----------------AND
> <
> The variable length can be determined in 4 gates of delay and 30 total gates.
> >
> > The limited case provides nearly the same code density, but can be a lot
> > easier and more efficient to decode.
> >
> > Granted, the most optimal encoding scheme within this space is more
> > subject to debate.
> >
> Can we agree that code sizes that are within a handful of %-age points
> are "essentially" equal ?
> >
> > Does not entirely avoid the "how much stuff can I fit into a 32 bit
> > encoding?" issue, if the 32-bit encoding space is still the central hub
> > that all of the other encodings revolve around.
> <
> It is not "how much stuff" you can get in, but in how few bits.

The FPGA tools and the ASIC tools also offer settings for area versus speed?
And the degree (effort) to which the tools optimize in these directions?
AFAIK mature language compilers do also, although have not seen effort settings for compilers.
It would be great if an ISA supports both blocked (32X) and variable length immediates/constants/displacements
The 32X being faster to decode and process, and the 8X offering the best code density.
(the holy grail being a high density ISA the serves both needs)
Not the whole story, as subroutine inlining and depth of code factoring (e.g. using lots of small subroutines)
both have and effect on code density.

With potential for two or three variable length items per instruction (instruction length, 1st immediate, 2nd immediate)
decode and extraction could get complicated (eg slow)?

RE the Intel 432: fine to have variable bit length fields, but not at the expense of the vast majority of code. Stretch had provision
for variable bit length fields in memory, but also had the word size references for the majority of cases (using both 32-bit and
64-bit instructions).
"the instructions are bit-variable in length and are not constrained to start or end on byte or word boundaries"
Introduction to the iAPX 432 Architecture 1981 page 3-9 :((

Re: Debunking CISC vs RISC code density

<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29333&group=comp.arch#29333

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:50a7:b0:39c:eb15:b6df with SMTP id fp39-20020a05622a50a700b0039ceb15b6dfmr77702639qtb.518.1670291816161;
Mon, 05 Dec 2022 17:56:56 -0800 (PST)
X-Received: by 2002:a05:6870:816:b0:143:af88:3b6c with SMTP id
fw22-20020a056870081600b00143af883b6cmr23191870oab.79.1670291815876; Mon, 05
Dec 2022 17:56:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Mon, 5 Dec 2022 17:56:55 -0800 (PST)
In-Reply-To: <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:a10e:aa9:d91c:2ee0;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:a10e:aa9:d91c:2ee0
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 06 Dec 2022 01:56:56 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 8280
 by: MitchAlsup - Tue, 6 Dec 2022 01:56 UTC

On Monday, December 5, 2022 at 7:17:51 PM UTC-6, JimBrakefield wrote:
> On Monday, December 5, 2022 at 6:37:22 PM UTC-6, MitchAlsup wrote:
> > On Monday, December 5, 2022 at 5:33:25 PM UTC-6, BGB wrote:
> > > On 12/4/2022 1:46 PM, MitchAlsup wrote:
> > > > On Sunday, December 4, 2022 at 4:44:31 AM UTC-6, Anton Ertl wrote:
> > > >> Marcus <m.de...@this.bitsnbites.eu> writes:
> > > >>> https://www.bitsnbites.eu/cisc-vs-risc-code-density/
> > > >>
> > > >> The -Os results may not be representative of real-world programs, but
> > > >> may be more informative wrt. instruction set density. If on
> > > >> architecture A -O2 and -O3 unroll more than on architecture B, this
> > > >> will look with your method like architecture A has less code density.
> > > >> -Os should minimize these kinds of effects.
> > > >>
> > > >> Concerning "dynamic code density", if the purpose of code density is
> > > >> to minimize I-cache misses, the way to go would be to measure I-cache
> > > >> misses (maybe with a cache simulator to get comparable cache sizes and
> > > >> get rid of prefetching artifacts; and with different I-cache sizes to
> > > >> see how consistent the difference is). Instruction fetch bandwidth is
> > > >> another interesting issue, with a few problems: Do you account
> > > >> instruction fetches from mispredictions, or extra bytes fetched behind
> > > >> a taken branch?
> > > > <
> > > > a) the purpose of greater code density is also to execute fewer instructions.
> > > > <
> > > > In the early 1980s, Mark Horowitz stated that <Stanford> MIPS executed
> > > > 50% more instructions at 6× the frequency for a 4× performance advantage.
> > > > I, personally, want to chip away at that 50% adder, and adding constants
> > > > to a rather std RISC instruction set has given a 25% advantage. My 66000
> > > > only executes 75%-79% as many instructions as RISC-V.
> > > Similar probably for things like Jumbo encodings in my case, which can
> > > somewhat cut down on the need for constant loads.
> > > >>
> > > >> I wonder if there is really substance to the myth of greater code
> > > >> density from CISCs, even in the past.
> > > > <
> > > > Given that RISC-V compressed has similar code density as several of the
> > > > CISC chips, it is competing against, apparently there is no longer "such a
> > > > great distance" between CISC code density and RISC code density.
> > > > <
> > > > AND at this point one needs to refocus on how much work is encoded
> > > > in <how few of> the application instructions.
> > > Also why I am currently more in support of "limited variable length"
> > > encodings, say:
> > > 16/32/64/96, or 16/32/48/64/96
> > > Rather than fully variable length byte-oriented encodings.
> > <
> > I have never been a fan of fully variable length encodings--I saw the disaster
> > Intel 432 was first hand. PDP-11 (and 68K) were pretty tolerable ISA-wise,
> > VAX was overboard--although if there was some way to encode PDP-11
> > ISA such that you got 1 immediate and 1 displacement per instruction it
> > would have been a better design. On the whole:: IBM 360 is also pretty
> > tolerable ISA-wise (although I have no idea what they did to ISA in the
> > transformation to 64-bit Z-series.
> > <
> > I support 32-64-96-128-160-------------BUT
> > <
> > Everything comes in word (32-bit) containers-------------------AND
> > <
> > Everything Decode needs is found in the first word----------------AND
> > <
> > The variable length can be determined in 4 gates of delay and 30 total gates.
> > >
> > > The limited case provides nearly the same code density, but can be a lot
> > > easier and more efficient to decode.
> > >
> > > Granted, the most optimal encoding scheme within this space is more
> > > subject to debate.
> > >
> > Can we agree that code sizes that are within a handful of %-age points
> > are "essentially" equal ?
> > >
> > > Does not entirely avoid the "how much stuff can I fit into a 32 bit
> > > encoding?" issue, if the 32-bit encoding space is still the central hub
> > > that all of the other encodings revolve around.
> > <
> > It is not "how much stuff" you can get in, but in how few bits.
> The FPGA tools and the ASIC tools also offer settings for area versus speed?
> And the degree (effort) to which the tools optimize in these directions?
> AFAIK mature language compilers do also, although have not seen effort settings for compilers.
> It would be great if an ISA supports both blocked (32X) and variable length immediates/constants/displacements
> The 32X being faster to decode and process, and the 8X offering the best code density.
<
32X means 32-bits ?
<
> (the holy grail being a high density ISA the serves both needs)
<
I seem to be within spitting distance of this...........
<
> Not the whole story, as subroutine inlining and depth of code factoring (e.g. using lots of small subroutines)
> both have and effect on code density.
<
In the not so distant past, the call and return from subroutines had excessive
"overhead"; making de-inlining unwise except when one is explicitly sacrificing
performance for density.
>
> With potential for two or three variable length items per instruction (instruction length, 1st immediate, 2nd immediate)
> decode and extraction could get complicated (eg slow)?
<
Can you explain why one would need more than 1 immediate and 1 displacement per instruction ??
<
It seems to me, when I faced this, that instructions with 2 immediates can ALWAYS
be done at compile time. And for a long time, my 1-operand instructions did not have
access to immediates {however a use case showed up and I added constants so that
<
CVTSF R7,#3 // R7 = 3.0D0
<
could be expressed in one 32-bit instruction.
>
> RE the Intel 432: fine to have variable bit length fields, but not at the expense of the vast majority of code. Stretch had provision
> for variable bit length fields in memory, but also had the word size references for the majority of cases (using both 32-bit and
> 64-bit instructions).
> "the instructions are bit-variable in length and are not constrained to start or end on byte or word boundaries"
> Introduction to the iAPX 432 Architecture 1981 page 3-9 :((
<
Very similar to the charge of the light brigade--and just as effective.

Re: Debunking CISC vs RISC code density

<8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29334&group=comp.arch#29334

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ae9:f707:0:b0:6fa:8b0b:10c9 with SMTP id s7-20020ae9f707000000b006fa8b0b10c9mr63633000qkg.732.1670292141353;
Mon, 05 Dec 2022 18:02:21 -0800 (PST)
X-Received: by 2002:a05:6870:2b19:b0:144:7ff9:42e6 with SMTP id
ld25-20020a0568702b1900b001447ff942e6mr5446894oab.118.1670292141015; Mon, 05
Dec 2022 18:02:21 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Mon, 5 Dec 2022 18:02:20 -0800 (PST)
In-Reply-To: <cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.50.14.162; posting-account=AoizIQoAAADa7kQDpB0DAj2jwddxXUgl
NNTP-Posting-Host: 136.50.14.162
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: jim.brak...@ieee.org (JimBrakefield)
Injection-Date: Tue, 06 Dec 2022 02:02:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 8863
 by: JimBrakefield - Tue, 6 Dec 2022 02:02 UTC

On Monday, December 5, 2022 at 7:56:57 PM UTC-6, MitchAlsup wrote:
> On Monday, December 5, 2022 at 7:17:51 PM UTC-6, JimBrakefield wrote:
> > On Monday, December 5, 2022 at 6:37:22 PM UTC-6, MitchAlsup wrote:
> > > On Monday, December 5, 2022 at 5:33:25 PM UTC-6, BGB wrote:
> > > > On 12/4/2022 1:46 PM, MitchAlsup wrote:
> > > > > On Sunday, December 4, 2022 at 4:44:31 AM UTC-6, Anton Ertl wrote:
> > > > >> Marcus <m.de...@this.bitsnbites.eu> writes:
> > > > >>> https://www.bitsnbites.eu/cisc-vs-risc-code-density/
> > > > >>
> > > > >> The -Os results may not be representative of real-world programs, but
> > > > >> may be more informative wrt. instruction set density. If on
> > > > >> architecture A -O2 and -O3 unroll more than on architecture B, this
> > > > >> will look with your method like architecture A has less code density.
> > > > >> -Os should minimize these kinds of effects.
> > > > >>
> > > > >> Concerning "dynamic code density", if the purpose of code density is
> > > > >> to minimize I-cache misses, the way to go would be to measure I-cache
> > > > >> misses (maybe with a cache simulator to get comparable cache sizes and
> > > > >> get rid of prefetching artifacts; and with different I-cache sizes to
> > > > >> see how consistent the difference is). Instruction fetch bandwidth is
> > > > >> another interesting issue, with a few problems: Do you account
> > > > >> instruction fetches from mispredictions, or extra bytes fetched behind
> > > > >> a taken branch?
> > > > > <
> > > > > a) the purpose of greater code density is also to execute fewer instructions.
> > > > > <
> > > > > In the early 1980s, Mark Horowitz stated that <Stanford> MIPS executed
> > > > > 50% more instructions at 6× the frequency for a 4× performance advantage.
> > > > > I, personally, want to chip away at that 50% adder, and adding constants
> > > > > to a rather std RISC instruction set has given a 25% advantage. My 66000
> > > > > only executes 75%-79% as many instructions as RISC-V.
> > > > Similar probably for things like Jumbo encodings in my case, which can
> > > > somewhat cut down on the need for constant loads.
> > > > >>
> > > > >> I wonder if there is really substance to the myth of greater code
> > > > >> density from CISCs, even in the past.
> > > > > <
> > > > > Given that RISC-V compressed has similar code density as several of the
> > > > > CISC chips, it is competing against, apparently there is no longer "such a
> > > > > great distance" between CISC code density and RISC code density.
> > > > > <
> > > > > AND at this point one needs to refocus on how much work is encoded
> > > > > in <how few of> the application instructions.
> > > > Also why I am currently more in support of "limited variable length"
> > > > encodings, say:
> > > > 16/32/64/96, or 16/32/48/64/96
> > > > Rather than fully variable length byte-oriented encodings.
> > > <
> > > I have never been a fan of fully variable length encodings--I saw the disaster
> > > Intel 432 was first hand. PDP-11 (and 68K) were pretty tolerable ISA-wise,
> > > VAX was overboard--although if there was some way to encode PDP-11
> > > ISA such that you got 1 immediate and 1 displacement per instruction it
> > > would have been a better design. On the whole:: IBM 360 is also pretty
> > > tolerable ISA-wise (although I have no idea what they did to ISA in the
> > > transformation to 64-bit Z-series.
> > > <
> > > I support 32-64-96-128-160-------------BUT
> > > <
> > > Everything comes in word (32-bit) containers-------------------AND
> > > <
> > > Everything Decode needs is found in the first word----------------AND
> > > <
> > > The variable length can be determined in 4 gates of delay and 30 total gates.
> > > >
> > > > The limited case provides nearly the same code density, but can be a lot
> > > > easier and more efficient to decode.
> > > >
> > > > Granted, the most optimal encoding scheme within this space is more
> > > > subject to debate.
> > > >
> > > Can we agree that code sizes that are within a handful of %-age points
> > > are "essentially" equal ?
> > > >
> > > > Does not entirely avoid the "how much stuff can I fit into a 32 bit
> > > > encoding?" issue, if the 32-bit encoding space is still the central hub
> > > > that all of the other encodings revolve around.
> > > <
> > > It is not "how much stuff" you can get in, but in how few bits.
> > The FPGA tools and the ASIC tools also offer settings for area versus speed?
> > And the degree (effort) to which the tools optimize in these directions?
> > AFAIK mature language compilers do also, although have not seen effort settings for compilers.
> > It would be great if an ISA supports both blocked (32X) and variable length immediates/constants/displacements
> > The 32X being faster to decode and process, and the 8X offering the best code density.
> <
> 32X means 32-bits ?
> <
> > (the holy grail being a high density ISA the serves both needs)
> <
> I seem to be within spitting distance of this...........
> <
> > Not the whole story, as subroutine inlining and depth of code factoring (e.g. using lots of small subroutines)
> > both have and effect on code density.
> <
> In the not so distant past, the call and return from subroutines had excessive
> "overhead"; making de-inlining unwise except when one is explicitly sacrificing
> performance for density.
> >
> > With potential for two or three variable length items per instruction (instruction length, 1st immediate, 2nd immediate)
> > decode and extraction could get complicated (eg slow)?
> <
> Can you explain why one would need more than 1 immediate and 1 displacement per instruction ??
> <
> It seems to me, when I faced this, that instructions with 2 immediates can ALWAYS
> be done at compile time. And for a long time, my 1-operand instructions did not have
> access to immediates {however a use case showed up and I added constants so that
> <
> CVTSF R7,#3 // R7 = 3.0D0
> <
> could be expressed in one 32-bit instruction.
> >
> > RE the Intel 432: fine to have variable bit length fields, but not at the expense of the vast majority of code. Stretch had provision
> > for variable bit length fields in memory, but also had the word size references for the majority of cases (using both 32-bit and
> > 64-bit instructions).
> > "the instructions are bit-variable in length and are not constrained to start or end on byte or word boundaries"
> > Introduction to the iAPX 432 Architecture 1981 page 3-9 :((
> <
> Very similar to the charge of the light brigade--and just as effective.

|> Can you explain why one would need more than 1 immediate and 1 displacement per instruction ??
If the ISA supports various length instructions (exclusive of the immediate(s))
|> 32X means 32-bits ?
Yes, things are a multiple of 32 bits

Re: Debunking CISC vs RISC code density

<b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29336&group=comp.arch#29336

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:46cd:0:b0:6fb:7c45:bd5 with SMTP id t196-20020a3746cd000000b006fb7c450bd5mr75627255qka.304.1670293990410;
Mon, 05 Dec 2022 18:33:10 -0800 (PST)
X-Received: by 2002:a05:6870:1ec3:b0:144:5ca0:2624 with SMTP id
pc3-20020a0568701ec300b001445ca02624mr7010994oab.218.1670293989887; Mon, 05
Dec 2022 18:33:09 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Mon, 5 Dec 2022 18:33:09 -0800 (PST)
In-Reply-To: <8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:a10e:aa9:d91c:2ee0;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:a10e:aa9:d91c:2ee0
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 06 Dec 2022 02:33:10 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 10146
 by: MitchAlsup - Tue, 6 Dec 2022 02:33 UTC

On Monday, December 5, 2022 at 8:03:12 PM UTC-6, JimBrakefield wrote:
> On Monday, December 5, 2022 at 7:56:57 PM UTC-6, MitchAlsup wrote:
> > On Monday, December 5, 2022 at 7:17:51 PM UTC-6, JimBrakefield wrote:
> > > On Monday, December 5, 2022 at 6:37:22 PM UTC-6, MitchAlsup wrote:
> > > > On Monday, December 5, 2022 at 5:33:25 PM UTC-6, BGB wrote:
> > > > > On 12/4/2022 1:46 PM, MitchAlsup wrote:
> > > > > > On Sunday, December 4, 2022 at 4:44:31 AM UTC-6, Anton Ertl wrote:
> > > > > >> Marcus <m.de...@this.bitsnbites.eu> writes:
> > > > > >>> https://www.bitsnbites.eu/cisc-vs-risc-code-density/
> > > > > >>
> > > > > >> The -Os results may not be representative of real-world programs, but
> > > > > >> may be more informative wrt. instruction set density. If on
> > > > > >> architecture A -O2 and -O3 unroll more than on architecture B, this
> > > > > >> will look with your method like architecture A has less code density.
> > > > > >> -Os should minimize these kinds of effects.
> > > > > >>
> > > > > >> Concerning "dynamic code density", if the purpose of code density is
> > > > > >> to minimize I-cache misses, the way to go would be to measure I-cache
> > > > > >> misses (maybe with a cache simulator to get comparable cache sizes and
> > > > > >> get rid of prefetching artifacts; and with different I-cache sizes to
> > > > > >> see how consistent the difference is). Instruction fetch bandwidth is
> > > > > >> another interesting issue, with a few problems: Do you account
> > > > > >> instruction fetches from mispredictions, or extra bytes fetched behind
> > > > > >> a taken branch?
> > > > > > <
> > > > > > a) the purpose of greater code density is also to execute fewer instructions.
> > > > > > <
> > > > > > In the early 1980s, Mark Horowitz stated that <Stanford> MIPS executed
> > > > > > 50% more instructions at 6× the frequency for a 4× performance advantage.
> > > > > > I, personally, want to chip away at that 50% adder, and adding constants
> > > > > > to a rather std RISC instruction set has given a 25% advantage. My 66000
> > > > > > only executes 75%-79% as many instructions as RISC-V.
> > > > > Similar probably for things like Jumbo encodings in my case, which can
> > > > > somewhat cut down on the need for constant loads.
> > > > > >>
> > > > > >> I wonder if there is really substance to the myth of greater code
> > > > > >> density from CISCs, even in the past.
> > > > > > <
> > > > > > Given that RISC-V compressed has similar code density as several of the
> > > > > > CISC chips, it is competing against, apparently there is no longer "such a
> > > > > > great distance" between CISC code density and RISC code density..
> > > > > > <
> > > > > > AND at this point one needs to refocus on how much work is encoded
> > > > > > in <how few of> the application instructions.
> > > > > Also why I am currently more in support of "limited variable length"
> > > > > encodings, say:
> > > > > 16/32/64/96, or 16/32/48/64/96
> > > > > Rather than fully variable length byte-oriented encodings.
> > > > <
> > > > I have never been a fan of fully variable length encodings--I saw the disaster
> > > > Intel 432 was first hand. PDP-11 (and 68K) were pretty tolerable ISA-wise,
> > > > VAX was overboard--although if there was some way to encode PDP-11
> > > > ISA such that you got 1 immediate and 1 displacement per instruction it
> > > > would have been a better design. On the whole:: IBM 360 is also pretty
> > > > tolerable ISA-wise (although I have no idea what they did to ISA in the
> > > > transformation to 64-bit Z-series.
> > > > <
> > > > I support 32-64-96-128-160-------------BUT
> > > > <
> > > > Everything comes in word (32-bit) containers-------------------AND
> > > > <
> > > > Everything Decode needs is found in the first word----------------AND
> > > > <
> > > > The variable length can be determined in 4 gates of delay and 30 total gates.
> > > > >
> > > > > The limited case provides nearly the same code density, but can be a lot
> > > > > easier and more efficient to decode.
> > > > >
> > > > > Granted, the most optimal encoding scheme within this space is more
> > > > > subject to debate.
> > > > >
> > > > Can we agree that code sizes that are within a handful of %-age points
> > > > are "essentially" equal ?
> > > > >
> > > > > Does not entirely avoid the "how much stuff can I fit into a 32 bit
> > > > > encoding?" issue, if the 32-bit encoding space is still the central hub
> > > > > that all of the other encodings revolve around.
> > > > <
> > > > It is not "how much stuff" you can get in, but in how few bits.
> > > The FPGA tools and the ASIC tools also offer settings for area versus speed?
> > > And the degree (effort) to which the tools optimize in these directions?
> > > AFAIK mature language compilers do also, although have not seen effort settings for compilers.
> > > It would be great if an ISA supports both blocked (32X) and variable length immediates/constants/displacements
> > > The 32X being faster to decode and process, and the 8X offering the best code density.
> > <
> > 32X means 32-bits ?
> > <
> > > (the holy grail being a high density ISA the serves both needs)
> > <
> > I seem to be within spitting distance of this...........
> > <
> > > Not the whole story, as subroutine inlining and depth of code factoring (e.g. using lots of small subroutines)
> > > both have and effect on code density.
> > <
> > In the not so distant past, the call and return from subroutines had excessive
> > "overhead"; making de-inlining unwise except when one is explicitly sacrificing
> > performance for density.
> > >
> > > With potential for two or three variable length items per instruction (instruction length, 1st immediate, 2nd immediate)
> > > decode and extraction could get complicated (eg slow)?
> > <
> > Can you explain why one would need more than 1 immediate and 1 displacement per instruction ??
> > <
> > It seems to me, when I faced this, that instructions with 2 immediates can ALWAYS
> > be done at compile time. And for a long time, my 1-operand instructions did not have
> > access to immediates {however a use case showed up and I added constants so that
> > <
> > CVTSF R7,#3 // R7 = 3.0D0
> > <
> > could be expressed in one 32-bit instruction.
> > >
> > > RE the Intel 432: fine to have variable bit length fields, but not at the expense of the vast majority of code. Stretch had provision
> > > for variable bit length fields in memory, but also had the word size references for the majority of cases (using both 32-bit and
> > > 64-bit instructions).
> > > "the instructions are bit-variable in length and are not constrained to start or end on byte or word boundaries"
> > > Introduction to the iAPX 432 Architecture 1981 page 3-9 :((
> > <
> > Very similar to the charge of the light brigade--and just as effective.
>
> |> Can you explain why one would need more than 1 immediate and 1 displacement per instruction ??
> If the ISA supports various length instructions (exclusive of the immediate(s))
<
That is not an explanation. What I want is justification for "having the ability" to
encode more than 1 immediate (constant to a calculation) and/or more than 1
displacement (constant used in address generation) in a single instruction. Sure
lots of the PDP-11 and VAX variants allowed for this--but why would a compiler
ever defer to execution time that which can be performed at compile time ??
<
To a certain extent this gets right at the heart of the RISC-CISC debate. The CISC
guys might say--it comes for free why not allow it ? The RISC guys would retort--
This just shows that your encoding scheme has excess entropy. Furthermore;
providing no more than 1 immediate and 1 displacement PREVENTS doing stupid
stuff to the ISA encoding (something VAX missed by a mile.)
<
> |> 32X means 32-bits ?
> Yes, things are a multiple of 32 bits
<


Click here to read the complete article
Re: Debunking CISC vs RISC code density

<8b2b14f6-50e0-4b06-bac2-a87e704c1322n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29337&group=comp.arch#29337

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:88c7:0:b0:6ec:537f:3d94 with SMTP id k190-20020a3788c7000000b006ec537f3d94mr58729959qkd.376.1670295913046;
Mon, 05 Dec 2022 19:05:13 -0800 (PST)
X-Received: by 2002:a54:470c:0:b0:359:a4fd:a479 with SMTP id
k12-20020a54470c000000b00359a4fda479mr41633877oik.118.1670295912652; Mon, 05
Dec 2022 19:05:12 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Mon, 5 Dec 2022 19:05:12 -0800 (PST)
In-Reply-To: <b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.50.14.162; posting-account=AoizIQoAAADa7kQDpB0DAj2jwddxXUgl
NNTP-Posting-Host: 136.50.14.162
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com>
<b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8b2b14f6-50e0-4b06-bac2-a87e704c1322n@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: jim.brak...@ieee.org (JimBrakefield)
Injection-Date: Tue, 06 Dec 2022 03:05:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 11517
 by: JimBrakefield - Tue, 6 Dec 2022 03:05 UTC

On Monday, December 5, 2022 at 8:33:12 PM UTC-6, MitchAlsup wrote:
> On Monday, December 5, 2022 at 8:03:12 PM UTC-6, JimBrakefield wrote:
> > On Monday, December 5, 2022 at 7:56:57 PM UTC-6, MitchAlsup wrote:
> > > On Monday, December 5, 2022 at 7:17:51 PM UTC-6, JimBrakefield wrote:
> > > > On Monday, December 5, 2022 at 6:37:22 PM UTC-6, MitchAlsup wrote:
> > > > > On Monday, December 5, 2022 at 5:33:25 PM UTC-6, BGB wrote:
> > > > > > On 12/4/2022 1:46 PM, MitchAlsup wrote:
> > > > > > > On Sunday, December 4, 2022 at 4:44:31 AM UTC-6, Anton Ertl wrote:
> > > > > > >> Marcus <m.de...@this.bitsnbites.eu> writes:
> > > > > > >>> https://www.bitsnbites.eu/cisc-vs-risc-code-density/
> > > > > > >>
> > > > > > >> The -Os results may not be representative of real-world programs, but
> > > > > > >> may be more informative wrt. instruction set density. If on
> > > > > > >> architecture A -O2 and -O3 unroll more than on architecture B, this
> > > > > > >> will look with your method like architecture A has less code density.
> > > > > > >> -Os should minimize these kinds of effects.
> > > > > > >>
> > > > > > >> Concerning "dynamic code density", if the purpose of code density is
> > > > > > >> to minimize I-cache misses, the way to go would be to measure I-cache
> > > > > > >> misses (maybe with a cache simulator to get comparable cache sizes and
> > > > > > >> get rid of prefetching artifacts; and with different I-cache sizes to
> > > > > > >> see how consistent the difference is). Instruction fetch bandwidth is
> > > > > > >> another interesting issue, with a few problems: Do you account
> > > > > > >> instruction fetches from mispredictions, or extra bytes fetched behind
> > > > > > >> a taken branch?
> > > > > > > <
> > > > > > > a) the purpose of greater code density is also to execute fewer instructions.
> > > > > > > <
> > > > > > > In the early 1980s, Mark Horowitz stated that <Stanford> MIPS executed
> > > > > > > 50% more instructions at 6× the frequency for a 4× performance advantage.
> > > > > > > I, personally, want to chip away at that 50% adder, and adding constants
> > > > > > > to a rather std RISC instruction set has given a 25% advantage. My 66000
> > > > > > > only executes 75%-79% as many instructions as RISC-V.
> > > > > > Similar probably for things like Jumbo encodings in my case, which can
> > > > > > somewhat cut down on the need for constant loads.
> > > > > > >>
> > > > > > >> I wonder if there is really substance to the myth of greater code
> > > > > > >> density from CISCs, even in the past.
> > > > > > > <
> > > > > > > Given that RISC-V compressed has similar code density as several of the
> > > > > > > CISC chips, it is competing against, apparently there is no longer "such a
> > > > > > > great distance" between CISC code density and RISC code density.
> > > > > > > <
> > > > > > > AND at this point one needs to refocus on how much work is encoded
> > > > > > > in <how few of> the application instructions.
> > > > > > Also why I am currently more in support of "limited variable length"
> > > > > > encodings, say:
> > > > > > 16/32/64/96, or 16/32/48/64/96
> > > > > > Rather than fully variable length byte-oriented encodings.
> > > > > <
> > > > > I have never been a fan of fully variable length encodings--I saw the disaster
> > > > > Intel 432 was first hand. PDP-11 (and 68K) were pretty tolerable ISA-wise,
> > > > > VAX was overboard--although if there was some way to encode PDP-11
> > > > > ISA such that you got 1 immediate and 1 displacement per instruction it
> > > > > would have been a better design. On the whole:: IBM 360 is also pretty
> > > > > tolerable ISA-wise (although I have no idea what they did to ISA in the
> > > > > transformation to 64-bit Z-series.
> > > > > <
> > > > > I support 32-64-96-128-160-------------BUT
> > > > > <
> > > > > Everything comes in word (32-bit) containers-------------------AND
> > > > > <
> > > > > Everything Decode needs is found in the first word----------------AND
> > > > > <
> > > > > The variable length can be determined in 4 gates of delay and 30 total gates.
> > > > > >
> > > > > > The limited case provides nearly the same code density, but can be a lot
> > > > > > easier and more efficient to decode.
> > > > > >
> > > > > > Granted, the most optimal encoding scheme within this space is more
> > > > > > subject to debate.
> > > > > >
> > > > > Can we agree that code sizes that are within a handful of %-age points
> > > > > are "essentially" equal ?
> > > > > >
> > > > > > Does not entirely avoid the "how much stuff can I fit into a 32 bit
> > > > > > encoding?" issue, if the 32-bit encoding space is still the central hub
> > > > > > that all of the other encodings revolve around.
> > > > > <
> > > > > It is not "how much stuff" you can get in, but in how few bits.
> > > > The FPGA tools and the ASIC tools also offer settings for area versus speed?
> > > > And the degree (effort) to which the tools optimize in these directions?
> > > > AFAIK mature language compilers do also, although have not seen effort settings for compilers.
> > > > It would be great if an ISA supports both blocked (32X) and variable length immediates/constants/displacements
> > > > The 32X being faster to decode and process, and the 8X offering the best code density.
> > > <
> > > 32X means 32-bits ?
> > > <
> > > > (the holy grail being a high density ISA the serves both needs)
> > > <
> > > I seem to be within spitting distance of this...........
> > > <
> > > > Not the whole story, as subroutine inlining and depth of code factoring (e.g. using lots of small subroutines)
> > > > both have and effect on code density.
> > > <
> > > In the not so distant past, the call and return from subroutines had excessive
> > > "overhead"; making de-inlining unwise except when one is explicitly sacrificing
> > > performance for density.
> > > >
> > > > With potential for two or three variable length items per instruction (instruction length, 1st immediate, 2nd immediate)
> > > > decode and extraction could get complicated (eg slow)?
> > > <
> > > Can you explain why one would need more than 1 immediate and 1 displacement per instruction ??
> > > <
> > > It seems to me, when I faced this, that instructions with 2 immediates can ALWAYS
> > > be done at compile time. And for a long time, my 1-operand instructions did not have
> > > access to immediates {however a use case showed up and I added constants so that
> > > <
> > > CVTSF R7,#3 // R7 = 3.0D0
> > > <
> > > could be expressed in one 32-bit instruction.
> > > >
> > > > RE the Intel 432: fine to have variable bit length fields, but not at the expense of the vast majority of code. Stretch had provision
> > > > for variable bit length fields in memory, but also had the word size references for the majority of cases (using both 32-bit and
> > > > 64-bit instructions).
> > > > "the instructions are bit-variable in length and are not constrained to start or end on byte or word boundaries"
> > > > Introduction to the iAPX 432 Architecture 1981 page 3-9 :((
> > > <
> > > Very similar to the charge of the light brigade--and just as effective.
> >
> > |> Can you explain why one would need more than 1 immediate and 1 displacement per instruction ??
> > If the ISA supports various length instructions (exclusive of the immediate(s))
> <
> That is not an explanation. What I want is justification for "having the ability" to
> encode more than 1 immediate (constant to a calculation) and/or more than 1
> displacement (constant used in address generation) in a single instruction. Sure
> lots of the PDP-11 and VAX variants allowed for this--but why would a compiler
> ever defer to execution time that which can be performed at compile time ??
> <
Having a variable length instruction plus variable length immediate and variable length offset
That said, don't think is is a good idea: too many shifters and field extractors necessarily serially connected.
Would suggest at most two instruction sizes and one variable length "immediate/offset"
In my "planning" several things force a two step/two clock instruction decode. With three variations, a three step decode.
If the alignments are good, then an opportunistic one step decode.
> <
> To a certain extent this gets right at the heart of the RISC-CISC debate. The CISC
> guys might say--it comes for free why not allow it ? The RISC guys would retort--
> This just shows that your encoding scheme has excess entropy. Furthermore;
> providing no more than 1 immediate and 1 displacement PREVENTS doing stupid
> stuff to the ISA encoding (something VAX missed by a mile.)
> <
Given today's transistor budgets it would not be a surprise if there are circuits here and there that look for
opportunities to shortcut instruction execution (like OR Dn,Rn,Sn being a NOP)?
As for entropy, have seen examples that for a given program its encoded entropy is far less than the capability of the ISA.
E.g. the compiler does not fully exploit the ISA or that the ISA is incapable of densely encoding the program.


Click here to read the complete article
Re: Debunking CISC vs RISC code density

<d9d51ec7-6dbc-40c1-a277-c8b73afa683an@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29338&group=comp.arch#29338

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:bf0d:0:b0:4b1:827d:f33b with SMTP id m13-20020a0cbf0d000000b004b1827df33bmr61368952qvi.7.1670301523904;
Mon, 05 Dec 2022 20:38:43 -0800 (PST)
X-Received: by 2002:a05:6870:8882:b0:132:6f79:9ffb with SMTP id
m2-20020a056870888200b001326f799ffbmr39463787oam.61.1670301523525; Mon, 05
Dec 2022 20:38:43 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Mon, 5 Dec 2022 20:38:43 -0800 (PST)
In-Reply-To: <8b2b14f6-50e0-4b06-bac2-a87e704c1322n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:a10e:aa9:d91c:2ee0;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:a10e:aa9:d91c:2ee0
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com>
<b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com> <8b2b14f6-50e0-4b06-bac2-a87e704c1322n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d9d51ec7-6dbc-40c1-a277-c8b73afa683an@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 06 Dec 2022 04:38:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 6337
 by: MitchAlsup - Tue, 6 Dec 2022 04:38 UTC

On Monday, December 5, 2022 at 9:05:14 PM UTC-6, JimBrakefield wrote:
> On Monday, December 5, 2022 at 8:33:12 PM UTC-6, MitchAlsup wrote:
> > On Monday, December 5, 2022 at 8:03:12 PM UTC-6, JimBrakefield wrote:

> > > |> Can you explain why one would need more than 1 immediate and 1 displacement per instruction ??
> > > If the ISA supports various length instructions (exclusive of the immediate(s))
> > <
> > That is not an explanation. What I want is justification for "having the ability" to
> > encode more than 1 immediate (constant to a calculation) and/or more than 1
> > displacement (constant used in address generation) in a single instruction. Sure
> > lots of the PDP-11 and VAX variants allowed for this--but why would a compiler
> > ever defer to execution time that which can be performed at compile time ??
> > <
> Having a variable length instruction plus variable length immediate and variable length offset
<
This is not a sentence or a question.
<
> That said, don't think is is a good idea: too many shifters and field extractors necessarily serially connected.
<
All of the things you want to extract are in the 1st word of the variable length instruction.
I named this first word the "instruction-specifier" (note: with hyphen). So, we are beyond that.
<
> Would suggest at most two instruction sizes and one variable length "immediate/offset"
<
I suggest that there is exactly 1 size instruction-specifier with essentially fixed field
positions. The variable length is entirely present to deliver constants into execution.
<
> In my "planning" several things force a two step/two clock instruction decode. With three variations, a three step decode.
<
When one considers that an SRAM (the things caches are composed from) need their
address to meet setup time to a Flip-Flop at the SRAM macro, and you can't even see
the data until after a flip-flop that captures the SRAM output data, you can't even start
tag comparison until the cycle following the Cache read. This, all by itself, essentially
mandates a 2 cycle decode:: you don't know which way contains the data until 6-gates
into the cycle, and by the time you have buffered up the control signal and driven the
select lines to out gate data the hitting data, you are well past ½ cycle into the first
DECODE cycle (which I call PARSE).
<
In effect, the 5 stage RISC-V pipeline is accessing the SRAM macros on both phases of
the clock. You can do this when you spend lots of effort in the "clock tree" or are willing
to run at 65% of the technologies maximal frequency.
<
> If the alignments are good, then an opportunistic one step decode.
> > <
> > To a certain extent this gets right at the heart of the RISC-CISC debate. The CISC
> > guys might say--it comes for free why not allow it ? The RISC guys would retort--
> > This just shows that your encoding scheme has excess entropy. Furthermore;
> > providing no more than 1 immediate and 1 displacement PREVENTS doing stupid
> > stuff to the ISA encoding (something VAX missed by a mile.)
> > <
> Given today's transistor budgets it would not be a surprise if there are circuits here and there that look for
> opportunities to shortcut instruction execution (like OR Dn,Rn,Sn being a NOP)?
<
Why would you want a NoOp in your ISA ???
A NoOp does nothing,
Instructions are supposed to be a series of state changes to the register+memory
......image of the application,
A NoOp does not change any state,
Why should it even exist ??
{We are not filling in delay slots any more)
A properly designed ISA does not need to have the ability to say "do nothing".
Or perhaps you could give an example as to why one would both want to emit
(from the compiler) and to perform (in the HW) a NoOp instruction.
<
But prehaps you meant something more like a::
<
JMP R~0 // is likely an indirect jump
while
JMP R0 // is likely a return
<
> As for entropy, have seen examples that for a given program its encoded entropy is far less than the capability of the ISA.
<
That is not what we are talking about here. We ae talking about why you should (or not) have the ability
to specify more than 1 immediate and more than 1 displacement.
<
> E.g. the compiler does not fully exploit the ISA or that the ISA is incapable of densely encoding the program.
<
Then fix the compiler,
don't
t fix the ISA to make up for a bad compiler.

Re: Debunking CISC vs RISC code density

<tmmnjo$fk6h$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29340&group=comp.arch#29340

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd4-d1b7-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Debunking CISC vs RISC code density
Date: Tue, 6 Dec 2022 06:31:20 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tmmnjo$fk6h$1@newsreader4.netcologne.de>
References: <tmhjrh$3jl6t$1@dont-email.me>
<2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com>
<tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com>
<40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com>
Injection-Date: Tue, 6 Dec 2022 06:31:20 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd4-d1b7-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd4:d1b7:0:7285:c2ff:fe6c:992d";
logging-data="512209"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Tue, 6 Dec 2022 06:31 UTC

MitchAlsup <MitchAlsup@aol.com> schrieb:

> Can you explain why one would need more than 1 immediate and 1
> displacement per instruction ??

Not displacement, but... for instructions with three operands, it
could be useful. For example,

double foo(double x)
{ return x*1.2 - 0.7;
}

is currently

mov r2,#0x3FF3333333333333
fmac r1,r1,r2,#0xBFE6666666666666
ret

Re: Debunking CISC vs RISC code density

<175aafff-2b83-4b7e-9132-07972077e7cen@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29341&group=comp.arch#29341

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:bd01:0:b0:6ec:53ab:90ee with SMTP id n1-20020a37bd01000000b006ec53ab90eemr78813073qkf.415.1670324482739;
Tue, 06 Dec 2022 03:01:22 -0800 (PST)
X-Received: by 2002:a4a:4005:0:b0:49f:4579:ccc8 with SMTP id
n5-20020a4a4005000000b0049f4579ccc8mr27174011ooa.70.1670324482436; Tue, 06
Dec 2022 03:01:22 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 6 Dec 2022 03:01:22 -0800 (PST)
In-Reply-To: <tmmnjo$fk6h$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1dde:6a00:4519:86fd:9e84:ca55;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1dde:6a00:4519:86fd:9e84:ca55
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <tmmnjo$fk6h$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <175aafff-2b83-4b7e-9132-07972077e7cen@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Tue, 06 Dec 2022 11:01:22 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1962
 by: robf...@gmail.com - Tue, 6 Dec 2022 11:01 UTC

On Tuesday, December 6, 2022 at 1:31:24 AM UTC-5, Thomas Koenig wrote:
> MitchAlsup <Mitch...@aol.com> schrieb:

>A NoOp does not change any state,
>Why should it even exist ??

I always include a NOP instruction in the ISA. It can be used to provide inline
arguments assuming the NOP has a payload area. It can be used as a debug
marker, annotating the code. It could be used to leave an area of code empty
so that it can be replaced by other code at runtime.

Re: Debunking CISC vs RISC code density

<tmn8cl$fl2q$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29342&group=comp.arch#29342

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a544-df2-0-cde5-c620-cc08-dc23.ipv6dyn.netcologne.de!not-for-mail
From: bl1-remo...@gmx.com (Bernd Linsel)
Newsgroups: comp.arch
Subject: Re: Debunking CISC vs RISC code density
Date: Tue, 6 Dec 2022 12:17:39 +0100
Organization: news.netcologne.de
Distribution: world
Message-ID: <tmn8cl$fl2q$1@newsreader4.netcologne.de>
References: <tmhjrh$3jl6t$1@dont-email.me>
<2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com>
<tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com>
<40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com>
<tmmnjo$fk6h$1@newsreader4.netcologne.de>
<175aafff-2b83-4b7e-9132-07972077e7cen@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 6 Dec 2022 11:17:41 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a544-df2-0-cde5-c620-cc08-dc23.ipv6dyn.netcologne.de:2a0a:a544:df2:0:cde5:c620:cc08:dc23";
logging-data="513114"; mail-complaints-to="abuse@netcologne.de"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.1
In-Reply-To: <175aafff-2b83-4b7e-9132-07972077e7cen@googlegroups.com>
 by: Bernd Linsel - Tue, 6 Dec 2022 11:17 UTC

On 06.12.2022 12:01, robf...@gmail.com wrote:
> On Tuesday, December 6, 2022 at 1:31:24 AM UTC-5, Thomas Koenig wrote:
>> MitchAlsup <Mitch...@aol.com> schrieb:
>
>> A NoOp does not change any state,
>> Why should it even exist ??
>
> I always include a NOP instruction in the ISA. It can be used to provide inline
> arguments assuming the NOP has a payload area. It can be used as a debug
> marker, annotating the code. It could be used to leave an area of code empty
> so that it can be replaced by other code at runtime.

Any orthogonal instruction set provides lots of NOP equivalents, e.g.

ori Rx, Rx, #0
or Rx, Rx, Rx
and Rx, Rx, Rx
addi Rx, Rx, #0
rotr Rx, Rx, #0 / rotr Rx, Rx, #64

Re: Debunking CISC vs RISC code density

<81382458-565e-4a22-8487-8b3f8f741f9bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29343&group=comp.arch#29343

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:4d0e:0:b0:39d:11a9:760d with SMTP id w14-20020ac84d0e000000b0039d11a9760dmr77836019qtv.139.1670327576189;
Tue, 06 Dec 2022 03:52:56 -0800 (PST)
X-Received: by 2002:a05:6870:9f0c:b0:13c:97e9:5d40 with SMTP id
xl12-20020a0568709f0c00b0013c97e95d40mr38641338oab.42.1670327575806; Tue, 06
Dec 2022 03:52:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 6 Dec 2022 03:52:55 -0800 (PST)
In-Reply-To: <tmn8cl$fl2q$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1dde:6a00:4519:86fd:9e84:ca55;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1dde:6a00:4519:86fd:9e84:ca55
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <tmmnjo$fk6h$1@newsreader4.netcologne.de>
<175aafff-2b83-4b7e-9132-07972077e7cen@googlegroups.com> <tmn8cl$fl2q$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <81382458-565e-4a22-8487-8b3f8f741f9bn@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Tue, 06 Dec 2022 11:52:56 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2912
 by: robf...@gmail.com - Tue, 6 Dec 2022 11:52 UTC

On Tuesday, December 6, 2022 at 6:17:44 AM UTC-5, Bernd Linsel wrote:
> On 06.12.2022 12:01, robf...@gmail.com wrote:
> > On Tuesday, December 6, 2022 at 1:31:24 AM UTC-5, Thomas Koenig wrote:
> >> MitchAlsup <Mitch...@aol.com> schrieb:
> >
> >> A NoOp does not change any state,
> >> Why should it even exist ??
> >
> > I always include a NOP instruction in the ISA. It can be used to provide inline
> > arguments assuming the NOP has a payload area. It can be used as a debug
> > marker, annotating the code. It could be used to leave an area of code empty
> > so that it can be replaced by other code at runtime.
> Any orthogonal instruction set provides lots of NOP equivalents, e.g.
>
> ori Rx, Rx, #0
> or Rx, Rx, Rx
> and Rx, Rx, Rx
> addi Rx, Rx, #0
> rotr Rx, Rx, #0 / rotr Rx, Rx, #64

I suppose it could be done with NOP equivalent instructions, but it is more
restrictive. Multi-word NOPs can allow multiple entry points. A 32-bit NOP instruction
with a six-bit opcode and a 26-bit payload gives 2^26 possible NOPs. A lot of NOPs
might be wanted to perform program tracing. NOPs with arbitrary payloads allow
embedding a program within a program. A 26-bit instruction set could be designed to
fit into NOPs. Could be used to verify the integrity of a program.

Re: Debunking CISC vs RISC code density

<e5IjL.9$rKDc.7@fx34.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29345&group=comp.arch#29345

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx34.iad.POSTED!not-for-mail
From: ThatWoul...@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Debunking CISC vs RISC code density
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at> <d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me> <e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com> <cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com> <b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com> <8b2b14f6-50e0-4b06-bac2-a87e704c1322n@googlegroups.com> <d9d51ec7-6dbc-40c1-a277-c8b73afa683an@googlegroups.com>
In-Reply-To: <d9d51ec7-6dbc-40c1-a277-c8b73afa683an@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 17
Message-ID: <e5IjL.9$rKDc.7@fx34.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Tue, 06 Dec 2022 14:12:26 UTC
Date: Tue, 06 Dec 2022 09:12:19 -0500
X-Received-Bytes: 1701
 by: EricP - Tue, 6 Dec 2022 14:12 UTC

MitchAlsup wrote:
> <
> Why would you want a NoOp in your ISA ???
> A NoOp does nothing,

Code alignment padding.
It was a common optimization to align routine entry and
loop entries to cache boundaries.

For self modifying code, I can see having an instruction 'hole' that one
wants to generate a single instruction into, but there are different
generated instructions so it may need to pad out to the 'hole' size.

Some ISA's have multiple sized Nop's so they can pad
with the minimum number of wasted decode cycles.

Re: Debunking CISC vs RISC code density

<tmohh8$bb5t$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29352&group=comp.arch#29352

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Debunking CISC vs RISC code density
Date: Tue, 6 Dec 2022 16:59:48 -0600
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <tmohh8$bb5t$2@dont-email.me>
References: <tmhjrh$3jl6t$1@dont-email.me>
<2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com>
<tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com>
<40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com>
<8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com>
<b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com>
<8b2b14f6-50e0-4b06-bac2-a87e704c1322n@googlegroups.com>
<d9d51ec7-6dbc-40c1-a277-c8b73afa683an@googlegroups.com>
<e5IjL.9$rKDc.7@fx34.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 6 Dec 2022 22:59:53 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="8dade071050c277af8e53b6631eb07c3";
logging-data="371901"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/w8hQcGgZjAgwtKiWMYqnu"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.1
Cancel-Lock: sha1:U9a7osqiw3+UxygYHcSPUkfLDaQ=
In-Reply-To: <e5IjL.9$rKDc.7@fx34.iad>
Content-Language: en-US
 by: BGB - Tue, 6 Dec 2022 22:59 UTC

On 12/6/2022 8:12 AM, EricP wrote:
> MitchAlsup wrote:
>> <
>> Why would you want a NoOp in your ISA ???
>> A NoOp does nothing,
>
> Code alignment padding.
> It was a common optimization to align routine entry and
> loop entries to cache boundaries.
>
> For self modifying code, I can see having an instruction 'hole' that one
> wants to generate a single instruction into, but there are different
> generated instructions so it may need to pad out to the 'hole' size.
>
> Some ISA's have multiple sized Nop's so they can pad
> with the minimum number of wasted decode cycles.
>

Yeah, a NOP is pretty standard feature:
Allows for aligning stuff;
Allows for spots for the linker or loader to patch up certain
instruction sequences if needed, ...

More debatable though is whether to have a dedicated NOP instruction, or
merely define some other special case (such as "OR R0, R0, R0" as the NOP).

....

Re: Debunking CISC vs RISC code density

<09243819-a8a2-44b0-a6fd-0fd061b06bccn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29354&group=comp.arch#29354

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:ee91:0:b0:4b4:a0b0:2dd8 with SMTP id u17-20020a0cee91000000b004b4a0b02dd8mr65259640qvr.19.1670368367022;
Tue, 06 Dec 2022 15:12:47 -0800 (PST)
X-Received: by 2002:a05:6870:816:b0:143:af88:3b6c with SMTP id
fw22-20020a056870081600b00143af883b6cmr25584096oab.79.1670368366786; Tue, 06
Dec 2022 15:12:46 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 6 Dec 2022 15:12:46 -0800 (PST)
In-Reply-To: <tmohh8$bb5t$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:6c0f:44d2:11a5:c9b;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:6c0f:44d2:11a5:c9b
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com>
<b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com> <8b2b14f6-50e0-4b06-bac2-a87e704c1322n@googlegroups.com>
<d9d51ec7-6dbc-40c1-a277-c8b73afa683an@googlegroups.com> <e5IjL.9$rKDc.7@fx34.iad>
<tmohh8$bb5t$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <09243819-a8a2-44b0-a6fd-0fd061b06bccn@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 06 Dec 2022 23:12:47 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3662
 by: MitchAlsup - Tue, 6 Dec 2022 23:12 UTC

On Tuesday, December 6, 2022 at 4:59:56 PM UTC-6, BGB wrote:
> On 12/6/2022 8:12 AM, EricP wrote:
> > MitchAlsup wrote:
> >> <
> >> Why would you want a NoOp in your ISA ???
> >> A NoOp does nothing,
> >
> > Code alignment padding.
> > It was a common optimization to align routine entry and
> > loop entries to cache boundaries.
> >
> > For self modifying code, I can see having an instruction 'hole' that one
> > wants to generate a single instruction into, but there are different
> > generated instructions so it may need to pad out to the 'hole' size.
> >
> > Some ISA's have multiple sized Nop's so they can pad
> > with the minimum number of wasted decode cycles.
<
A sign that something is wrong with that ISA.
> >
> Yeah, a NOP is pretty standard feature:
<
In the past, certainly, in the future ???
<
> Allows for aligning stuff;
<
With 32-bit extensions, there is no code misalignment in My 66000,
and if you try to misalign IP you take an exception.
<
> Allows for spots for the linker or loader to patch up certain
> instruction sequences if needed, ...
<
These places come out of the ASM in 64-bit constant form, and the linker
can shrink them if the constant fits in a smaller footprint.
>
>
> More debatable though is whether to have a dedicated NOP instruction, or
> merely define some other special case (such as "OR R0, R0, R0" as the NOP).
>
Every ISA has some way to "doing no work" while executing instructions;
one time I was forced to wait for an external signal in x8085 ASM and I found
back-to-back XTHLs optimal for wasting time. 1-byte instruction takes 12
cycles to execute. Probably not what the architect had expected for the
use of that instruction.
<
But the question is whether there should be an explicit OpCode for NoOp
(or more than one) is a lot different that whether it is possible to do noting
by executing an instruction.
> ...

Re: Debunking CISC vs RISC code density

<tmojt2$bhif$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29355&group=comp.arch#29355

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Debunking CISC vs RISC code density
Date: Tue, 6 Dec 2022 17:40:15 -0600
Organization: A noiseless patient Spider
Lines: 209
Message-ID: <tmojt2$bhif$1@dont-email.me>
References: <tmhjrh$3jl6t$1@dont-email.me>
<2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com>
<tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com>
<40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 6 Dec 2022 23:40:19 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="04276fcd79c75ec14666113b19eeede0";
logging-data="378447"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lROVbcTKEpU9r1DUbOuAF"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.1
Cancel-Lock: sha1:oJqT2BGdy8DcQCCiHxAIunmLik0=
In-Reply-To: <cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com>
Content-Language: en-US
 by: BGB - Tue, 6 Dec 2022 23:40 UTC

On 12/5/2022 7:56 PM, MitchAlsup wrote:
> On Monday, December 5, 2022 at 7:17:51 PM UTC-6, JimBrakefield wrote:
>> On Monday, December 5, 2022 at 6:37:22 PM UTC-6, MitchAlsup wrote:
>>> On Monday, December 5, 2022 at 5:33:25 PM UTC-6, BGB wrote:
>>>> On 12/4/2022 1:46 PM, MitchAlsup wrote:
>>>>> On Sunday, December 4, 2022 at 4:44:31 AM UTC-6, Anton Ertl wrote:
>>>>>> Marcus <m.de...@this.bitsnbites.eu> writes:
>>>>>>> https://www.bitsnbites.eu/cisc-vs-risc-code-density/
>>>>>>
>>>>>> The -Os results may not be representative of real-world programs, but
>>>>>> may be more informative wrt. instruction set density. If on
>>>>>> architecture A -O2 and -O3 unroll more than on architecture B, this
>>>>>> will look with your method like architecture A has less code density.
>>>>>> -Os should minimize these kinds of effects.
>>>>>>
>>>>>> Concerning "dynamic code density", if the purpose of code density is
>>>>>> to minimize I-cache misses, the way to go would be to measure I-cache
>>>>>> misses (maybe with a cache simulator to get comparable cache sizes and
>>>>>> get rid of prefetching artifacts; and with different I-cache sizes to
>>>>>> see how consistent the difference is). Instruction fetch bandwidth is
>>>>>> another interesting issue, with a few problems: Do you account
>>>>>> instruction fetches from mispredictions, or extra bytes fetched behind
>>>>>> a taken branch?
>>>>> <
>>>>> a) the purpose of greater code density is also to execute fewer instructions.
>>>>> <
>>>>> In the early 1980s, Mark Horowitz stated that <Stanford> MIPS executed
>>>>> 50% more instructions at 6× the frequency for a 4× performance advantage.
>>>>> I, personally, want to chip away at that 50% adder, and adding constants
>>>>> to a rather std RISC instruction set has given a 25% advantage. My 66000
>>>>> only executes 75%-79% as many instructions as RISC-V.
>>>> Similar probably for things like Jumbo encodings in my case, which can
>>>> somewhat cut down on the need for constant loads.
>>>>>>
>>>>>> I wonder if there is really substance to the myth of greater code
>>>>>> density from CISCs, even in the past.
>>>>> <
>>>>> Given that RISC-V compressed has similar code density as several of the
>>>>> CISC chips, it is competing against, apparently there is no longer "such a
>>>>> great distance" between CISC code density and RISC code density.
>>>>> <
>>>>> AND at this point one needs to refocus on how much work is encoded
>>>>> in <how few of> the application instructions.
>>>> Also why I am currently more in support of "limited variable length"
>>>> encodings, say:
>>>> 16/32/64/96, or 16/32/48/64/96
>>>> Rather than fully variable length byte-oriented encodings.
>>> <
>>> I have never been a fan of fully variable length encodings--I saw the disaster
>>> Intel 432 was first hand. PDP-11 (and 68K) were pretty tolerable ISA-wise,
>>> VAX was overboard--although if there was some way to encode PDP-11
>>> ISA such that you got 1 immediate and 1 displacement per instruction it
>>> would have been a better design. On the whole:: IBM 360 is also pretty
>>> tolerable ISA-wise (although I have no idea what they did to ISA in the
>>> transformation to 64-bit Z-series.
>>> <
>>> I support 32-64-96-128-160-------------BUT
>>> <
>>> Everything comes in word (32-bit) containers-------------------AND
>>> <
>>> Everything Decode needs is found in the first word----------------AND
>>> <
>>> The variable length can be determined in 4 gates of delay and 30 total gates.
>>>>
>>>> The limited case provides nearly the same code density, but can be a lot
>>>> easier and more efficient to decode.
>>>>
>>>> Granted, the most optimal encoding scheme within this space is more
>>>> subject to debate.
>>>>
>>> Can we agree that code sizes that are within a handful of %-age points
>>> are "essentially" equal ?
>>>>
>>>> Does not entirely avoid the "how much stuff can I fit into a 32 bit
>>>> encoding?" issue, if the 32-bit encoding space is still the central hub
>>>> that all of the other encodings revolve around.
>>> <
>>> It is not "how much stuff" you can get in, but in how few bits.
>> The FPGA tools and the ASIC tools also offer settings for area versus speed?
>> And the degree (effort) to which the tools optimize in these directions?
>> AFAIK mature language compilers do also, although have not seen effort settings for compilers.
>> It would be great if an ISA supports both blocked (32X) and variable length immediates/constants/displacements
>> The 32X being faster to decode and process, and the 8X offering the best code density.
> <
> 32X means 32-bits ?
> <
>> (the holy grail being a high density ISA the serves both needs)
> <
> I seem to be within spitting distance of this...........

Likewise.

Even without LZ4 compressing the binaries, I still seem to be getting
somewhat better code density than x86-64.

Still not quite as good as Thumb2 though.

LZ4 compressed binaries are smaller than Thumb2 binaries, but LZ4
compression also works well on Thumb2...

In my own testing, Thumb2 tended to be the front-runner in terms of code
density (seems to beat out i386, RVC, and SH-4; then typically followed
by x86-64 and ARMv8).

As noted, I have both speed and size optimization settings, since
slightly different tradeoffs need to be made.

Originally, BJX2 started out with 16-bit origins, but a few iterations
later had switched to 32-bit as the primary ISA with 16-bit encodings
serving more as a space-saving subset.

Also 32-bit ended getting a lot more emphasis, because a "shuffle and
bundle" strategy works a lit better with fixed-length 32-bit
instructions, but starts to fall on its face when freely variable length
encodings are used (this would add significant implementation complexity
to this part of the compiler).

> <
>> Not the whole story, as subroutine inlining and depth of code factoring (e.g. using lots of small subroutines)
>> both have and effect on code density.
> <
> In the not so distant past, the call and return from subroutines had excessive
> "overhead"; making de-inlining unwise except when one is explicitly sacrificing
> performance for density.

I still don't have inline functions, FWIW.

>>
>> With potential for two or three variable length items per instruction (instruction length, 1st immediate, 2nd immediate)
>> decode and extraction could get complicated (eg slow)?
> <
> Can you explain why one would need more than 1 immediate and 1 displacement per instruction ??
> <
> It seems to me, when I faced this, that instructions with 2 immediates can ALWAYS
> be done at compile time. And for a long time, my 1-operand instructions did not have
> access to immediates {however a use case showed up and I added constants so that
> <
> CVTSF R7,#3 // R7 = 3.0D0
> <
> could be expressed in one 32-bit instruction.

I seem to be getting along pretty OK with only a single immediate (with
displacements also being considered a type of immediate).

Instructions with both an immediate and displacement, or with two
immediate values, etc. Thus far haven't really seemed like a worthwhile
tradeoff.

>>
>> RE the Intel 432: fine to have variable bit length fields, but not at the expense of the vast majority of code. Stretch had provision
>> for variable bit length fields in memory, but also had the word size references for the majority of cases (using both 32-bit and
>> 64-bit instructions).
>> "the instructions are bit-variable in length and are not constrained to start or end on byte or word boundaries"
>> Introduction to the iAPX 432 Architecture 1981 page 3-9 :((
> <
> Very similar to the charge of the light brigade--and just as effective.

The instruction encoding as a bitstream is "likely just not worth it".

Though, does sort of remind me that I had also been working on/off a
little recently on a possible idea for a way to make a Huffman decoder
somewhat faster on BJX2 (I suspect its effectiveness would be diminished
on x86-64, as decoding 4 symbols in parallel requires more variables
than x86-64 has registers; one would be limited to two symbols in
parallel to fit it into registers).


Click here to read the complete article
Re: Debunking CISC vs RISC code density

<5af21ea6-6002-40d4-a8be-d00287ab6fe9n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29356&group=comp.arch#29356

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:557:0:b0:6fe:c73e:2579 with SMTP id 84-20020a370557000000b006fec73e2579mr6998736qkf.756.1670370807386;
Tue, 06 Dec 2022 15:53:27 -0800 (PST)
X-Received: by 2002:a05:6870:8882:b0:132:6f79:9ffb with SMTP id
m2-20020a056870888200b001326f799ffbmr41607114oam.61.1670370807052; Tue, 06
Dec 2022 15:53:27 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 6 Dec 2022 15:53:26 -0800 (PST)
In-Reply-To: <tmojt2$bhif$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1dde:6a00:5472:5763:ddf4:3b87;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1dde:6a00:5472:5763:ddf4:3b87
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <tmojt2$bhif$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5af21ea6-6002-40d4-a8be-d00287ab6fe9n@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Tue, 06 Dec 2022 23:53:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2543
 by: robf...@gmail.com - Tue, 6 Dec 2022 23:53 UTC

Unique NOPs can be used to trigger breakpoints in the logic analyzer / simulator. I have
been thinking about incorporating NOP tracing in the processor trace. Rather than record
all the branches encountered, just a few NOPs could be recorded.

I used to build character strings for debugging while a program was running to tell which
paths of execution the program took. I could stop the program and see if it built a particular
string like “ABCDHIJK” which told me exactly where the program went.

A question I have is whether it is worthwhile to reserve a couple of opcode patterns to
support the simulator. Many simulators have an ‘END’ pseudo instruction which is not part
of the ISA but useful to the simulator. A reserved pattern for external tools.

If the presence of NOPs as dedicated NOPs is debatable, then why not include one in the ISA?
Most of the time there is plenty of opcode space for a NOP and they do not take many gates
to support.

Re: Debunking CISC vs RISC code density

<7jRjL.3034$vBI8.1187@fx15.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29358&group=comp.arch#29358

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Debunking CISC vs RISC code density
Newsgroups: comp.arch
References: <tmhjrh$3jl6t$1@dont-email.me> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com> <cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com> <b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com> <8b2b14f6-50e0-4b06-bac2-a87e704c1322n@googlegroups.com> <d9d51ec7-6dbc-40c1-a277-c8b73afa683an@googlegroups.com> <e5IjL.9$rKDc.7@fx34.iad> <tmohh8$bb5t$2@dont-email.me> <09243819-a8a2-44b0-a6fd-0fd061b06bccn@googlegroups.com>
Lines: 57
Message-ID: <7jRjL.3034$vBI8.1187@fx15.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 07 Dec 2022 00:41:39 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 07 Dec 2022 00:41:39 GMT
X-Received-Bytes: 3201
 by: Scott Lurndal - Wed, 7 Dec 2022 00:41 UTC

MitchAlsup <MitchAlsup@aol.com> writes:
>On Tuesday, December 6, 2022 at 4:59:56 PM UTC-6, BGB wrote:
>> On 12/6/2022 8:12 AM, EricP wrote:
>> > MitchAlsup wrote:
>> >> <
>> >> Why would you want a NoOp in your ISA ???
>> >> A NoOp does nothing,
>> >
>> > Code alignment padding.
>> > It was a common optimization to align routine entry and
>> > loop entries to cache boundaries.
>> >
>> > For self modifying code, I can see having an instruction 'hole' that one
>> > wants to generate a single instruction into, but there are different
>> > generated instructions so it may need to pad out to the 'hole' size.
>> >
>> > Some ISA's have multiple sized Nop's so they can pad
>> > with the minimum number of wasted decode cycles.
><
>A sign that something is wrong with that ISA.
>> >
>> Yeah, a NOP is pretty standard feature:
><
>In the past, certainly, in the future ???
><
>> Allows for aligning stuff;
><
>With 32-bit extensions, there is no code misalignment in My 66000,
>and if you try to misalign IP you take an exception.
><
>> Allows for spots for the linker or loader to patch up certain
>> instruction sequences if needed, ...
><
>These places come out of the ASM in 64-bit constant form, and the linker
>can shrink them if the constant fits in a smaller footprint.
>>
>>
>> More debatable though is whether to have a dedicated NOP instruction, or
>> merely define some other special case (such as "OR R0, R0, R0" as the NOP).
>>
>Every ISA has some way to "doing no work" while executing instructions;

ARM64 has WFI and WFE, Intel/AMD have PAUSE and MWAIT. They have the
benefit of signaling the core that it can enter a lower-power state.

>But the question is whether there should be an explicit OpCode for NoOp
>(or more than one) is a lot different that whether it is possible to do noting
>by executing an instruction.
>> ...

Both of the above have explicit NOP instructions; which on intel are often
generated by compilers to align code to specific address constraints.

ARM64 has a range of "HINT" instructions; if a hint isn't supported
by an implementation it becomes a NOP.

Re: Debunking CISC vs RISC code density

<TqRjL.3036$vBI8.1201@fx15.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29359&group=comp.arch#29359

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Debunking CISC vs RISC code density
Newsgroups: comp.arch
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at> <d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me> <e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com> <cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <tmojt2$bhif$1@dont-email.me> <5af21ea6-6002-40d4-a8be-d00287ab6fe9n@googlegroups.com>
Lines: 38
Message-ID: <TqRjL.3036$vBI8.1201@fx15.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 07 Dec 2022 00:49:55 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 07 Dec 2022 00:49:55 GMT
X-Received-Bytes: 2664
 by: Scott Lurndal - Wed, 7 Dec 2022 00:49 UTC

"robf...@gmail.com" <robfi680@gmail.com> writes:
>Unique NOPs can be used to trigger breakpoints in the logic analyzer / simu=
>lator. I have
>been thinking about incorporating NOP tracing in the processor trace. Rathe=
>r than record
>all the branches encountered, just a few NOPs could be recorded.

Many processors use the intruction pointer/program counter as the
trigger for on-chip/JTAG logical analyzers, or have a instruction word
match register programmed to match a particular instruction bit pattern
(or pattern + mask to trap on a group of instructions).

>
>A question I have is whether it is worthwhile to reserve a couple of opcode=
> patterns to
>support the simulator. Many simulators have an =E2=80=98END=E2=80=99 pseudo=
> instruction which is not part
>of the ISA but useful to the simulator. A reserved pattern for external too=
>ls.

Several commercial and proprietary SoC simulators designate a rarely used
instruction to back-door to the host running the simulator. Can provide
paravirtualization capabilities such as access to the host file system
or 'stdout' for bare-metal applications running on the simulator, or
in one case, the code being simulated can actually send arbitrary commands
to the simulator, such as commands to start logging various actions
at a certain point (e.g. before executing a sequence of simulated
instructions).

>
>If the presence of NOPs as dedicated NOPs is debatable, then why not includ=
>e one in the ISA?
>Most of the time there is plenty of opcode space for a NOP and they do not =
>take many gates
>to support.

Indeed.

Re: Debunking CISC vs RISC code density

<3686d0a7-731d-4a1d-a4bb-c41f76fe7c85n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29361&group=comp.arch#29361

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:514d:b0:3a5:258c:d69c with SMTP id ew13-20020a05622a514d00b003a5258cd69cmr68916478qtb.279.1670379274810;
Tue, 06 Dec 2022 18:14:34 -0800 (PST)
X-Received: by 2002:aca:1b11:0:b0:35c:583d:17d3 with SMTP id
b17-20020aca1b11000000b0035c583d17d3mr473308oib.113.1670379274529; Tue, 06
Dec 2022 18:14:34 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 6 Dec 2022 18:14:34 -0800 (PST)
In-Reply-To: <5af21ea6-6002-40d4-a8be-d00287ab6fe9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:6c0f:44d2:11a5:c9b;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:6c0f:44d2:11a5:c9b
References: <tmhjrh$3jl6t$1@dont-email.me> <2022Dec4.113313@mips.complang.tuwien.ac.at>
<d9d2babe-1c94-4234-bb8f-5fb8f9017375n@googlegroups.com> <tmlv42$1t3n$1@dont-email.me>
<e7b3897d-8bc0-4900-9ff5-40078eeda9e7n@googlegroups.com> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <tmojt2$bhif$1@dont-email.me>
<5af21ea6-6002-40d4-a8be-d00287ab6fe9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3686d0a7-731d-4a1d-a4bb-c41f76fe7c85n@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 07 Dec 2022 02:14:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2966
 by: MitchAlsup - Wed, 7 Dec 2022 02:14 UTC

On Tuesday, December 6, 2022 at 5:53:29 PM UTC-6, robf...@gmail.com wrote:
> Unique NOPs can be used to trigger breakpoints in the logic analyzer / simulator. I have
> been thinking about incorporating NOP tracing in the processor trace. Rather than record
> all the branches encountered, just a few NOPs could be recorded.
>
> I used to build character strings for debugging while a program was running to tell which
> paths of execution the program took. I could stop the program and see if it built a particular
> string like “ABCDHIJK” which told me exactly where the program went.
>
> A question I have is whether it is worthwhile to reserve a couple of opcode patterns to
> support the simulator. Many simulators have an ‘END’ pseudo instruction which is not part
> of the ISA but useful to the simulator. A reserved pattern for external tools.
<
I can see a purpose of an instruction that halts the pipeline so a HW debugger could scan out
the current state--but this is not a NoOp--and that OpCode probably does not ship to customers.
>
> If the presence of NOPs as dedicated NOPs is debatable, then why not include one in the ISA?
> Most of the time there is plenty of opcode space for a NOP and they do not take many gates
> to support.

Re: Debunking CISC vs RISC code density

<658674ca-aa4b-4746-be6a-6870e9babd2an@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29362&group=comp.arch#29362

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:3714:b0:6fa:16fe:93f6 with SMTP id de20-20020a05620a371400b006fa16fe93f6mr76698422qkb.258.1670379365044;
Tue, 06 Dec 2022 18:16:05 -0800 (PST)
X-Received: by 2002:a05:6808:1452:b0:35a:812c:3eae with SMTP id
x18-20020a056808145200b0035a812c3eaemr44476549oiv.218.1670379364630; Tue, 06
Dec 2022 18:16:04 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 6 Dec 2022 18:16:04 -0800 (PST)
In-Reply-To: <7jRjL.3034$vBI8.1187@fx15.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:6c0f:44d2:11a5:c9b;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:6c0f:44d2:11a5:c9b
References: <tmhjrh$3jl6t$1@dont-email.me> <40954ac9-c481-4b0e-8969-bbf1fc8a5bacn@googlegroups.com>
<cbab3d09-75c8-444e-9795-0dbc701758a7n@googlegroups.com> <8c12b8f4-8cc1-4a3c-bbb3-85fcbd287938n@googlegroups.com>
<b7a1d214-7ac4-4d2c-b450-c0e9cf9a5c89n@googlegroups.com> <8b2b14f6-50e0-4b06-bac2-a87e704c1322n@googlegroups.com>
<d9d51ec7-6dbc-40c1-a277-c8b73afa683an@googlegroups.com> <e5IjL.9$rKDc.7@fx34.iad>
<tmohh8$bb5t$2@dont-email.me> <09243819-a8a2-44b0-a6fd-0fd061b06bccn@googlegroups.com>
<7jRjL.3034$vBI8.1187@fx15.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <658674ca-aa4b-4746-be6a-6870e9babd2an@googlegroups.com>
Subject: Re: Debunking CISC vs RISC code density
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 07 Dec 2022 02:16:05 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2833
 by: MitchAlsup - Wed, 7 Dec 2022 02:16 UTC

On Tuesday, December 6, 2022 at 6:41:43 PM UTC-6, Scott Lurndal wrote:
> MitchAlsup <Mitch...@aol.com> writes:
>
> >These places come out of the ASM in 64-bit constant form, and the linker
> >can shrink them if the constant fits in a smaller footprint.
> >>
> >>
> >> More debatable though is whether to have a dedicated NOP instruction, or
> >> merely define some other special case (such as "OR R0, R0, R0" as the NOP).
> >>
> >Every ISA has some way to "doing no work" while executing instructions;
<
> ARM64 has WFI and WFE, Intel/AMD have PAUSE and MWAIT. They have the
> benefit of signaling the core that it can enter a lower-power state.
<
In order pipelines can do this on any cache or TLB miss.
<
> >But the question is whether there should be an explicit OpCode for NoOp
> >(or more than one) is a lot different that whether it is possible to do noting
> >by executing an instruction.
> >> ...
> Both of the above have explicit NOP instructions; which on intel are often
> generated by compilers to align code to specific address constraints.
>
> ARM64 has a range of "HINT" instructions; if a hint isn't supported
> by an implementation it becomes a NOP.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor