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 may be fixed. Will keep monitoring.


devel / comp.arch / Re: RISC-V vs. Aarch64

SubjectAuthor
* RISC-V vs. Aarch64Anton Ertl
+* Re: RISC-V vs. Aarch64MitchAlsup
|+* Re: RISC-V vs. Aarch64Anton Ertl
||`* Re: RISC-V vs. Aarch64MitchAlsup
|| +- Re: RISC-V vs. Aarch64BGB
|| `- Re: RISC-V vs. Aarch64Anton Ertl
|+* Re: RISC-V vs. Aarch64Ivan Godard
||+- Re: RISC-V vs. Aarch64robf...@gmail.com
||+- Re: RISC-V vs. Aarch64MitchAlsup
||`* Re: RISC-V vs. Aarch64Quadibloc
|| `* Re: RISC-V vs. Aarch64Quadibloc
||  `- Re: RISC-V vs. Aarch64Quadibloc
|+* Re: RISC-V vs. Aarch64Marcus
||+- Re: RISC-V vs. Aarch64BGB
||`* Re: RISC-V vs. Aarch64MitchAlsup
|| +- Re: RISC-V vs. Aarch64BGB
|| `- Re: RISC-V vs. Aarch64Ivan Godard
|`- Re: RISC-V vs. Aarch64MitchAlsup
`* Re: RISC-V vs. Aarch64BGB
 +* Re: RISC-V vs. Aarch64MitchAlsup
 |+- Re: RISC-V vs. Aarch64MitchAlsup
 |+* Re: RISC-V vs. Aarch64Thomas Koenig
 ||+* Re: RISC-V vs. Aarch64Ivan Godard
 |||`* Re: RISC-V vs. Aarch64EricP
 ||| `- Re: RISC-V vs. Aarch64Ivan Godard
 ||+* Re: RISC-V vs. Aarch64MitchAlsup
 |||`* Re: RISC-V vs. Aarch64Ivan Godard
 ||| `* Re: RISC-V vs. Aarch64MitchAlsup
 |||  `* Re: RISC-V vs. Aarch64Ivan Godard
 |||   `* Re: RISC-V vs. Aarch64MitchAlsup
 |||    `- Re: RISC-V vs. Aarch64Marcus
 ||`* Re: RISC-V vs. Aarch64BGB
 || `- Re: RISC-V vs. Aarch64MitchAlsup
 |+* Re: RISC-V vs. Aarch64BGB
 ||`* Re: RISC-V vs. Aarch64MitchAlsup
 || `- Re: RISC-V vs. Aarch64Thomas Koenig
 |`* Re: RISC-V vs. Aarch64Marcus
 | `* Re: RISC-V vs. Aarch64EricP
 |  +* Re: RISC-V vs. Aarch64Marcus
 |  |+* Re: RISC-V vs. Aarch64MitchAlsup
 |  ||+* Re: RISC-V vs. Aarch64Niklas Holsti
 |  |||+* Re: RISC-V vs. Aarch64Bill Findlay
 |  ||||`- Re: RISC-V vs. Aarch64MitchAlsup
 |  |||`- Re: RISC-V vs. Aarch64Ivan Godard
 |  ||`- Re: RISC-V vs. Aarch64Thomas Koenig
 |  |+* Re: RISC-V vs. Aarch64Thomas Koenig
 |  ||+* Re: RISC-V vs. Aarch64MitchAlsup
 |  |||`- Re: RISC-V vs. Aarch64BGB
 |  ||+* Re: RISC-V vs. Aarch64Ivan Godard
 |  |||`* Re: RISC-V vs. Aarch64Thomas Koenig
 |  ||| `- Re: RISC-V vs. Aarch64Ivan Godard
 |  ||`* Re: RISC-V vs. Aarch64Marcus
 |  || +* Re: RISC-V vs. Aarch64Thomas Koenig
 |  || |`* Re: RISC-V vs. Aarch64aph
 |  || | +- Re: RISC-V vs. Aarch64Michael S
 |  || | `* Re: RISC-V vs. Aarch64Thomas Koenig
 |  || |  `* Re: RISC-V vs. Aarch64robf...@gmail.com
 |  || |   +* Re: RISC-V vs. Aarch64Ivan Godard
 |  || |   |`- Re: RISC-V vs. Aarch64Tim Rentsch
 |  || |   `* Re: RISC-V vs. Aarch64Terje Mathisen
 |  || |    `* Re: RISC-V vs. Aarch64Thomas Koenig
 |  || |     `* Re: RISC-V vs. Aarch64Marcus
 |  || |      `* Re: RISC-V vs. Aarch64Guillaume
 |  || |       `* Re: RISC-V vs. Aarch64MitchAlsup
 |  || |        +- Re: RISC-V vs. Aarch64Marcus
 |  || |        +* Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |`* Re: RISC-V vs. Aarch64MitchAlsup
 |  || |        | `* Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |  `* Re: RISC-V vs. Aarch64Thomas Koenig
 |  || |        |   `* Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |    `* Re: RISC-V vs. Aarch64EricP
 |  || |        |     +* Re: RISC-V vs. Aarch64MitchAlsup
 |  || |        |     |`* Re: RISC-V vs. Aarch64EricP
 |  || |        |     | `- Re: RISC-V vs. Aarch64MitchAlsup
 |  || |        |     `* Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |      `* Re: RISC-V vs. Aarch64EricP
 |  || |        |       +- Re: RISC-V vs. Aarch64MitchAlsup
 |  || |        |       `* Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |        +* Re: RISC-V vs. Aarch64Brett
 |  || |        |        |+* Re: RISC-V vs. Aarch64MitchAlsup
 |  || |        |        ||`- Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |        |`- Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |        `* Re: RISC-V vs. Aarch64Stephen Fuld
 |  || |        |         `* Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |          +* Re: RISC-V vs. Aarch64Stefan Monnier
 |  || |        |          |`- Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |          +* Re: RISC-V vs. Aarch64MitchAlsup
 |  || |        |          |`* Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |          | `- Re: RISC-V vs. Aarch64MitchAlsup
 |  || |        |          +* Re: RISC-V vs. Aarch64Stephen Fuld
 |  || |        |          |`- Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |          `* Re: RISC-V vs. Aarch64EricP
 |  || |        |           +* Re: RISC-V vs. Aarch64EricP
 |  || |        |           |`* Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        |           | `* The type of Mill's belt's slotsStefan Monnier
 |  || |        |           |  +- Re: The type of Mill's belt's slotsMitchAlsup
 |  || |        |           |  `* Re: The type of Mill's belt's slotsIvan Godard
 |  || |        |           |   `* Re: The type of Mill's belt's slotsStefan Monnier
 |  || |        |           |    `* Re: The type of Mill's belt's slotsIvan Godard
 |  || |        |           |     +* Re: The type of Mill's belt's slotsStefan Monnier
 |  || |        |           |     |`* Re: The type of Mill's belt's slotsIvan Godard
 |  || |        |           |     `* Re: The type of Mill's belt's slotsMitchAlsup
 |  || |        |           `- Re: RISC-V vs. Aarch64Ivan Godard
 |  || |        +* Re: RISC-V vs. Aarch64Guillaume
 |  || |        `* Re: RISC-V vs. Aarch64Quadibloc
 |  || `* MRISC32 vectorization (was: RISC-V vs. Aarch64)Thomas Koenig
 |  |`* Re: RISC-V vs. Aarch64Terje Mathisen
 |  `- Re: RISC-V vs. Aarch64Quadibloc
 +* Re: RISC-V vs. Aarch64Anton Ertl
 `- Re: RISC-V vs. Aarch64aph

Pages:123456789101112131415
Re: shift activities, RISC-V vs. Aarch64

<jwvk0f72ezs.fsf-monnier+comp.arch@gnu.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: monn...@iro.umontreal.ca (Stefan Monnier)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Mon, 10 Jan 2022 21:20:28 -0500
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <jwvk0f72ezs.fsf-monnier+comp.arch@gnu.org>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org>
<sri6v8$2q55$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="1622d2cbd405357bff745d3a3494d90e";
logging-data="25400"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QS3JKsn+XRZGfpIdblBpf"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Cancel-Lock: sha1:egKJCNHpktI1xGvrZlBkufyXmnI=
sha1:s3t/VbnOzCbDDT5Wm24JJ/McbLk=
 by: Stefan Monnier - Tue, 11 Jan 2022 02:20 UTC

> Intuitive is in the mind of the beholder, and in my mind, if you
> want to shift right, you should say so.

I was thinking of a language where you might want to allow use of the
shift operator not just on fixed size integers, but also on things like
bignums and arbitrary size fractional numbers.
For fractional number you'd have nice properties like
`(a << b) >> c == a << (b - c)`.

Stefan

Re: shift activities, RISC-V vs. Aarch64

<srjdg1$bk5$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 09:01:04 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <srjdg1$bk5$1@dont-email.me>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com>
<873f2974-6d9d-4c67-b141-3e8ebf8376abn@googlegroups.com>
<12bd47d3-864b-4122-b211-d3264f541e30n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Jan 2022 08:01:05 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="bbfb99d2a71c4bdbe90b21f85ec5cb00";
logging-data="11909"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OWZPooq13fflDW+jULCG0nBXkbMVM/CA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:fSGqCUQY3j2I1ig3b8EI2gbX8jg=
In-Reply-To: <12bd47d3-864b-4122-b211-d3264f541e30n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Tue, 11 Jan 2022 08:01 UTC

On 11/01/2022 02:42, Quadibloc wrote:
> On Monday, January 10, 2022 at 2:31:20 PM UTC-7, MitchAlsup wrote:
>> On Monday, January 10, 2022 at 3:03:39 PM UTC-6, John Levine wrote:
>
>>> I'd rather say that shifts are only defined for values between zero
>>> and the word size, which excludes all negative values.
>
>> AND THUS: the right side operand SHOULD be unsigned !!!
>
> That does not follow. While C does have an unsigned integer type,
> many languages see no need to bother with such a thing, and for
> functions and operators to admit of a DOMAIN ERROR condition
> when used improperly is nothing strange.
>

If a language has a way to express a type that is strictly in the range
0 .. 32 (for 32-bit integers - with obvious changes for other sizes),
then the right hand operand should arguably be of that type. If not,
then any superset is equally good or bad. There's no advantage to
requiring an unsigned type here - it still has values outside of the
range just like signed integer types.

In C, a shift of the word size is not valid. "u << n" for a 32-bit
unsigned int "u" is only defined for n from 0 to 31 inclusive. This
catches people out sometimes, as it seems obvious that "u << 32" should
be defined as 0. The operation is undefined as on some cpus, if the
right hand operand is in a register it is effectively masked by 0x1f
before the shift - thus "u << 32" would give "u". Supporting shifts by
the full bit-width of the left hand operand could easily require quite
inefficient code.

(I'm not saying C's interpretation here is the only sensible choice, I'm
merely saying what it does.)

Re: shift activities, RISC-V vs. Aarch64

<srjfji$jhn$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!To5nvU/sTaigmVbgRJ05pQ.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 09:37:11 +0100
Organization: Aioe.org NNTP Server
Message-ID: <srjfji$jhn$1@gioia.aioe.org>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="20023"; posting-host="To5nvU/sTaigmVbgRJ05pQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.10.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Tue, 11 Jan 2022 08:37 UTC

John Levine wrote:
> According to Stefan Monnier <monnier@iro.umontreal.ca>:
>>> So, what does (13 << -7) mean ?
>>
>> I suspect everyone in this group knows what the above means in
>> C according to the C standard, but if you're asking what we think it
>> should mean instead (either in C or in other languages), then my answer
>> is that it should mean the same as (13 >> 7) because it's the most
>> intuitive behavior, and the cleanest semantics.
>
> Intuitive is in the mind of the beholder, and in my mind, if you
> want to shift right, you should say so.
>
> I'd rather say that shifts are only defined for values between zero
> and the word size, which excludes all negative values.
>
> What's the result of (13 << N) where N is an argument that might
> have a negative value? On computers that treat a variable shift
> argument as an unsigned number (all of them these days) does the
> computer have to generate code to test the sign of N and so forth?
>
> The VAX designers outsmarted themselves (not the only time) when
> they had one shift instruction with a signed argument rather than
> separate left and right shifts. I can't think of a time I've
> done shifting and didn't know when I wrote the code which direction
> I wanted to shift, even if the number of shifts was variable.

I have in fact been here a few times (2 or 3?), i.e. when writing codec
code: It would have been natural to shift either direction, but I was
usually able to bias the values in such a way that the negative shifts
went away.

There might have been one remaining case where I fell back to shifting
twice, once in each direction?

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: shift activities, RISC-V vs. Aarch64

<srjg94$tr8$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!To5nvU/sTaigmVbgRJ05pQ.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 09:48:41 +0100
Organization: Aioe.org NNTP Server
Message-ID: <srjg94$tr8$1@gioia.aioe.org>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com>
<ah4DJ.284706$3q9.89995@fx47.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="30568"; posting-host="To5nvU/sTaigmVbgRJ05pQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.10.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Tue, 11 Jan 2022 08:48 UTC

EricP wrote:
> John Levine wrote:
>> According to Stefan Monnier  <monnier@iro.umontreal.ca>:
>>>> So, what does (13 << -7) mean ?
>>> I suspect everyone in this group knows what the above means in
>>> C according to the C standard, but if you're asking what we think it
>>> should mean instead (either in C or in other languages), then my answer
>>> is that it should mean the same as (13 >> 7) because it's the most
>>> intuitive behavior, and the cleanest semantics.
>>
>> Intuitive is in the mind of the beholder, and in my mind, if you
>> want to shift right, you should say so.
>>
>> I'd rather say that shifts are only defined for values between zero
>> and the word size, which excludes all negative values.
>>
>> What's the result of (13 << N) where N is an argument that might
>> have a negative value?  On computers that treat a variable shift
>> argument as an unsigned number (all of them these days) does the
>> computer have to generate code to test the sign of N and so forth?
>
> It could have both left and right shift instructions
> where a positive count is in the instructions' direction,
> and a negative count is the reverse direction for both.
> Symmetry!
>
> Now question #2: what does it mean when N >= data operand bit-size?

That used to be "return zero" (or all sign bits for an arithmetic shift
right), and Intel started out that way on the 8086:

shl ax,cl

would perform the shift as many time as CL specified, so 0..255 times,
but any value 16 or above woud give the same zero result in AX.

Then on the 286 (or maybe even the 186?) they optimized this by only
allowing shifts from 0 to 31 bits, so it was still possible to zero out
the target reg by having CL = 16..31, and you could usefully do a
double-wide shift like SHRD which combines two registers and shift them
together.

There were two big problems with this approach:

a) The shift count was truncated with a mask, i.e. bottom 5 bits,
instead of a compare, so a shift of exactly 32 bits would now be treated
as a NOP.

b) When the 386 came around, the C standard had already allowed shift
amounts to be limited to reg_size - 1, so Intel saw no need to extend
the shift mask to 6 bits which would have been logical.

There were a bunch of other cpus being developed around the same
timeframe, in a race to the bottom the cheapest approach have won:
Extract 5 or 6 bits from the shift count, discarding the rest.

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: shift activities, RISC-V vs. Aarch64

<2022Jan11.132710@mips.complang.tuwien.ac.at>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 12:27:10 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 12
Message-ID: <2022Jan11.132710@mips.complang.tuwien.ac.at>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com> <570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com> <jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com> <ah4DJ.284706$3q9.89995@fx47.iad>
Injection-Info: reader02.eternal-september.org; posting-host="c3802496c3dd689cf610bf8d6b3b9d6f";
logging-data="27338"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VYIR6F2tGpIwBdMu0g2FF"
Cancel-Lock: sha1:HRSAAe7YAt9VDzxqbAclWdbbrfM=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 11 Jan 2022 12:27 UTC

EricP <ThatWouldBeTelling@thevillage.com> writes:
>Now question #2: what does it mean when N >= data operand bit-size?

0

But again, I have not actually found the deviation of existing
architectures to be a problem in practice.

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

Re: shift activities, RISC-V vs. Aarch64

<2022Jan11.133256@mips.complang.tuwien.ac.at>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 12:32:56 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 22
Message-ID: <2022Jan11.133256@mips.complang.tuwien.ac.at>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com> <570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com> <jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com> <ah4DJ.284706$3q9.89995@fx47.iad> <srjg94$tr8$1@gioia.aioe.org>
Injection-Info: reader02.eternal-september.org; posting-host="c3802496c3dd689cf610bf8d6b3b9d6f";
logging-data="27338"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GNY7xrix/rqqIwdK7hWIT"
Cancel-Lock: sha1:0ZHvQSrXSfvFj87sAdbgnQwtebw=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 11 Jan 2022 12:32 UTC

Terje Mathisen <terje.mathisen@tmsw.no> writes:
>b) When the 386 came around, the C standard had already allowed shift
>amounts to be limited to reg_size - 1, so Intel saw no need to extend
>the shift mask to 6 bits which would have been logical.
>
>There were a bunch of other cpus being developed around the same
>timeframe, in a race to the bottom the cheapest approach have won:
>Extract 5 or 6 bits from the shift count, discarding the rest.

The CPUs around the time were including a barrel shifter for
single-cycle shifts (which consumed quite a bit of chip area). On
these shifters this behaviour is natural: bit 0 of the shift count
controls one MUX, bit 1 another MUX, and so on, up to bit 4 (for
32-bit shifters). No extraction and discarding happens. If you want
to implement a result 0 for shift amounts >31, you need to nor bit
5..31 of the shift count and "and" the result of the barrel shifter
with that. This adds one gate level to the shift operation.

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

Re: shift activities, RISC-V vs. Aarch64

<1bsftuxlny.fsf@pfeifferfamily.net>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pfeif...@cs.nmsu.edu (Joe Pfeiffer)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 09:49:21 -0700
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <1bsftuxlny.fsf@pfeifferfamily.net>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org>
<sri6v8$2q55$1@gal.iecc.com>
<fa8c03e5-6f6c-442a-b3ac-f686eaff41c6n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="af8a2235097bb7934a377c0535627fc4";
logging-data="9708"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+V4QAkyP5UZjz3Q8Kn0Zno/0KBrnFYYqA="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:zVLCLlQPyqcNMgIMlOBA7qr0uEg=
sha1:otBhv/G5WW6Uh/x+7Bbr/4SzKK8=
 by: Joe Pfeiffer - Tue, 11 Jan 2022 16:49 UTC

Quadibloc <jsavard@ecn.ab.ca> writes:

> On Monday, January 10, 2022 at 2:03:39 PM UTC-7, John Levine wrote:
>
>> The VAX designers outsmarted themselves (not the only time) when
>> they had one shift instruction with a signed argument rather than
>> separate left and right shifts.
>
> I'll definitely agree that this is a very unusual instruction. However
> nice it might seem to have such an instruction, and to define the
> << and >> operators in the way it makes feasible, in the real world
> this isn't needed, as you say.
>
> In fact, while I would not have been surprised to hear that the
> PDP-10 had such a shift instruction, I'm rather amazed that
> this was done with the VAX.

With its extreme orthoganility goal? It would be a bigger surprise if
it didn't do it that way.

Re: shift activities, RISC-V vs. Aarch64

<y5jDJ.4$mS1.3@fx10.iad>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx10.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: shift activities, RISC-V vs. Aarch64
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com> <570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com> <jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com> <fa8c03e5-6f6c-442a-b3ac-f686eaff41c6n@googlegroups.com>
In-Reply-To: <fa8c03e5-6f6c-442a-b3ac-f686eaff41c6n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 31
Message-ID: <y5jDJ.4$mS1.3@fx10.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Tue, 11 Jan 2022 17:26:54 UTC
Date: Tue, 11 Jan 2022 12:26:43 -0500
X-Received-Bytes: 2064
X-Original-Bytes: 2013
 by: EricP - Tue, 11 Jan 2022 17:26 UTC

Quadibloc wrote:
> On Monday, January 10, 2022 at 2:03:39 PM UTC-7, John Levine wrote:
>
>> The VAX designers outsmarted themselves (not the only time) when
>> they had one shift instruction with a signed argument rather than
>> separate left and right shifts.
>
> I'll definitely agree that this is a very unusual instruction. However
> nice it might seem to have such an instruction, and to define the
> << and >> operators in the way it makes feasible, in the real world
> this isn't needed, as you say.
>
> In fact, while I would not have been surprised to hear that the
> PDP-10 had such a shift instruction, I'm rather amazed that
> this was done with the VAX.
>
> John Savard

The PDP-11 ASH instruction operates on 16-bit word operands and
ASHC Arithmetic Shift Combined operates on a 32-bit register pair
as VAX ASHL does for a 32-bit longword and ASHQ a 64-bit quadword.
In all cases +ve count was left, -ve was right.

The PDP-11 also has ASL Arithmetic Shift Left and ASR for right
but they only shift 1 place.

Also VAX had PDP-11 instruction execution mode.
They were clearly aiming for PDP-11 assembler compatibility.

Re: shift activities, RISC-V vs. Aarch64

<36fb31a5-ddc5-4899-bf00-d1efbe91fc40n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:111c:: with SMTP id o28mr4096940qkk.328.1641926705883;
Tue, 11 Jan 2022 10:45:05 -0800 (PST)
X-Received: by 2002:a05:6808:1401:: with SMTP id w1mr2802357oiv.7.1641926705667;
Tue, 11 Jan 2022 10:45:05 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Jan 2022 10:45:05 -0800 (PST)
In-Reply-To: <2022Jan11.133256@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:48be:699a:8406:e0c8;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:48be:699a:8406:e0c8
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com> <jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org>
<sri6v8$2q55$1@gal.iecc.com> <ah4DJ.284706$3q9.89995@fx47.iad>
<srjg94$tr8$1@gioia.aioe.org> <2022Jan11.133256@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <36fb31a5-ddc5-4899-bf00-d1efbe91fc40n@googlegroups.com>
Subject: Re: shift activities, RISC-V vs. Aarch64
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 11 Jan 2022 18:45:05 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 36
 by: MitchAlsup - Tue, 11 Jan 2022 18:45 UTC

On Tuesday, January 11, 2022 at 6:48:33 AM UTC-6, Anton Ertl wrote:
> Terje Mathisen <terje.m...@tmsw.no> writes:
> >b) When the 386 came around, the C standard had already allowed shift
> >amounts to be limited to reg_size - 1, so Intel saw no need to extend
> >the shift mask to 6 bits which would have been logical.
<
This comes tantalizingly close to stating that everyone should simply follow Intel.
<
> >
> >There were a bunch of other cpus being developed around the same
> >timeframe, in a race to the bottom the cheapest approach have won:
> >Extract 5 or 6 bits from the shift count, discarding the rest.
<
Do you not think that, for a modern ISA, one CAN take a better position?
<
> The CPUs around the time were including a barrel shifter for
> single-cycle shifts (which consumed quite a bit of chip area). On
> these shifters this behaviour is natural: bit 0 of the shift count
> controls one MUX, bit 1 another MUX, and so on, up to bit 4 (for
> 32-bit shifters).
<
You are describing the IBM log-shifter which pretty much supplanted barrel
shifters on processes with more than 2 metal layers.
<
> No extraction and discarding happens. If you want
> to implement a result 0 for shift amounts >31, you need to nor bit
> 5..31 of the shift count and "and" the result of the barrel shifter
> with that. This adds one gate level to the shift operation.
<
One can do anything with a log-shifter as one can do with a barrel shifter
and with approximately equal added cost. The log=-shifter cost is less
than a barrel shifter cost.
<
> - anton
> --
> 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
> Mitch Alsup, <c17fcd89-f024-40e7...@googlegroups.com>

Re: shift activities, RISC-V vs. Aarch64

<srkjb4$kro$1@gal.iecc.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: joh...@taugh.com (John Levine)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 18:47:00 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <srkjb4$kro$1@gal.iecc.com>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <sri6v8$2q55$1@gal.iecc.com> <fa8c03e5-6f6c-442a-b3ac-f686eaff41c6n@googlegroups.com> <1bsftuxlny.fsf@pfeifferfamily.net>
Injection-Date: Tue, 11 Jan 2022 18:47:00 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="21368"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <2021Dec24.163843@mips.complang.tuwien.ac.at> <sri6v8$2q55$1@gal.iecc.com> <fa8c03e5-6f6c-442a-b3ac-f686eaff41c6n@googlegroups.com> <1bsftuxlny.fsf@pfeifferfamily.net>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Tue, 11 Jan 2022 18:47 UTC

According to Joe Pfeiffer <pfeiffer@cs.nmsu.edu>:
>> In fact, while I would not have been surprised to hear that the
>> PDP-10 had such a shift instruction, I'm rather amazed that
>> this was done with the VAX.
>
>With its extreme orthoganility goal? It would be a bigger surprise if
>it didn't do it that way.

Indeed it did, LSH and LSHC for one- and two-word logical shifts,
ASH and ASHC for arithmetic shifts, and ROT and ROTC for rotates,
with the address taken as a signed 9-bit number.

ASHC right shifts treated the two words as two signed numbers, so the sign
of the low word copied the sign of the high word and bits shifted out of
the bottom of the high word were shifted into the second bit of the low
word and v/v. I don't think that turned out to be very useful

Of course, we're talking about an architecture designed in 1963. Perhaps
the tradeoffs in computer design have changed since then.
--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: shift activities, RISC-V vs. Aarch64

<srkks3$qmm$1@gal.iecc.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: joh...@taugh.com (John Levine)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 19:13:07 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <srkks3$qmm$1@gal.iecc.com>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com> <sri9sd$rg7$1@dont-email.me>
Injection-Date: Tue, 11 Jan 2022 19:13:07 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="27350"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <2021Dec24.163843@mips.complang.tuwien.ac.at> <jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com> <sri9sd$rg7$1@dont-email.me>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Tue, 11 Jan 2022 19:13 UTC

According to Ivan Godard <ivan@millcomputing.com>:
>> The VAX designers outsmarted themselves (not the only time) when
>> they had one shift instruction with a signed argument ...

>Perhaps VAX followed the semantics of ADD? After all, 13 + -7 is 6, not
>some very large number - so there is really no reason for SUB to be in
>the ISA.

Well, sure, the PDP-8 didn't have a subtract instruction either. But I don't think
minimizing the number of instructions in the ISA is a big deal, it's a tradeoff between
implementation complexity and instruction count. VAX went way in the direction of
complex microcoded implementation which even at the time should have been seen as
a dead end.

S/360 had separate left and right shifts and it seems to have worn pretty well.

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: shift activities, RISC-V vs. Aarch64

<059bfacc-461a-4bdc-b53a-ab0009356897n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:1c09:: with SMTP id u9mr5560696qvc.4.1641930062454;
Tue, 11 Jan 2022 11:41:02 -0800 (PST)
X-Received: by 2002:a05:6808:ecc:: with SMTP id q12mr2950863oiv.122.1641930062142;
Tue, 11 Jan 2022 11:41:02 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Jan 2022 11:41:01 -0800 (PST)
In-Reply-To: <srkjb4$kro$1@gal.iecc.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:48be:699a:8406:e0c8;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:48be:699a:8406:e0c8
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <sri6v8$2q55$1@gal.iecc.com>
<fa8c03e5-6f6c-442a-b3ac-f686eaff41c6n@googlegroups.com> <1bsftuxlny.fsf@pfeifferfamily.net>
<srkjb4$kro$1@gal.iecc.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <059bfacc-461a-4bdc-b53a-ab0009356897n@googlegroups.com>
Subject: Re: shift activities, RISC-V vs. Aarch64
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 11 Jan 2022 19:41:02 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 30
 by: MitchAlsup - Tue, 11 Jan 2022 19:41 UTC

On Tuesday, January 11, 2022 at 12:47:03 PM UTC-6, John Levine wrote:
> According to Joe Pfeiffer <pfei...@cs.nmsu.edu>:
> >> In fact, while I would not have been surprised to hear that the
> >> PDP-10 had such a shift instruction, I'm rather amazed that
> >> this was done with the VAX.
> >
> >With its extreme orthoganility goal? It would be a bigger surprise if
> >it didn't do it that way.
> Indeed it did, LSH and LSHC for one- and two-word logical shifts,
> ASH and ASHC for arithmetic shifts, and ROT and ROTC for rotates,
> with the address taken as a signed 9-bit number.
<
9-bits ?
32-bits (1 registers) is 5-bits 6-bits when signed
64-bits (2 registers) is 6-bits 7-bits when signed
And the VAX immediates supported 8-bit as the small size.
<
Why 9-bits ?
<
>
> ASHC right shifts treated the two words as two signed numbers, so the sign
> of the low word copied the sign of the high word and bits shifted out of
> the bottom of the high word were shifted into the second bit of the low
> word and v/v. I don't think that turned out to be very useful
>
> Of course, we're talking about an architecture designed in 1963. Perhaps
> the tradeoffs in computer design have changed since then.
> --
> Regards,
> John Levine, jo...@taugh.com, Primary Perpetrator of "The Internet for Dummies",
> Please consider the environment before reading this e-mail. https://jl.ly

Re: shift activities, RISC-V vs. Aarch64

<srkpgp$2a2o$1@gal.iecc.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: joh...@taugh.com (John Levine)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 20:32:25 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <srkpgp$2a2o$1@gal.iecc.com>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <1bsftuxlny.fsf@pfeifferfamily.net> <srkjb4$kro$1@gal.iecc.com> <059bfacc-461a-4bdc-b53a-ab0009356897n@googlegroups.com>
Injection-Date: Tue, 11 Jan 2022 20:32:25 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="75864"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <2021Dec24.163843@mips.complang.tuwien.ac.at> <1bsftuxlny.fsf@pfeifferfamily.net> <srkjb4$kro$1@gal.iecc.com> <059bfacc-461a-4bdc-b53a-ab0009356897n@googlegroups.com>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Tue, 11 Jan 2022 20:32 UTC

According to MitchAlsup <MitchAlsup@aol.com>:
>> ASH and ASHC for arithmetic shifts, and ROT and ROTC for rotates,
>> with the address taken as a signed 9-bit number.
><
>9-bits ?

Yeah, the high bit of the 18-bit address was the sign, the low
8 bits the value, all treated as two-s complement number,

>64-bits (2 registers) is 6-bits 7-bits when signed
>Why 9-bits ?

The PDP-10 was 36 bits so a two-word value was 72 bits.

Dunno why it was 9 bits rather than 8 and I am pretty sure
everyone who knew has died. As likely as not it was some
quirk of the way the PDP-6 was implemented.

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: shift activities, RISC-V vs. Aarch64

<srkpq9$fks$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Tue, 11 Jan 2022 12:37:30 -0800
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <srkpq9$fks$1@dont-email.me>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<1bsftuxlny.fsf@pfeifferfamily.net> <srkjb4$kro$1@gal.iecc.com>
<059bfacc-461a-4bdc-b53a-ab0009356897n@googlegroups.com>
<srkpgp$2a2o$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Jan 2022 20:37:30 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7c5ee37bfca8a786b6dfdd5097aa63fb";
logging-data="16028"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GWHRwx6C0M/L7L1iaBrEA"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.1
Cancel-Lock: sha1:6hPSovf+/PufjHt4iXnCc4GjbBA=
In-Reply-To: <srkpgp$2a2o$1@gal.iecc.com>
Content-Language: en-US
 by: Ivan Godard - Tue, 11 Jan 2022 20:37 UTC

On 1/11/2022 12:32 PM, John Levine wrote:
> According to MitchAlsup <MitchAlsup@aol.com>:
>>> ASH and ASHC for arithmetic shifts, and ROT and ROTC for rotates,
>>> with the address taken as a signed 9-bit number.
>> <
>> 9-bits ?
>
> Yeah, the high bit of the 18-bit address was the sign, the low
> 8 bits the value, all treated as two-s complement number,
>
>> 64-bits (2 registers) is 6-bits 7-bits when signed
>> Why 9-bits ?
>
> The PDP-10 was 36 bits so a two-word value was 72 bits.
>
> Dunno why it was 9 bits rather than 8 and I am pretty sure
> everyone who knew has died. As likely as not it was some
> quirk of the way the PDP-6 was implemented.
>
>
>

Character addressing on a 36-bit machine: 4x9=36. Earliest had 6-bit
chars but that was already understood as wrong.

Re: shift activities, RISC-V vs. Aarch64

<srm2nc$hr3$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!To5nvU/sTaigmVbgRJ05pQ.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Wed, 12 Jan 2022 09:15:47 +0100
Organization: Aioe.org NNTP Server
Message-ID: <srm2nc$hr3$1@gioia.aioe.org>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com>
<ah4DJ.284706$3q9.89995@fx47.iad> <srjg94$tr8$1@gioia.aioe.org>
<2022Jan11.133256@mips.complang.tuwien.ac.at>
<36fb31a5-ddc5-4899-bf00-d1efbe91fc40n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="18275"; posting-host="To5nvU/sTaigmVbgRJ05pQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.10.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Wed, 12 Jan 2022 08:15 UTC

MitchAlsup wrote:
> On Tuesday, January 11, 2022 at 6:48:33 AM UTC-6, Anton Ertl wrote:
>> Terje Mathisen <terje.m...@tmsw.no> writes:
>>> b) When the 386 came around, the C standard had already allowed shift
>>> amounts to be limited to reg_size - 1, so Intel saw no need to extend
>>> the shift mask to 6 bits which would have been logical.
> <
> This comes tantalizingly close to stating that everyone should simply follow Intel.

Rather the opposite: I am trying to explain, not excuse the current
situation. :-(

> <
>>>
>>> There were a bunch of other cpus being developed around the same
>>> timeframe, in a race to the bottom the cheapest approach have won:
>>> Extract 5 or 6 bits from the shift count, discarding the rest.
> <
> Do you not think that, for a modern ISA, one CAN take a better position?

Yes, please!

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: shift activities, RISC-V vs. Aarch64

<87pmox2vnz.fsf@eder.anydns.info>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: a_eder_...@web.de (Andreas Eder)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Wed, 12 Jan 2022 09:41:20 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <87pmox2vnz.fsf@eder.anydns.info>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<jwvfspv8qgx.fsf-monnier+comp.arch@gnu.org> <sri6v8$2q55$1@gal.iecc.com>
<ah4DJ.284706$3q9.89995@fx47.iad> <srjg94$tr8$1@gioia.aioe.org>
<2022Jan11.133256@mips.complang.tuwien.ac.at>
<36fb31a5-ddc5-4899-bf00-d1efbe91fc40n@googlegroups.com>
<srm2nc$hr3$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="67d6079dbe04dd1dbb8bf853c15760a5";
logging-data="17777"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IhHx+ssrKjBkXhgbBmsk4"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Cancel-Lock: sha1:IWeCdHGfzGNNHsST3je4CLEoy2Y=
sha1:doK8LvPpQGv/hnkedjoSthcj7Oc=
 by: Andreas Eder - Wed, 12 Jan 2022 08:41 UTC

On Mi 12 Jan 2022 at 09:15, Terje Mathisen <terje.mathisen@tmsw.no> wrote:

> Rather the opposite: I am trying to explain, not excuse the current
> situation. :-(

I've come yo bury Caesar, not to praise him!

'Andreas

Re: RISC-V vs. Aarch64

<srma56$jmj$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: m.del...@this.bitsnbites.eu (Marcus)
Newsgroups: comp.arch
Subject: Re: RISC-V vs. Aarch64
Date: Wed, 12 Jan 2022 11:22:30 +0100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <srma56$jmj$1@dont-email.me>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<sqkcvk$n97$1@dont-email.me> <RrlzJ.130558$SR4.25229@fx43.iad>
<sql2cm$3h7$1@dont-email.me> <sqmsqq$14kp$1@gioia.aioe.org>
<VSFzJ.136700$7D4.47834@fx37.iad>
<2021Dec31.203710@mips.complang.tuwien.ac.at>
<KC_zJ.59028$Ak2.12921@fx20.iad> <86h7agvxun.fsf@linuxsc.com>
<M4_BJ.140002$lz3.547@fx34.iad>
<f91f3db8-640e-4c10-b0f7-61c7085b70c8n@googlegroups.com>
<srag0i$2ed$2@dont-email.me>
<00add816-93d7-4763-a68b-33a67db6d770n@googlegroups.com>
<2022Jan8.101413@mips.complang.tuwien.ac.at>
<7557bf3a-61ce-4500-8cf8-ced2dbed7087n@googlegroups.com>
<ad2ee700-b604-4565-9e24-3386580b90c8n@googlegroups.com>
<4d2fbc82-af69-4388-bfa5-e3b2be652744n@googlegroups.com>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 12 Jan 2022 10:22:30 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ab96b79c4a9091c311615ffdd74dde20";
logging-data="20179"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18og7doS7ItY+KNvlRMpNyQL5Pj9Y1wddg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Cancel-Lock: sha1:yXCDWgMnTgC+HGvEG8A8a88HiIg=
In-Reply-To: <850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com>
Content-Language: en-US
 by: Marcus - Wed, 12 Jan 2022 10:22 UTC

On 2022-01-10, Quadibloc wrote:
> On Saturday, January 8, 2022 at 6:16:14 PM UTC-7, MitchAlsup wrote:
>
>> So, what does (13 << -7) mean ?
>
> From the replies, I see that this is a completely different
> can of worms. I would tend to favor the VAX interpretation,
> but it's unclear to me that it would be worth the extra
> run-time overhead that it might imply.

Yeah, I once considered that interpretation for MRISC32, but then
discovered that there are a lot of cases that need to be handled
(sign, left-shift overflow, right-shift overflow with/without sign),
plus you need to consider the full value range (32/64 bits) as opposed
to just the LSB:s (5/6 bits). And then there are legitimate use cases
for "the other" interpretation (masking out the 5/6 LSB:s), too.

In the end it made sense to go with the simplest solution since that is
what compilers are used to dealing with, and C programmers can not rely
on the behavior either way.

>
> John Savard
>

Re: RISC-V vs. Aarch64

<5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:624:: with SMTP id a4mr1553821qvx.127.1642022679391;
Wed, 12 Jan 2022 13:24:39 -0800 (PST)
X-Received: by 2002:a05:6808:ecc:: with SMTP id q12mr6550964oiv.122.1642022679021;
Wed, 12 Jan 2022 13:24:39 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 12 Jan 2022 13:24:38 -0800 (PST)
In-Reply-To: <850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:ec67:afd7:3575:2aeb;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:ec67:afd7:3575:2aeb
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <sqkcvk$n97$1@dont-email.me>
<RrlzJ.130558$SR4.25229@fx43.iad> <sql2cm$3h7$1@dont-email.me>
<sqmsqq$14kp$1@gioia.aioe.org> <VSFzJ.136700$7D4.47834@fx37.iad>
<2021Dec31.203710@mips.complang.tuwien.ac.at> <KC_zJ.59028$Ak2.12921@fx20.iad>
<86h7agvxun.fsf@linuxsc.com> <M4_BJ.140002$lz3.547@fx34.iad>
<f91f3db8-640e-4c10-b0f7-61c7085b70c8n@googlegroups.com> <srag0i$2ed$2@dont-email.me>
<00add816-93d7-4763-a68b-33a67db6d770n@googlegroups.com> <2022Jan8.101413@mips.complang.tuwien.ac.at>
<7557bf3a-61ce-4500-8cf8-ced2dbed7087n@googlegroups.com> <ad2ee700-b604-4565-9e24-3386580b90c8n@googlegroups.com>
<4d2fbc82-af69-4388-bfa5-e3b2be652744n@googlegroups.com> <2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com> <850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com>
Subject: Re: RISC-V vs. Aarch64
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 12 Jan 2022 21:24:39 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 12
 by: MitchAlsup - Wed, 12 Jan 2022 21:24 UTC

On Monday, January 10, 2022 at 11:36:01 AM UTC-6, Quadibloc wrote:
> On Saturday, January 8, 2022 at 6:16:14 PM UTC-7, MitchAlsup wrote:
>
> > So, what does (13 << -7) mean ?
> From the replies, I see that this is a completely different
> can of worms. I would tend to favor the VAX interpretation,
> but it's unclear to me that it would be worth the extra
> run-time overhead that it might imply.
<
The VAX interpretation does not allow for shifts to be used as
bit-manipulation instructions (extract signed and unsigned).
>
> John Savard

Re: RISC-V vs. Aarch64

<srnkf0$4cb$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: RISC-V vs. Aarch64
Date: Wed, 12 Jan 2022 14:24:33 -0800
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <srnkf0$4cb$1@dont-email.me>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<sqkcvk$n97$1@dont-email.me> <RrlzJ.130558$SR4.25229@fx43.iad>
<sql2cm$3h7$1@dont-email.me> <sqmsqq$14kp$1@gioia.aioe.org>
<VSFzJ.136700$7D4.47834@fx37.iad>
<2021Dec31.203710@mips.complang.tuwien.ac.at>
<KC_zJ.59028$Ak2.12921@fx20.iad> <86h7agvxun.fsf@linuxsc.com>
<M4_BJ.140002$lz3.547@fx34.iad>
<f91f3db8-640e-4c10-b0f7-61c7085b70c8n@googlegroups.com>
<srag0i$2ed$2@dont-email.me>
<00add816-93d7-4763-a68b-33a67db6d770n@googlegroups.com>
<2022Jan8.101413@mips.complang.tuwien.ac.at>
<7557bf3a-61ce-4500-8cf8-ced2dbed7087n@googlegroups.com>
<ad2ee700-b604-4565-9e24-3386580b90c8n@googlegroups.com>
<4d2fbc82-af69-4388-bfa5-e3b2be652744n@googlegroups.com>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com>
<5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 12 Jan 2022 22:24:32 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c7e2bc44b0794114269baea5ae44fac3";
logging-data="4491"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18N53gaPd03G9fAOTLXQzk3"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:yrSUzTNz0jrxG8zUb/GpRQ/gTWk=
In-Reply-To: <5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com>
Content-Language: en-US
 by: Ivan Godard - Wed, 12 Jan 2022 22:24 UTC

On 1/12/2022 1:24 PM, MitchAlsup wrote:
> On Monday, January 10, 2022 at 11:36:01 AM UTC-6, Quadibloc wrote:
>> On Saturday, January 8, 2022 at 6:16:14 PM UTC-7, MitchAlsup wrote:
>>
>>> So, what does (13 << -7) mean ?
>> From the replies, I see that this is a completely different
>> can of worms. I would tend to favor the VAX interpretation,
>> but it's unclear to me that it would be worth the extra
>> run-time overhead that it might imply.
> <
> The VAX interpretation does not allow for shifts to be used as
> bit-manipulation instructions (extract signed and unsigned).

That turns into a rotate and a shft right. But isn't that what a
hardware EXTR is going to do anyway?

Re: RISC-V vs. Aarch64

<b4e98991-4fb9-4ef7-a831-430c3fc10145n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:2301:: with SMTP id gc1mr1850234qvb.24.1642027567086;
Wed, 12 Jan 2022 14:46:07 -0800 (PST)
X-Received: by 2002:a4a:270d:: with SMTP id l13mr1140225oof.5.1642027566765;
Wed, 12 Jan 2022 14:46:06 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 12 Jan 2022 14:46:06 -0800 (PST)
In-Reply-To: <srnkf0$4cb$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:ec67:afd7:3575:2aeb;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:ec67:afd7:3575:2aeb
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <sqkcvk$n97$1@dont-email.me>
<RrlzJ.130558$SR4.25229@fx43.iad> <sql2cm$3h7$1@dont-email.me>
<sqmsqq$14kp$1@gioia.aioe.org> <VSFzJ.136700$7D4.47834@fx37.iad>
<2021Dec31.203710@mips.complang.tuwien.ac.at> <KC_zJ.59028$Ak2.12921@fx20.iad>
<86h7agvxun.fsf@linuxsc.com> <M4_BJ.140002$lz3.547@fx34.iad>
<f91f3db8-640e-4c10-b0f7-61c7085b70c8n@googlegroups.com> <srag0i$2ed$2@dont-email.me>
<00add816-93d7-4763-a68b-33a67db6d770n@googlegroups.com> <2022Jan8.101413@mips.complang.tuwien.ac.at>
<7557bf3a-61ce-4500-8cf8-ced2dbed7087n@googlegroups.com> <ad2ee700-b604-4565-9e24-3386580b90c8n@googlegroups.com>
<4d2fbc82-af69-4388-bfa5-e3b2be652744n@googlegroups.com> <2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com> <850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com>
<5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com> <srnkf0$4cb$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b4e98991-4fb9-4ef7-a831-430c3fc10145n@googlegroups.com>
Subject: Re: RISC-V vs. Aarch64
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 12 Jan 2022 22:46:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 48
 by: MitchAlsup - Wed, 12 Jan 2022 22:46 UTC

On Wednesday, January 12, 2022 at 4:24:36 PM UTC-6, Ivan Godard wrote:
> On 1/12/2022 1:24 PM, MitchAlsup wrote:
> > On Monday, January 10, 2022 at 11:36:01 AM UTC-6, Quadibloc wrote:
> >> On Saturday, January 8, 2022 at 6:16:14 PM UTC-7, MitchAlsup wrote:
> >>
> >>> So, what does (13 << -7) mean ?
> >> From the replies, I see that this is a completely different
> >> can of worms. I would tend to favor the VAX interpretation,
> >> but it's unclear to me that it would be worth the extra
> >> run-time overhead that it might imply.
> > <
> > The VAX interpretation does not allow for shifts to be used as
> > bit-manipulation instructions (extract signed and unsigned).
<
> That turns into a rotate and a shft right. But isn't that what a
> hardware EXTR is going to do anyway?
<
Technically an extract is:
<
r = ((c << (containerWidth - fieldWidth - offset)) >> (containerWidth-fieldWidth));
<
However, what we do in HW is:
<
m = tableM[fieldWidth]; // mask m:: often done with table
s = ~0u << (fieldWidth+offset); // sign extension bits :: often done with table
t = (c >> offset) & m | ( signed || (c & ( 1 << (fieldWidth+offset)) ? s : 0);
<
as this uses 1 shifter and either tables or greater-than decoders.
<
But the part I was hinting at is that we have a large container for this shift
count and we need only a few bits on one end. So, in My 66000, the upper ½
of the container is allowed to contain a value 0..64 (where both 0 and 64
mean 64-bit field width).
<
Done this way, shifts are degenerate subsets of EXT.
<
If you use the sign bit<63> to control shift direction, you probably should not
be using bits<37:32> as the field width because pasting the fieldWidth into
such a container is simply harder.
<
I learned the hard way about placing both containers too close together
in the Mc 88100.

Re: RISC-V vs. Aarch64

<srnrkk$2d4b$1@gal.iecc.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: joh...@taugh.com (John Levine)
Newsgroups: comp.arch
Subject: Re: RISC-V vs. Aarch64
Date: Thu, 13 Jan 2022 00:27:00 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <srnrkk$2d4b$1@gal.iecc.com>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com> <850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com> <5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com>
Injection-Date: Thu, 13 Jan 2022 00:27:00 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="78987"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <2021Dec24.163843@mips.complang.tuwien.ac.at> <570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com> <850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com> <5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Thu, 13 Jan 2022 00:27 UTC

According to MitchAlsup <MitchAlsup@aol.com>:
>On Monday, January 10, 2022 at 11:36:01 AM UTC-6, Quadibloc wrote:
>> On Saturday, January 8, 2022 at 6:16:14 PM UTC-7, MitchAlsup wrote:
>>
>> > So, what does (13 << -7) mean ?
>> From the replies, I see that this is a completely different
>> can of worms. I would tend to favor the VAX interpretation,
>> but it's unclear to me that it would be worth the extra
>> run-time overhead that it might imply.
><
>The VAX interpretation does not allow for shifts to be used as
>bit-manipulation instructions (extract signed and unsigned).

Why would you care, since it had bit aligned extract, insert, and
compare instructions, that took a base address, size, and bit offset
as separate operands.

Dunno if compilers ever generated them.

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: RISC-V vs. Aarch64

<c55d7d9a-823f-46b1-859f-f940b2c209e0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5c11:: with SMTP id i17mr1859200qti.669.1642034523679;
Wed, 12 Jan 2022 16:42:03 -0800 (PST)
X-Received: by 2002:a9d:2784:: with SMTP id c4mr1563832otb.85.1642034523344;
Wed, 12 Jan 2022 16:42:03 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 12 Jan 2022 16:42:03 -0800 (PST)
In-Reply-To: <srnrkk$2d4b$1@gal.iecc.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:ec67:afd7:3575:2aeb;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:ec67:afd7:3575:2aeb
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com> <5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com>
<srnrkk$2d4b$1@gal.iecc.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c55d7d9a-823f-46b1-859f-f940b2c209e0n@googlegroups.com>
Subject: Re: RISC-V vs. Aarch64
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 13 Jan 2022 00:42:03 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 24
 by: MitchAlsup - Thu, 13 Jan 2022 00:42 UTC

On Wednesday, January 12, 2022 at 6:27:03 PM UTC-6, John Levine wrote:
> According to MitchAlsup <Mitch...@aol.com>:
> >On Monday, January 10, 2022 at 11:36:01 AM UTC-6, Quadibloc wrote:
> >> On Saturday, January 8, 2022 at 6:16:14 PM UTC-7, MitchAlsup wrote:
> >>
> >> > So, what does (13 << -7) mean ?
> >> From the replies, I see that this is a completely different
> >> can of worms. I would tend to favor the VAX interpretation,
> >> but it's unclear to me that it would be worth the extra
> >> run-time overhead that it might imply.
> ><
> >The VAX interpretation does not allow for shifts to be used as
> >bit-manipulation instructions (extract signed and unsigned).
<
> Why would you care, since it had bit aligned extract, insert, and
> compare instructions, that took a base address, size, and bit offset
> as separate operands.
<
Conservation of instruction count in my own designs.
>
> Dunno if compilers ever generated them.
> --
> Regards,
> John Levine, jo...@taugh.com, Primary Perpetrator of "The Internet for Dummies",
> Please consider the environment before reading this e-mail. https://jl.ly

Re: shift activities, RISC-V vs. Aarch64

<sro6cm$s32$1@gal.iecc.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: joh...@taugh.com (John Levine)
Newsgroups: comp.arch
Subject: Re: shift activities, RISC-V vs. Aarch64
Date: Thu, 13 Jan 2022 03:30:30 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <sro6cm$s32$1@gal.iecc.com>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at> <059bfacc-461a-4bdc-b53a-ab0009356897n@googlegroups.com> <srkpgp$2a2o$1@gal.iecc.com> <srkpq9$fks$1@dont-email.me>
Injection-Date: Thu, 13 Jan 2022 03:30:30 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="28770"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <2021Dec24.163843@mips.complang.tuwien.ac.at> <059bfacc-461a-4bdc-b53a-ab0009356897n@googlegroups.com> <srkpgp$2a2o$1@gal.iecc.com> <srkpq9$fks$1@dont-email.me>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Thu, 13 Jan 2022 03:30 UTC

It appears that Ivan Godard <ivan@millcomputing.com> said:
>> [ why the PDP-6 used a 9 bit shift count ]
>>> 64-bits (2 registers) is 6-bits 7-bits when signed
>>> Why 9-bits ?
>>
>> The PDP-10 was 36 bits so a two-word value was 72 bits.
>>
>> Dunno why it was 9 bits rather than 8 and I am pretty sure
>> everyone who knew has died. As likely as not it was some
>> quirk of the way the PDP-6 was implemented.
>
>Character addressing on a 36-bit machine: 4x9=36. Earliest had 6-bit
>chars but that was already understood as wrong.

That's not how the PDP-6 worked. The only addresses were word addresses.
It had a full set of halfword instructions but which halfword was encoded
in the instruction, e.g. HLRZ halfword left to right and zero the other
half, which did a Lisp CDR.

For byte handling, it had byte pointers with the six bit byte size and
bit offset fields at the top of the pointer word, and the rest was the
word address with optional and little used indirect and index fields.
LDB and DBP loaded or deposited a byte from a register into the byte
the pointer pointed to, IBP incremented a pointer to the next byte, in
the next word if need be, and ILDB and IDBP incremented and then
loaded or stored. Any byte size from 1 bit to 36 worked equally well.

In practice text files were stored as 7-bit ASCII, 5 characters to the
word, null characters allowed for padding and ignored. The low bit was
a flag that the five characters were a decimal line number not
logically part of the line.

Later versions of the DEC-20 added microcoded string operations but the
pointer format was the same.

So anyway, nine bits? Naah.
--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: RISC-V vs. Aarch64

<srp3n0$e0a$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: RISC-V vs. Aarch64
Date: Thu, 13 Jan 2022 03:50:56 -0800
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <srp3n0$e0a$1@dont-email.me>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<RrlzJ.130558$SR4.25229@fx43.iad> <sql2cm$3h7$1@dont-email.me>
<sqmsqq$14kp$1@gioia.aioe.org> <VSFzJ.136700$7D4.47834@fx37.iad>
<2021Dec31.203710@mips.complang.tuwien.ac.at>
<KC_zJ.59028$Ak2.12921@fx20.iad> <86h7agvxun.fsf@linuxsc.com>
<M4_BJ.140002$lz3.547@fx34.iad>
<f91f3db8-640e-4c10-b0f7-61c7085b70c8n@googlegroups.com>
<srag0i$2ed$2@dont-email.me>
<00add816-93d7-4763-a68b-33a67db6d770n@googlegroups.com>
<2022Jan8.101413@mips.complang.tuwien.ac.at>
<7557bf3a-61ce-4500-8cf8-ced2dbed7087n@googlegroups.com>
<ad2ee700-b604-4565-9e24-3386580b90c8n@googlegroups.com>
<4d2fbc82-af69-4388-bfa5-e3b2be652744n@googlegroups.com>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com>
<5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com>
<srnkf0$4cb$1@dont-email.me>
<b4e98991-4fb9-4ef7-a831-430c3fc10145n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 13 Jan 2022 11:50:57 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="6046e23aa8f48c74d77f2fb73876c0cc";
logging-data="14346"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ecttduBzWcNUR6BhzxtkJ"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:qHHTpYXstYd0dmu5owNgRTytQVM=
In-Reply-To: <b4e98991-4fb9-4ef7-a831-430c3fc10145n@googlegroups.com>
Content-Language: en-US
 by: Ivan Godard - Thu, 13 Jan 2022 11:50 UTC

On 1/12/2022 2:46 PM, MitchAlsup wrote:
> On Wednesday, January 12, 2022 at 4:24:36 PM UTC-6, Ivan Godard wrote:
>> On 1/12/2022 1:24 PM, MitchAlsup wrote:
>>> On Monday, January 10, 2022 at 11:36:01 AM UTC-6, Quadibloc wrote:
>>>> On Saturday, January 8, 2022 at 6:16:14 PM UTC-7, MitchAlsup wrote:
>>>>
>>>>> So, what does (13 << -7) mean ?
>>>> From the replies, I see that this is a completely different
>>>> can of worms. I would tend to favor the VAX interpretation,
>>>> but it's unclear to me that it would be worth the extra
>>>> run-time overhead that it might imply.
>>> <
>>> The VAX interpretation does not allow for shifts to be used as
>>> bit-manipulation instructions (extract signed and unsigned).
> <
>> That turns into a rotate and a shft right. But isn't that what a
>> hardware EXTR is going to do anyway?
> <
> Technically an extract is:
> <
> r = ((c << (containerWidth - fieldWidth - offset)) >> (containerWidth-fieldWidth));
> <
> However, what we do in HW is:
> <
> m = tableM[fieldWidth]; // mask m:: often done with table
> s = ~0u << (fieldWidth+offset); // sign extension bits :: often done with table
> t = (c >> offset) & m | ( signed || (c & ( 1 << (fieldWidth+offset)) ? s : 0);
> <
> as this uses 1 shifter and either tables or greater-than decoders.
> <
> But the part I was hinting at is that we have a large container for this shift
> count and we need only a few bits on one end. So, in My 66000, the upper ½
> of the container is allowed to contain a value 0..64 (where both 0 and 64
> mean 64-bit field width).
> <
> Done this way, shifts are degenerate subsets of EXT.
> <
> If you use the sign bit<63> to control shift direction, you probably should not
> be using bits<37:32> as the field width because pasting the fieldWidth into
> such a container is simply harder.
> <
> I learned the hard way about placing both containers too close together
> in the Mc 88100.

Hmm. So the container is a field descriptor. But it's not actually a
bitRow, because it can't cross word boundaries - more like a PDP-10 PLT
IIRC. Gives you some encoding entropy, but not actually any new
semantic, and you have to build the descriptor, which you avoid when
offset and width are separate arguments.

Where ISAs really fall down is parsing a bit stream: grab a dynamic
number of bits off the front of a bit stream, advancing the stream; word
boundaries are not significant. The problem is that HW provides word
streams (loop/load) and mapping that to a bit stream is nasty. The logic
is the same as mapping a line stream into a (VL) instruction stream in
the decoder's instruction buffer, but how to represent that in an ISA?

Re: RISC-V vs. Aarch64

<srp4lu$hhg$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!To5nvU/sTaigmVbgRJ05pQ.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: RISC-V vs. Aarch64
Date: Thu, 13 Jan 2022 13:07:25 +0100
Organization: Aioe.org NNTP Server
Message-ID: <srp4lu$hhg$1@gioia.aioe.org>
References: <2021Dec24.163843@mips.complang.tuwien.ac.at>
<sql2cm$3h7$1@dont-email.me> <sqmsqq$14kp$1@gioia.aioe.org>
<VSFzJ.136700$7D4.47834@fx37.iad>
<2021Dec31.203710@mips.complang.tuwien.ac.at>
<KC_zJ.59028$Ak2.12921@fx20.iad> <86h7agvxun.fsf@linuxsc.com>
<M4_BJ.140002$lz3.547@fx34.iad>
<f91f3db8-640e-4c10-b0f7-61c7085b70c8n@googlegroups.com>
<srag0i$2ed$2@dont-email.me>
<00add816-93d7-4763-a68b-33a67db6d770n@googlegroups.com>
<2022Jan8.101413@mips.complang.tuwien.ac.at>
<7557bf3a-61ce-4500-8cf8-ced2dbed7087n@googlegroups.com>
<ad2ee700-b604-4565-9e24-3386580b90c8n@googlegroups.com>
<4d2fbc82-af69-4388-bfa5-e3b2be652744n@googlegroups.com>
<2e706405-006a-49bb-8e8a-f634d749205en@googlegroups.com>
<570acc73-a5da-497f-8ec4-810150e0a9f1n@googlegroups.com>
<850b7681-204a-4df6-9095-cd6ee816a7d5n@googlegroups.com>
<5ea00397-5572-4fbd-bfb3-85c3554f1eb9n@googlegroups.com>
<srnkf0$4cb$1@dont-email.me>
<b4e98991-4fb9-4ef7-a831-430c3fc10145n@googlegroups.com>
<srp3n0$e0a$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="17968"; posting-host="To5nvU/sTaigmVbgRJ05pQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.10.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Thu, 13 Jan 2022 12:07 UTC

Ivan Godard wrote:
> On 1/12/2022 2:46 PM, MitchAlsup wrote:
>> On Wednesday, January 12, 2022 at 4:24:36 PM UTC-6, Ivan Godard wrote:
>>> On 1/12/2022 1:24 PM, MitchAlsup wrote:
>>>> On Monday, January 10, 2022 at 11:36:01 AM UTC-6, Quadibloc wrote:
>>>>> On Saturday, January 8, 2022 at 6:16:14 PM UTC-7, MitchAlsup wrote:
>>>>>
>>>>>> So, what does (13 << -7) mean ?
>>>>>  From the replies, I see that this is a completely different
>>>>> can of worms. I would tend to favor the VAX interpretation,
>>>>> but it's unclear to me that it would be worth the extra
>>>>> run-time overhead that it might imply.
>>>> <
>>>> The VAX interpretation does not allow for shifts to be used as
>>>> bit-manipulation instructions (extract signed and unsigned).
>> <
>>> That turns into a rotate and a shft right. But isn't that what a
>>> hardware EXTR is going to do anyway?
>> <
>> Technically an extract is:
>> <
>>         r = ((c << (containerWidth - fieldWidth - offset)) >>
>> (containerWidth-fieldWidth));
>> <
>> However, what we do in HW is:
>> <
>>         m = tableM[fieldWidth];              // mask m:: often done
>> with table
>>         s = ~0u << (fieldWidth+offset); // sign extension bits ::
>> often done with table
>>         t = (c >> offset) & m | ( signed || (c & ( 1 <<
>> (fieldWidth+offset)) ? s : 0);
>> <
>> as this uses 1 shifter and either tables or greater-than decoders.
>> <
>> But the part I was hinting at is that we have a large container for
>> this shift
>> count and we need only a few bits on one end. So, in My 66000, the
>> upper ½
>> of the container is allowed to contain a value 0..64 (where both 0 and 64
>> mean 64-bit field width).
>> <
>> Done this way, shifts are degenerate subsets of EXT.
>> <
>> If you use the sign bit<63> to control shift direction, you probably
>> should not
>> be using bits<37:32> as the field width because pasting the fieldWidth
>> into
>> such a container is simply harder.
>> <
>> I learned the hard way about placing both containers too close together
>> in the Mc 88100.
>
> Hmm. So the container is a field descriptor. But it's not actually a
> bitRow, because it can't cross word boundaries - more like a PDP-10 PLT
> IIRC. Gives you some encoding entropy, but not actually any new
> semantic, and you have to build the descriptor, which you avoid when
> offset and width are separate arguments.
>
> Where ISAs really fall down is parsing a bit stream: grab a dynamic
> number of bits off the front of a bit stream, advancing the stream; word
> boundaries are not significant. The problem is that HW provides word
> streams (loop/load) and mapping that to a bit stream is nasty. The logic
> is the same as mapping a line stream into a (VL) instruction stream in
> the decoder's instruction buffer, but how to represent that in an ISA?

We did use to have something like that back in the PDP days with the
variable-sized load byte opcode that would automatically step forward to
the next work if needed.

Today we would need a separate hw mechanism for that bitstream buffer,
and probably a filling mechanism which either would need to be
hardware-only or possibly a FILL_IF_ROOM target,offs,[src] opcode that
would load the next (8/16/32 bits into the target register at offs bit
offset, updating the OFFS reg and SRC pointer, but only if there was
room, otherwise it is a NOP. The main problem is the need to update all
three register operands. :-(

Having it would however make it far easier to handle arbitrary bit
streams, avoiding the current need for branchy code.

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Pages:123456789101112131415
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor