Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Being against torture ought to be sort of a bipartisan thing." -- Karl Lehenbauer


devel / comp.arch / Re: Around the bike shed: Instruction names and assembler syntax

SubjectAuthor
* Around the bike shed: Instruction names and assembler syntaxThomas Koenig
+- Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
+* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|+- Re: Around the bike shed: Instruction names and assembler syntaxStephen Fuld
|+* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
||`* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|| `* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
||  `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
||   +* Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
||   |`- Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
||   `* Fortran for The Mill (was: Around the bike shed: Instruction namesThomas Koenig
||    `- Re: Fortran for The Mill (was: Around the bike shed: InstructionIvan Godard
|`* Re: Around the bike shed: Instruction names and assembler syntaxJohn Levine
| +- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
| +* Re: Around the bike shed: Instruction names and assembler syntaxEricP
| |`* Re: Around the bike shed: Instruction names and assembler syntaxJohn Levine
| | `* Re: Around the bike shed: Instruction names and assembler syntaxEricP
| |  `- Re: high and higner level assemblers, was Around the bike shed: Instruction nameJohn Levine
| `* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|  `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|   `* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|    `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|     `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      +* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |  `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |   +- Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|      |   `* Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|      |    +- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |    `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |     `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |      `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |       `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |        `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |         +* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |         |+* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|      |         ||+* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |         |||`* Re: Around the bike shed: Instruction names and assembler syntaxJohn Levine
|      |         ||| +- Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|      |         ||| `- Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |         ||`- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |         |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |         | `- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |         `* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |          +* Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|      |          |`- Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |          `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |           +- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |           `* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |            `- Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|      +* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|      |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | +* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | |+* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|      | ||`* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | || +- Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|      | || `* Re: Around the bike shed: Instruction names and assembler syntaxJohn Levine
|      | ||  `- Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|      | |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | | `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | |  `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | |   `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | |    `- Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|      | +- Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|      | +* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|      | |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | | `- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | `* Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|      |  `- Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|      `* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|       +* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|       |`* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|       | `* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|       |  +* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  |+* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||+* Re: Around the bike shed: Instruction names and assembler syntaxEricP
|       |  |||+- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  |||`* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|       |  ||| +* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| |+* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|       |  ||| ||+* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| |||`* Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|       |  ||| ||| +- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| ||| `- Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|       |  ||| ||`* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||| || `* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|       |  ||| ||  +* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||| ||  |`* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| ||  | `* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||| ||  |  `- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| ||  `- Re: Around the bike shed: Instruction names and assembler syntaxEricP
|       |  ||| |+- Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|       |  ||| |`- Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||| `- Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||+- Re: Around the bike shed: Instruction names and assembler syntaxStephen Fuld
|       |  ||+* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  |||+* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|       |  ||||`* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  |||| +* Re: Around the bike shed: Instruction names and assembler syntaxTom Gardner
|       |  |||| |+* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  |||| |`- Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|       |  |||| `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  |||`- Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|       |  ||`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|       |  |`- Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|       |  `- Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|       +* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|       `* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
+- Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
+* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
+* Re: Around the bike shed: Instruction names and assembler syntaxJames Van Buskirk
+- Re: Around the bike shed: Instruction names and assembler syntaxBGB
`* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig

Pages:12345678910
Re: Around the bike shed: Instruction names and assembler syntax

<4a37cb55-70ff-401b-9ec5-fb7edde9fab5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5dca:0:b0:2de:57d8:7a89 with SMTP id e10-20020ac85dca000000b002de57d87a89mr28681382qtx.635.1646326883430;
Thu, 03 Mar 2022 09:01:23 -0800 (PST)
X-Received: by 2002:aca:3053:0:b0:2bf:87da:9963 with SMTP id
w80-20020aca3053000000b002bf87da9963mr5361336oiw.157.1646326880679; Thu, 03
Mar 2022 09:01:20 -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: Thu, 3 Mar 2022 09:01:20 -0800 (PST)
In-Reply-To: <svqd2i$s6d$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:3de0:ba8f:3b3:e7eb;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:3de0:ba8f:3b3:e7eb
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <svd280$fiv$1@dont-email.me>
<svh2tg$j53$1@gal.iecc.com> <svj2ki$q0p$4@newsreader4.netcologne.de>
<svjblm$idv$1@dont-email.me> <j8666pFh0klU1@mid.individual.net>
<svl27r$r8m$1@dont-email.me> <2022Mar1.133629@mips.complang.tuwien.ac.at>
<svnjsl$qpu$1@newsreader4.netcologne.de> <2022Mar2.184051@mips.complang.tuwien.ac.at>
<svoejm$89e$1@dont-email.me> <svq7eh$int$1@newsreader4.netcologne.de> <svqd2i$s6d$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4a37cb55-70ff-401b-9ec5-fb7edde9fab5n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 03 Mar 2022 17:01:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 38
 by: MitchAlsup - Thu, 3 Mar 2022 17:01 UTC

On Thursday, March 3, 2022 at 6:41:58 AM UTC-6, Ivan Godard wrote:
> On 3/3/2022 3:05 AM, Thomas Koenig wrote:
> > Ivan Godard <iv...@millcomputing.com> schrieb:
> >> On 3/2/2022 9:40 AM, Anton Ertl wrote:
> >>> Thomas Koenig <tko...@netcologne.de> writes:
> >>>> Anton Ertl <an...@mips.complang.tuwien.ac.at> schrieb:
> >>>>> Ivan Godard <iv...@millcomputing.com> writes:
> >>>>>> Declarable (!) precedence was a disaster
> >>>>>> in A68 - what's the precedence of left circular shift?
> >>>>>
> >>>>> IMO the general concept of precedence is a disaster. You can do
> >>>>> implicit parenthesizing between well-established pairs of operators
> >>>>> (e.g., a+b*c,
> >>>>
> >>>> You should.
> >>>>
> >>>> FORTRAN pretty much settled this question. Evaluating a formula
> >>>> in any other way is a desaster.
> >>>
> >>> What disaster would ensue from not accepting a+b*c and instead
> >>> requiring a+(b*c)? However, it seems to me that the relative
> >>> precedences of + and * and widely-enough known that accepting a+b*c
> >>> instead does not cause problems.
> >>
> >> Well, if we are going to match mathematic practice that should be
> >> "a+bc"; there have been historical efforts toward that sort of thing.
<
It is about time that programming languages use the multiply symbol
× instead of the * symbol. Even x×x parses with the eye.
<
> >
> > Restricting the user to single-letter variables would not be such
> > a great idea, I think.
> Was highly successful in the original BASIC.
<
Would work great in a 10,000,000 line program !

Re: Around the bike shed: Instruction names and assembler syntax

<e348105a-d9c8-4dda-a843-14e403ad804fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:15c1:b0:649:1a2b:4850 with SMTP id o1-20020a05620a15c100b006491a2b4850mr89506qkm.525.1646327255821;
Thu, 03 Mar 2022 09:07:35 -0800 (PST)
X-Received: by 2002:a05:6870:c888:b0:d4:43c3:ed64 with SMTP id
er8-20020a056870c88800b000d443c3ed64mr4889200oab.110.1646327254287; Thu, 03
Mar 2022 09:07:34 -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: Thu, 3 Mar 2022 09:07:34 -0800 (PST)
In-Reply-To: <Uy4UJ.91086$Lbb6.86739@fx45.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:3de0:ba8f:3b3:e7eb;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:3de0:ba8f:3b3:e7eb
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<oLf*yP-Hy@news.chiark.greenend.org.uk> <svprsc$buf$1@newsreader4.netcologne.de>
<2022Mar3.130732@mips.complang.tuwien.ac.at> <Uy4UJ.91086$Lbb6.86739@fx45.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e348105a-d9c8-4dda-a843-14e403ad804fn@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 03 Mar 2022 17:07:35 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 74
 by: MitchAlsup - Thu, 3 Mar 2022 17:07 UTC

On Thursday, March 3, 2022 at 8:48:23 AM UTC-6, EricP wrote:
> Anton Ertl wrote:
> > Thomas Koenig <tko...@netcologne.de> writes:
> >> As written elsethread, both ARM and IBM deprecated multiple store
> >> and load instructions - ARM by not including them in aarch64, IBM
> >> by restricting them in POWER to 32-bit size and to big-endian only.
> >> In other words, legacy code. POWER9 microcodes it, which incurs
> >> a significant penalty. Mitch explained that it is less a burden
> >> to his My 66000 implementations.
> >>
> >> aarch64 has load and store double instead.
> > ....
> >> Use in a function body is much harder (depending on what exactly
> >> is in the ISA). If you can load/store regiters up to the maximum
> >> register number that you have (POWER) or a register range (My
> >> 66000), you would have to work your whole register allocation
> >> around the load/store multiple instruction. This would be
> >> rather inconvenient, and I suspect that compilers would not use
> >> it.
> >
> > I have certainly seen quite a few load-pair and store-pair
> > instructions in gcc-generated Aarch64 code outside function
> > prologue/epilogue:
> >
> > In the 6008 lines of output from "objdump -d
> > engine/engine-fast-ll-reg.o" (pretty much a single large function),
> > ldp occurs 133 times (among them 24 accesses through sp) and stp
> > occurs 76 times (17 accesses through sp). The accesses through sp are
> > probably around function calls, the others are other pairwise accesses
> > that the compiler could combine.
> >
> > So I expect that efficient load-multiple or store-multiple
> > instructions would also be used by gcc; the question is how often
> > there would be cases with more than two registers. Apparently not
> > enough to make the Aarch64 architects add instructions for that.
> >
> > The benefit of the load-pair and store-pair instructions over a pair
> > of loads/stores is that they reduce load/store-unit contention; of
> > course, the RISC-V answer to that is that the decoder can combine such
> > a pair into one pairwise micro-instruction.
> The register save set size sets the minimum width of a number of resources,
> the number of register read and write ports,
> width that LSQ should handle including store-load forwarding.
> With LDP/STP 2*64 it should not be a hardship even for a minimal
> implementation.
>
> For LDM/STM to run at full speed it would need to operate on a
> full 64B cache line, 8 register wide datapath to/from memory. That's
> - 8 read ports on the rename tables
<
A 6-wide machine already has 12-14 of these ports.
<
> - 8 read and 8 write register file ports
<
A 6-wide reservation station machine already has 12-14 of these
<
> - 8 operand buses to LSQ, store-load forwarding,
<
A 6-wide machine already has 12-read 6-write.
<
> (possibly also internally forwarding withing the LSQ itself)
> and input operand forwarding from FU results
> - 8 result buses from LSQ, with output forwarding
<
A 6-wide machine already has 6 of these.
<
> (plus possibly internal forwarding withing the LSQ itself)
> - 512 bit datapath to/from cache with alignment shifters for line straddles.
<
You are suggesting that these instructions occupy 1 instruction
in the stream, and are issued with another 5 instructions which
are completely dependent on the completion of the LDM or STM.
>
> and it would still need some kind of microcode sequencer for
> when there was more than 8 save/restore registers in a set.

Re: Around the bike shed: Instruction names and assembler syntax

<655625c3-424f-4da5-a925-75715a14b1a2n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:6cd:0:b0:47d:5b9a:122d with SMTP id 196-20020a3706cd000000b0047d5b9a122dmr106948qkg.717.1646327573881;
Thu, 03 Mar 2022 09:12:53 -0800 (PST)
X-Received: by 2002:a05:6830:2428:b0:590:8005:5d01 with SMTP id
k8-20020a056830242800b0059080055d01mr19360656ots.350.1646327573662; Thu, 03
Mar 2022 09:12:53 -0800 (PST)
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!border1.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: Thu, 3 Mar 2022 09:12:53 -0800 (PST)
In-Reply-To: <2022Mar3.153038@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:3de0:ba8f:3b3:e7eb;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:3de0:ba8f:3b3:e7eb
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<2022Mar3.120929@mips.complang.tuwien.ac.at> <svqe93$1m4j$1@gioia.aioe.org> <2022Mar3.153038@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <655625c3-424f-4da5-a925-75715a14b1a2n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 03 Mar 2022 17:12:53 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 63
 by: MitchAlsup - Thu, 3 Mar 2022 17:12 UTC

On Thursday, March 3, 2022 at 9:09:34 AM UTC-6, Anton Ertl wrote:
> Terje Mathisen <terje.m...@tmsw.no> writes:
> >Anton Ertl wrote:
> >> And I don't think it's just the orthogonal features that can profit
> >> from this effect. However, I guess that the orthogonal features have
> >> additional honeypot potential because they are theoretically more
> >> widely useful than non-orthogonal features like the 8086s LODS
> >> instruction.
> >
> >Those original string ops on the 8088 were absolutely crucial, simply
> >because they allowed us to write extremely compact code.
> >
> >On a CPU where all bytes read or stored (including instruction bytes
> >which usually would dominate) would take 4 cycles, using those
> >single-byte opcodes with auto-increment/decrement was the difference
> >between "too slow" and "usable".
> I am wondering if this is a demonstration of the feeling of
> achievement that creates an attachment to these features.
>
> What was the proportion of these instructions in production code,
> statically and dynamically?
<
We found this to be an illusion early in RISC.
<
MOV *[SP-],R1
MOV *[SP-],R2
MOV *[SP-],R3
<
Would perform faster in a pipelined machine as:
<
ST R1,[SP]
ST R2,[SP+4]
ST R3,[SP+8]
SUB SP,SP,12
<
Now, instead of 3 instructions dependent on each other you have
4 instructions with no dependencies. It is the lack of dependencies
that clears the way to perform all of the STs in a single cycle.
>
> Looking at an example, here's a table of implementations of NEXT
> (virtual machine instruction dispatch) in various assembly languages:
>
> PDP-11 6809 8086 8086'
> next: mov (ip)+,w ldx ,y++ lods lods ax
> mov bx,ax mov bx,ax
> next1: jmp @(w)+ jmp [,x] mov dx,bx jmp word ptr[bx]
> inc dx
> jmp word ptr[bx]
>
> IP and W are aliases for PDP-11 registers; IP/Y/SI is the virtual
> machine instruction pointer.
>
> 8086 is what's in the table (originally from the fig-Forth listing,
> like the PDP-11 and the 6809 variants), 8086' is a cleaned-up version
> that does not pull stuff up from some of the possible jump targets.
>
> So we see here that the implicit registers of lods combined with the
> limitations of usable registers in the jmp conspire to require an
> additional mov instruction. Not sure if this really saves code size
> compared to the 6809 or PDP-11.
> - anton
> --
> 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
> Mitch Alsup, <c17fcd89-f024-40e7...@googlegroups.com>

Re: Around the bike shed: Instruction names and assembler syntax

<svr3l5$18b$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Thu, 3 Mar 2022 13:07:14 -0600
Organization: A noiseless patient Spider
Lines: 98
Message-ID: <svr3l5$18b$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de>
<nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 3 Mar 2022 19:07:17 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c8be40ab30704a686bce3661f550954b";
logging-data="1291"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+s/w0R2Yqtxzzv9FrSso9z"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:uEN0eShH4lkylZ5A3wAC5q2+CfA=
In-Reply-To: <lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com>
Content-Language: en-US
 by: BGB - Thu, 3 Mar 2022 19:07 UTC

On 3/3/2022 5:45 AM, aph@littlepinkcloud.invalid wrote:
> Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
>> On 3/2/2022 3:24 AM, aph@littlepinkcloud.invalid wrote:
>>> Theo Markettos <theom+news@chiark.greenend.org.uk> wrote:
>>>>
>>>> (32 bit ARM is interesting as it was designed to be nice to program
>>>> in assembly, a consideration not normally part of instruction set
>>>> design these days)
>>>
>>> That's an interesting point. In my experience 64-bit ARM is as nice to
>>> program in assembly, at least as far as the set of base instructions
>>> goes, even though there are more instructions.
>>>
>>> I also believe that if an instruction set is nice to program in
>>> assembly, it's also nice to write a code generator for.
>>
>> Wasn't one of the results from the studies of generated code,that
>> was used to justify RISC, that "nice to write assembly in" features
>> such as complex and orthogonal addressing modes just weren't used in
>> generated code?
>
> Are complex addressing modes nice to write assembly in, though? I've
> never found it to be so. I think the problem identified with IBM 370
> was that many of the addressing modes weren't being used by compilers
> or by hand-cranked code, but I can't find any data for that one way or
> the other.
>
> I can see the point of orthogonality, as long as it's not extended too
> far. Of course no-one actually wants to have to use, say, a dedicated
> pair of registers to do a multiply.
>

There is likely some room for debate here.
Some people seemingly consider anything much beyond (Rb,Disp) to be
complex...

IME, ranking is roughly:
(Rb,Disp):
Very common
(Rb,Ri):
Also very common (2nd place)
(Scale matches access size)
(Rb,Ri*Sc, Disp)
Uncommon, Harder to make use of.

Then, "danger zone":
@Rb+, @-Rb: Uncommon and requires an extra write port (1)
@+Rb, @Rb-: Likewise
@@Rb: Devil crap.
...

1: Though, in premise, these can map to C's "*ptr++" and "*--ptr" modes
and similar, the occurrence of "*ptr++" in C isn't common enough to
really justify having a dedicated instruction for it (when the increment
or decrement can often be run in parallel with another instruction).

While using PC or GBR or similar as a base register are useful, I will
not consider them as separate address modes. Depending on the ISA asd
ABI design, these may end up fairly common (namely for loading/storing
global variables).

Other semi-common cases are the ability to encode:
LEA (Rb, Disp), Rn //More Common
LEA.x (Rb, Ri), Rn //Less Common

This can almost be subsumed into ADD, except:
It is useful to be able to encode PC or GBR or similar as a base
If these are not available as GPRs
If pointers are "special" in some way, a plain ADD may not be usable.

There are pros/cons, I am now leaning on the side of things that PC, LR,
SP, and GBR, are commonly referenced enough in other instructions that
it makes sense to have them available via the GPR encoding (assuming a
32 or 64 register design).

A Zero register is also useful, but one trick here is to have a register
be interpreted as either PC or Zero depending on which register port it
is accessed from (any instruction which tries to use PC as an Index or
second argument will always get Zero).

One can also debate the merits of instructions using PC and similar as a
target to encode branch instructions and similar.
BRA Disp -> ADD PC, Disp, PC //Special
BSR Disp -> ADD PC, Disp, LR //Special
RTS -> ADD LR, ZR, PC //Special
MOV Rm, Rn -> OR Rm, ZR, Rn //Pseudo
...

....

> Andrew.

Re: Around the bike shed: Instruction names and assembler syntax

<svr5ek$1sgd$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!Q8bhMRRbGSzl30m3vEd52w.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Thu, 3 Mar 2022 20:37:59 +0100
Organization: Aioe.org NNTP Server
Message-ID: <svr5ek$1sgd$1@gioia.aioe.org>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de>
<nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<2022Mar3.120929@mips.complang.tuwien.ac.at> <svqe93$1m4j$1@gioia.aioe.org>
<2022Mar3.153038@mips.complang.tuwien.ac.at>
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="61965"; posting-host="Q8bhMRRbGSzl30m3vEd52w.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, 3 Mar 2022 19:37 UTC

Anton Ertl wrote:
> Terje Mathisen <terje.mathisen@tmsw.no> writes:
>> Anton Ertl wrote:
>>> And I don't think it's just the orthogonal features that can profit
>>> from this effect. However, I guess that the orthogonal features have
>>> additional honeypot potential because they are theoretically more
>>> widely useful than non-orthogonal features like the 8086s LODS
>>> instruction.
>>
>> Those original string ops on the 8088 were absolutely crucial, simply
>> because they allowed us to write extremely compact code.
>>
>> On a CPU where all bytes read or stored (including instruction bytes
>> which usually would dominate) would take 4 cycles, using those
>> single-byte opcodes with auto-increment/decrement was the difference
>> between "too slow" and "usable".
>
> I am wondering if this is a demonstration of the feeling of
> achievement that creates an attachment to these features.
>
> What was the proportion of these instructions in production code,
> statically and dynamically?
>
> Looking at an example, here's a table of implementations of NEXT
> (virtual machine instruction dispatch) in various assembly languages:
>
> PDP-11 6809 8086 8086'
> next: mov (ip)+,w ldx ,y++ lods lods ax
> mov bx,ax mov bx,ax
> next1: jmp @(w)+ jmp [,x] mov dx,bx jmp word ptr[bx]
> inc dx
> jmp word ptr[bx]
>
> IP and W are aliases for PDP-11 registers; IP/Y/SI is the virtual
> machine instruction pointer.
>
> 8086 is what's in the table (originally from the fig-Forth listing,
> like the PDP-11 and the 6809 variants), 8086' is a cleaned-up version
> that does not pull stuff up from some of the possible jump targets.
>
> So we see here that the implicit registers of lods combined with the
> limitations of usable registers in the jmp conspire to require an
> additional mov instruction. Not sure if this really saves code size
> compared to the 6809 or PDP-11.

No, what this proves is that 8088 wasn't a very good vehicle for Forth,
in order to get that "usefully fast" code we had to remove all the
housekeeping/overhead code required by an interpreter.

I.e. my 8088 word count code assumed that space, (CR)LF and alphanumeric
bytes would dominate and unrolled the "find end of current word" code to
minimize the number of tests and taken branches:

start_word:
inc dx
in_word:
lodsb
cmp al,' '
jbe leave_word
lodsb
cmp al,' '
jbe leave_word
lodsb
cmp al,' '
jbe leave_word
lodsb
cmp al,' '
ja in_word

leave_word:
jb control_char
white_space:
lodsb
cmp al,' '
ja start_word
je white_space
control_char:
cmp al,8 ;; Tab?
je white_space

etc.

This code got around 7 total code+data bytes per byte counted, so it
handled about 144 KB/s.

Using my 16-bit Pentium code instead I would have needed a few more bus
operations/byte but not horribly worse:

add ax,dx
mov dx,table[bx]
mov bl,es:[di]
mov di,[si+OFFS]

add ax,dx
mov dx,table[bx+32]
mov bl,es:[di]
mov di,[si+OFFS+2]

The code above counts chars/words/lines in 4 input bytes, it needs 10
bytes loaded from lookup tables as well as 26 code bytes, so 36 bytes
total or 9 bytes/character counted, so it would handle about 115 KB/s.

On its Pentium target however, the speed increased to 40 MB/s on a 60
MHz CPU, i.e. about 14 x higher clock rate but 300 x higher performance.

Where 8088 did shine was in byte processing loops which would fit
directly into the intended register allocation, i.e. SI/DI for
source/dest, DX for port IO, CX/CL for shift & loop count, BX for table
lookups and AX as the single accumulator.

Terje

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

Re: Around the bike shed: Instruction names and assembler syntax

<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:10f:b0:2e0:29ea:5ea1 with SMTP id u15-20020a05622a010f00b002e029ea5ea1mr13409164qtw.670.1646336711898;
Thu, 03 Mar 2022 11:45:11 -0800 (PST)
X-Received: by 2002:a05:6830:71b:b0:5af:62e1:99ee with SMTP id
y27-20020a056830071b00b005af62e199eemr19620216ots.227.1646336711284; Thu, 03
Mar 2022 11:45:11 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 3 Mar 2022 11:45:11 -0800 (PST)
In-Reply-To: <svr3l5$18b$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:3de0:ba8f:3b3:e7eb;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:3de0:ba8f:3b3:e7eb
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 03 Mar 2022 19:45:11 +0000
Content-Type: text/plain; charset="UTF-8"
 by: MitchAlsup - Thu, 3 Mar 2022 19:45 UTC

On Thursday, March 3, 2022 at 1:07:21 PM UTC-6, BGB wrote:
> On 3/3/2022 5:45 AM, a...@littlepinkcloud.invalid wrote:
> > Stephen Fuld <sf...@alumni.cmu.edu.invalid> wrote:
> >> On 3/2/2022 3:24 AM, a...@littlepinkcloud.invalid wrote:
> >>> Theo Markettos <theom...@chiark.greenend.org.uk> wrote:
> >>>>
> >>>> (32 bit ARM is interesting as it was designed to be nice to program
> >>>> in assembly, a consideration not normally part of instruction set
> >>>> design these days)
> >>>
> >>> That's an interesting point. In my experience 64-bit ARM is as nice to
> >>> program in assembly, at least as far as the set of base instructions
> >>> goes, even though there are more instructions.
> >>>
> >>> I also believe that if an instruction set is nice to program in
> >>> assembly, it's also nice to write a code generator for.
> >>
> >> Wasn't one of the results from the studies of generated code,that
> >> was used to justify RISC, that "nice to write assembly in" features
> >> such as complex and orthogonal addressing modes just weren't used in
> >> generated code?
> >
> > Are complex addressing modes nice to write assembly in, though? I've
> > never found it to be so. I think the problem identified with IBM 370
> > was that many of the addressing modes weren't being used by compilers
> > or by hand-cranked code, but I can't find any data for that one way or
> > the other.
> >
> > I can see the point of orthogonality, as long as it's not extended too
> > far. Of course no-one actually wants to have to use, say, a dedicated
> > pair of registers to do a multiply.
> >
> There is likely some room for debate here.
> Some people seemingly consider anything much beyond (Rb,Disp) to be
> complex...
>
>
> IME, ranking is roughly:
> (Rb,Disp):
> Very common
> (Rb,Ri):
> Also very common (2nd place)
> (Scale matches access size)
> (Rb,Ri*Sc, Disp)
> Uncommon, Harder to make use of.
>
My 66000 has scale encoded in one place and width encoded in another.
<
As to utility: although they only make up 2%-3% of instruction stream
they pretty much convert 2 instructions into 1 so they represent 2%-3%
performance gain. That may not be enough to make the cut in some
designs, and I disparage them not. On the other hand, while doing x86-64
I saw how little HW it took to do them, and how much it helped when
you really needed, and it saved a register when they were scant, too.
<
>
>
> Then, "danger zone":
> @Rb+, @-Rb: Uncommon and requires an extra write port (1)
> @+Rb, @Rb-: Likewise
> @@Rb: Devil crap.
> ...
These require all sorts of compromise, including more register write
ports, more RAW dependencies, and are generally hard to pipeline.
In effect: you may not have shot yourself in the foot, but you took an
ice pick and drove it through nonetheless.
>
> 1: Though, in premise, these can map to C's "*ptr++" and "*--ptr" modes
> and similar, the occurrence of "*ptr++" in C isn't common enough to
> really justify having a dedicated instruction for it (when the increment
> or decrement can often be run in parallel with another instruction).
>
>
> While using PC or GBR or similar as a base register are useful, I will
> not consider them as separate address modes. Depending on the ISA asd
> ABI design, these may end up fairly common (namely for loading/storing
> global variables).
>
> Other semi-common cases are the ability to encode:
> LEA (Rb, Disp), Rn //More Common
<
This is often used as a prelude to MEM Rd,[Rn+Ri<<s] when you don't
have 2-registers+displacement memory references.
<
> LEA.x (Rb, Ri), Rn //Less Common
<
What does the ".x" signify ?
>
> This can almost be subsumed into ADD, except:
> It is useful to be able to encode PC or GBR or similar as a base
> If these are not available as GPRs
> If pointers are "special" in some way, a plain ADD may not be usable.
<
You might also have different overflow/saturation conditions with
ADD.
>
>
> There are pros/cons, I am now leaning on the side of things that PC, LR,
> SP, and GBR, are commonly referenced enough in other instructions that
> it makes sense to have them available via the GPR encoding (assuming a
> 32 or 64 register design).
<
IP is almost never used as an operand to other than memory reference
instructions. Return address R0, SP R31are actual registers, So is FP R30,
and Thread_Local_Data R16.
>
> A Zero register is also useful, but one trick here is to have a register
> be interpreted as either PC or Zero depending on which register port it
> is accessed from (any instruction which tries to use PC as an Index or
> second argument will always get Zero).
>
In my opinion wasting a register to contain zero is simply a waste.
So, I have STx #0,[Rbase+Rindex<<scale+Disp] and MOV Rd,#imm16
when you really have to have it.
>
> One can also debate the merits of instructions using PC and similar as a
> target to encode branch instructions and similar.
> BRA Disp -> ADD PC, Disp, PC //Special
> BSR Disp -> ADD PC, Disp, LR //Special
> RTS -> ADD LR, ZR, PC //Special
> MOV Rm, Rn -> OR Rm, ZR, Rn //Pseudo
<
I recently added messages to My 66000 ISA. The caller sends a number of
registers to the called (in accordance with ABI) and whether or not the
called can access callers memory through indirection. Called runs in a
different address space, with different privilege, under a potentially
different Guest OS. Here Return Address = 0x01 (a magic cookie).
<
When called executes a RET instruction, control returns to caller in his
own address space, at his privilege, in a core of his affinity,...
<
The called "subroutine" cannot tell that he was invoked by the message
or called locally, except by looking at RA being the magic cookie. This
works if safe stack is in use or not on both sides.
<
Indirection is my variant of PDP-11/70s MOV from and MOV to (alternate
address space). I even set it up to use the ASID of the caller when accessing
caller's memory via indirection.
<
Total number of instructions added: 2: Message Call, and Message Send.
Total number of instructions modified: 2: RET and EXIT detect magic
cookie.
<
> ...
>
> ...
>
>
> > Andrew.

Re: Around the bike shed: Instruction names and assembler syntax

<svr656$8ic$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!Q8bhMRRbGSzl30m3vEd52w.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Thu, 3 Mar 2022 20:50:01 +0100
Organization: Aioe.org NNTP Server
Message-ID: <svr656$8ic$1@gioia.aioe.org>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at>
<svnjsl$qpu$1@newsreader4.netcologne.de>
<2022Mar2.184051@mips.complang.tuwien.ac.at> <svoejm$89e$1@dont-email.me>
<2022Mar3.124057@mips.complang.tuwien.ac.at> <svqdbt$g9$1@dont-email.me>
<2022Mar3.140741@mips.complang.tuwien.ac.at> <svql9n$u96$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="8780"; posting-host="Q8bhMRRbGSzl30m3vEd52w.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, 3 Mar 2022 19:50 UTC

Ivan Godard wrote:
> On 3/3/2022 5:07 AM, Anton Ertl wrote:
>> Ivan Godard <ivan@millcomputing.com> writes:
>>> On 3/3/2022 3:40 AM, Anton Ertl wrote:
>>> <snip>
>>>
>>>> My argument is actually that the normal case should be to require
>>>> explicit parentheses, and we can make a few exceptions to that rule
>>>> (but they should really be few).
>>>
>>> But (as noted by several commenters here) that leads to informal
>>> parenthesizing everything in the name of readability and safety.
>>
>> I have no idea what "informal parenthesizing" is supposed to mean.  If
>> you mean that nobody writes "a+b*c", I think you are wrong.  But of
>> course, having zero exceptions to the rule of requiring explicit
>> parentheses is fine with me.
>>
>> - anton
>
> "informal parenthesizing": syntactic rules required by convention but
> not by formal syntax.

That's "informational" not "informal"!

Terje

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

Re: Around the bike shed: Instruction names and assembler syntax

<EUbUJ.32421$dln7.10284@fx03.iad>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx03.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: Around the bike shed: Instruction names and assembler syntax
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk> <svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk> <ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me> <oLf*yP-Hy@news.chiark.greenend.org.uk> <svprsc$buf$1@newsreader4.netcologne.de> <2022Mar3.130732@mips.complang.tuwien.ac.at> <Uy4UJ.91086$Lbb6.86739@fx45.iad> <e348105a-d9c8-4dda-a843-14e403ad804fn@googlegroups.com>
In-Reply-To: <e348105a-d9c8-4dda-a843-14e403ad804fn@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 114
Message-ID: <EUbUJ.32421$dln7.10284@fx03.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Thu, 03 Mar 2022 23:09:24 UTC
Date: Thu, 03 Mar 2022 18:09:17 -0500
X-Received-Bytes: 6486
 by: EricP - Thu, 3 Mar 2022 23:09 UTC

MitchAlsup wrote:
> On Thursday, March 3, 2022 at 8:48:23 AM UTC-6, EricP wrote:
>> Anton Ertl wrote:
>>> Thomas Koenig <tko...@netcologne.de> writes:
>>>> As written elsethread, both ARM and IBM deprecated multiple store
>>>> and load instructions - ARM by not including them in aarch64, IBM
>>>> by restricting them in POWER to 32-bit size and to big-endian only.
>>>> In other words, legacy code. POWER9 microcodes it, which incurs
>>>> a significant penalty. Mitch explained that it is less a burden
>>>> to his My 66000 implementations.
>>>>
>>>> aarch64 has load and store double instead.
>>> ....
>>>> Use in a function body is much harder (depending on what exactly
>>>> is in the ISA). If you can load/store regiters up to the maximum
>>>> register number that you have (POWER) or a register range (My
>>>> 66000), you would have to work your whole register allocation
>>>> around the load/store multiple instruction. This would be
>>>> rather inconvenient, and I suspect that compilers would not use
>>>> it.
>>> I have certainly seen quite a few load-pair and store-pair
>>> instructions in gcc-generated Aarch64 code outside function
>>> prologue/epilogue:
>>>
>>> In the 6008 lines of output from "objdump -d
>>> engine/engine-fast-ll-reg.o" (pretty much a single large function),
>>> ldp occurs 133 times (among them 24 accesses through sp) and stp
>>> occurs 76 times (17 accesses through sp). The accesses through sp are
>>> probably around function calls, the others are other pairwise accesses
>>> that the compiler could combine.
>>>
>>> So I expect that efficient load-multiple or store-multiple
>>> instructions would also be used by gcc; the question is how often
>>> there would be cases with more than two registers. Apparently not
>>> enough to make the Aarch64 architects add instructions for that.
>>>
>>> The benefit of the load-pair and store-pair instructions over a pair
>>> of loads/stores is that they reduce load/store-unit contention; of
>>> course, the RISC-V answer to that is that the decoder can combine such
>>> a pair into one pairwise micro-instruction.
>> The register save set size sets the minimum width of a number of resources,
>> the number of register read and write ports,
>> width that LSQ should handle including store-load forwarding.
>> With LDP/STP 2*64 it should not be a hardship even for a minimal
>> implementation.
>>
>> For LDM/STM to run at full speed it would need to operate on a
>> full 64B cache line, 8 register wide datapath to/from memory. That's
>> - 8 read ports on the rename tables
> <
> A 6-wide machine already has 12-14 of these ports.

Plus 8 rename write ports as it would need to rename 8 registers at once
for each LDM uOp.

> <
>> - 8 read and 8 write register file ports
> <
> A 6-wide reservation station machine already has 12-14 of these

It usually has lots of read ports but not that many write ports.

Also maybe only a subset of the ports are available for load/store
instructions. So issue logic can launch 6 or 8 uOps per clock
but only 2 of them can be to the Load Store Unit.

> <
>> - 8 operand buses to LSQ, store-load forwarding,
> <
> A 6-wide machine already has 12-read 6-write.

Again it may be that only a subset of buses run from RF to LSQ
to avoid having a full blown operand crossbar to all FU.

> <
>> (possibly also internally forwarding withing the LSQ itself)
>> and input operand forwarding from FU results
>> - 8 result buses from LSQ, with output forwarding
> <
> A 6-wide machine already has 6 of these.
> <
>> (plus possibly internal forwarding withing the LSQ itself)
>> - 512 bit datapath to/from cache with alignment shifters for line straddles.
> <
> You are suggesting that these instructions occupy 1 instruction
> in the stream, and are issued with another 5 instructions which
> are completely dependent on the completion of the LDM or STM.

Just exploring the hardware needed to optimize load or store multiple of
up to 32 64-bit registers faster than 32 individual LD or ST instructions,
ideally in 4 clocks. Similar concept to a hardware byte buffer block move.

Cache line is 64B and we would like to pack 8 registers together
in a single load or store operation. Decode sees an LDM/STM with a
register mask or range select of up to 32 registers, and emits 1..4 uOps
each for load or store of up to 8 data registers plus address registers.

Each STM uOp basically takes over the Dispatcher resources,
using all the read ports and buses to move the 0..2 address registers
plus 1..8 data registers to a AGU-LSQ entry.

Each LDM uOp Dispatch is like a regular load in that Dispatcher moves
0..2 address registers to a AGU-LSQ entry. But on completion it takes
over all the result write and forwarding buses for its 1..8 results.

Each set of 8 loaded or stored registers must obey all the usual rules
for store-load forwarding and x86-TSO coherence. This is an expansion
of existing rules since the memory bytes are contiguous though
not necessarily cache aligned.

If the load or store straddles 2 cache lines then it needs a 512-bit shifter
and able to read/update 2 cache lines at once (dual port or odd/even banks).

Re: Around the bike shed: Instruction names and assembler syntax

<svrlqg$dc7$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Thu, 3 Mar 2022 18:17:17 -0600
Organization: A noiseless patient Spider
Lines: 252
Message-ID: <svrlqg$dc7$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de>
<nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 4 Mar 2022 00:17:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="561c00b80957b04c158636cc827cf633";
logging-data="13703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tzJ9mjNRWrtgFayrGbsat"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:eSAa2G9IMGCc0x732zm/E0JaN0Q=
In-Reply-To: <a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com>
Content-Language: en-US
 by: BGB - Fri, 4 Mar 2022 00:17 UTC

On 3/3/2022 1:45 PM, MitchAlsup wrote:
> On Thursday, March 3, 2022 at 1:07:21 PM UTC-6, BGB wrote:
>> On 3/3/2022 5:45 AM, a...@littlepinkcloud.invalid wrote:
>>> Stephen Fuld <sf...@alumni.cmu.edu.invalid> wrote:
>>>> On 3/2/2022 3:24 AM, a...@littlepinkcloud.invalid wrote:
>>>>> Theo Markettos <theom...@chiark.greenend.org.uk> wrote:
>>>>>>
>>>>>> (32 bit ARM is interesting as it was designed to be nice to program
>>>>>> in assembly, a consideration not normally part of instruction set
>>>>>> design these days)
>>>>>
>>>>> That's an interesting point. In my experience 64-bit ARM is as nice to
>>>>> program in assembly, at least as far as the set of base instructions
>>>>> goes, even though there are more instructions.
>>>>>
>>>>> I also believe that if an instruction set is nice to program in
>>>>> assembly, it's also nice to write a code generator for.
>>>>
>>>> Wasn't one of the results from the studies of generated code,that
>>>> was used to justify RISC, that "nice to write assembly in" features
>>>> such as complex and orthogonal addressing modes just weren't used in
>>>> generated code?
>>>
>>> Are complex addressing modes nice to write assembly in, though? I've
>>> never found it to be so. I think the problem identified with IBM 370
>>> was that many of the addressing modes weren't being used by compilers
>>> or by hand-cranked code, but I can't find any data for that one way or
>>> the other.
>>>
>>> I can see the point of orthogonality, as long as it's not extended too
>>> far. Of course no-one actually wants to have to use, say, a dedicated
>>> pair of registers to do a multiply.
>>>
>> There is likely some room for debate here.
>> Some people seemingly consider anything much beyond (Rb,Disp) to be
>> complex...
>>
>>
>> IME, ranking is roughly:
>> (Rb,Disp):
>> Very common
>> (Rb,Ri):
>> Also very common (2nd place)
>> (Scale matches access size)
>> (Rb,Ri*Sc, Disp)
>> Uncommon, Harder to make use of.
>>
> My 66000 has scale encoded in one place and width encoded in another.
> <
> As to utility: although they only make up 2%-3% of instruction stream
> they pretty much convert 2 instructions into 1 so they represent 2%-3%
> performance gain. That may not be enough to make the cut in some
> designs, and I disparage them not. On the other hand, while doing x86-64
> I saw how little HW it took to do them, and how much it helped when
> you really needed, and it saved a register when they were scant, too.
> <

Issue is that one needs to spare two extra bits to encode the separate
scale.

In my case, 32-bit encodings can only do:
MOV.x (Rb, Ri), Rn
Whereas Op64 and Op40x2 can do:
MOV.x (Rb, Ri*Sc, Disp11) //Op64
MOV.x (Rb, Ri*Sc, Disp5) //Op40x2

Though, this is considered part of an ISA extension.

>>
>>
>> Then, "danger zone":
>> @Rb+, @-Rb: Uncommon and requires an extra write port (1)
>> @+Rb, @Rb-: Likewise
>> @@Rb: Devil crap.
>> ...
> These require all sorts of compromise, including more register write
> ports, more RAW dependencies, and are generally hard to pipeline.
> In effect: you may not have shot yourself in the foot, but you took an
> ice pick and drove it through nonetheless.

This is part of why I left them out.

>>
>> 1: Though, in premise, these can map to C's "*ptr++" and "*--ptr" modes
>> and similar, the occurrence of "*ptr++" in C isn't common enough to
>> really justify having a dedicated instruction for it (when the increment
>> or decrement can often be run in parallel with another instruction).
>>
>>
>> While using PC or GBR or similar as a base register are useful, I will
>> not consider them as separate address modes. Depending on the ISA asd
>> ABI design, these may end up fairly common (namely for loading/storing
>> global variables).
>>
>> Other semi-common cases are the ability to encode:
>> LEA (Rb, Disp), Rn //More Common
> <
> This is often used as a prelude to MEM Rd,[Rn+Ri<<s] when you don't
> have 2-registers+displacement memory references.
> <

>> LEA.x (Rb, Ri), Rn //Less Common
> <
> What does the ".x" signify ?

That is the type used to encode the scale used for Ri.
So:
LEA.B (Rb, Ri), Rn // Rn=Rb+Ri
LEA.W (Rb, Ri), Rn // Rn=Rb+Ri*2
LEA.L (Rb, Ri), Rn // Rn=Rb+Ri*4
LEA.Q (Rb, Ri), Rn // Rn=Rb+Ri*8

This detail can be glossed over for the (Rb, Disp) case.

In my case, for XLEA, only the .B encoding was provided in the base ISA,
and the others were provided indirectly via Op64 encodings.

Partly this was because some other encodings occupied the same space
that might have otherwise been used for the other LEA's (and scaled
index LEA being fairly uncommon).

>>
>> This can almost be subsumed into ADD, except:
>> It is useful to be able to encode PC or GBR or similar as a base
>> If these are not available as GPRs
>> If pointers are "special" in some way, a plain ADD may not be usable.
> <
> You might also have different overflow/saturation conditions with
> ADD.

OK.

I was thinking here mostly of things like capabilities and ISA's which
have different register widths or formats for integer and pointer types.

>>
>>
>> There are pros/cons, I am now leaning on the side of things that PC, LR,
>> SP, and GBR, are commonly referenced enough in other instructions that
>> it makes sense to have them available via the GPR encoding (assuming a
>> 32 or 64 register design).
> <
> IP is almost never used as an operand to other than memory reference
> instructions. Return address R0, SP R31are actual registers, So is FP R30,
> and Thread_Local_Data R16.

This is partly why I was thinking it might also make sense to alias it
with a Zero Register in most other contexts.

>>
>> A Zero register is also useful, but one trick here is to have a register
>> be interpreted as either PC or Zero depending on which register port it
>> is accessed from (any instruction which tries to use PC as an Index or
>> second argument will always get Zero).
>>
> In my opinion wasting a register to contain zero is simply a waste.
> So, I have STx #0,[Rbase+Rindex<<scale+Disp] and MOV Rd,#imm16
> when you really have to have it.

The main advantage of a Zero register would be that it makes it possible
to skip out on some encodings.

Say:
MOV Rm, Rn -> OR Rm, ZR, Rn
NEG Rm, Rn -> SUB ZR, Rm, Rn
...

Though, yes, in most other cases, it is kinda pointless.

>>
>> One can also debate the merits of instructions using PC and similar as a
>> target to encode branch instructions and similar.
>> BRA Disp -> ADD PC, Disp, PC //Special
>> BSR Disp -> ADD PC, Disp, LR //Special
>> RTS -> ADD LR, ZR, PC //Special
>> MOV Rm, Rn -> OR Rm, ZR, Rn //Pseudo
> <
> I recently added messages to My 66000 ISA. The caller sends a number of
> registers to the called (in accordance with ABI) and whether or not the
> called can access callers memory through indirection. Called runs in a
> different address space, with different privilege, under a potentially
> different Guest OS. Here Return Address = 0x01 (a magic cookie).
> <
> When called executes a RET instruction, control returns to caller in his
> own address space, at his privilege, in a core of his affinity,...
> <
> The called "subroutine" cannot tell that he was invoked by the message
> or called locally, except by looking at RA being the magic cookie. This
> works if safe stack is in use or not on both sides.
> <
> Indirection is my variant of PDP-11/70s MOV from and MOV to (alternate
> address space). I even set it up to use the ASID of the caller when accessing
> caller's memory via indirection.
> <
> Total number of instructions added: 2: Message Call, and Message Send.
> Total number of instructions modified: 2: RET and EXIT detect magic
> cookie.
> <

I was mostly thinking of, say, one wants to skip having dedicated
encoding space for things like BRA and BSR, and instead encodes them via
overloading ADD and similar, using special case logic for PC and LR and
similar.

Or, sort of like if one took the RISC-V route further and also left out
things like JAL and JALR and similar.


Click here to read the complete article
Re: Around the bike shed: Instruction names and assembler syntax

<1f1b31df-b5dd-490f-b2fe-138444616650n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:5fcb:0:b0:432:d049:c6d with SMTP id jq11-20020ad45fcb000000b00432d0490c6dmr22260539qvb.39.1646353147951;
Thu, 03 Mar 2022 16:19:07 -0800 (PST)
X-Received: by 2002:a05:6808:1447:b0:2d7:28cc:29ff with SMTP id
x7-20020a056808144700b002d728cc29ffmr7003303oiv.175.1646353147549; Thu, 03
Mar 2022 16:19:07 -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: Thu, 3 Mar 2022 16:19:07 -0800 (PST)
In-Reply-To: <EUbUJ.32421$dln7.10284@fx03.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:20e8:8981:e8d6:173d;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:20e8:8981:e8d6:173d
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<oLf*yP-Hy@news.chiark.greenend.org.uk> <svprsc$buf$1@newsreader4.netcologne.de>
<2022Mar3.130732@mips.complang.tuwien.ac.at> <Uy4UJ.91086$Lbb6.86739@fx45.iad>
<e348105a-d9c8-4dda-a843-14e403ad804fn@googlegroups.com> <EUbUJ.32421$dln7.10284@fx03.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1f1b31df-b5dd-490f-b2fe-138444616650n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 04 Mar 2022 00:19:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 143
 by: MitchAlsup - Fri, 4 Mar 2022 00:19 UTC

On Thursday, March 3, 2022 at 5:09:27 PM UTC-6, EricP wrote:
> MitchAlsup wrote:
> > On Thursday, March 3, 2022 at 8:48:23 AM UTC-6, EricP wrote:
> >> Anton Ertl wrote:
> >>> Thomas Koenig <tko...@netcologne.de> writes:
> >>>> As written elsethread, both ARM and IBM deprecated multiple store
> >>>> and load instructions - ARM by not including them in aarch64, IBM
> >>>> by restricting them in POWER to 32-bit size and to big-endian only.
> >>>> In other words, legacy code. POWER9 microcodes it, which incurs
> >>>> a significant penalty. Mitch explained that it is less a burden
> >>>> to his My 66000 implementations.
> >>>>
> >>>> aarch64 has load and store double instead.
> >>> ....
> >>>> Use in a function body is much harder (depending on what exactly
> >>>> is in the ISA). If you can load/store regiters up to the maximum
> >>>> register number that you have (POWER) or a register range (My
> >>>> 66000), you would have to work your whole register allocation
> >>>> around the load/store multiple instruction. This would be
> >>>> rather inconvenient, and I suspect that compilers would not use
> >>>> it.
> >>> I have certainly seen quite a few load-pair and store-pair
> >>> instructions in gcc-generated Aarch64 code outside function
> >>> prologue/epilogue:
> >>>
> >>> In the 6008 lines of output from "objdump -d
> >>> engine/engine-fast-ll-reg.o" (pretty much a single large function),
> >>> ldp occurs 133 times (among them 24 accesses through sp) and stp
> >>> occurs 76 times (17 accesses through sp). The accesses through sp are
> >>> probably around function calls, the others are other pairwise accesses
> >>> that the compiler could combine.
> >>>
> >>> So I expect that efficient load-multiple or store-multiple
> >>> instructions would also be used by gcc; the question is how often
> >>> there would be cases with more than two registers. Apparently not
> >>> enough to make the Aarch64 architects add instructions for that.
> >>>
> >>> The benefit of the load-pair and store-pair instructions over a pair
> >>> of loads/stores is that they reduce load/store-unit contention; of
> >>> course, the RISC-V answer to that is that the decoder can combine such
> >>> a pair into one pairwise micro-instruction.
> >> The register save set size sets the minimum width of a number of resources,
> >> the number of register read and write ports,
> >> width that LSQ should handle including store-load forwarding.
> >> With LDP/STP 2*64 it should not be a hardship even for a minimal
> >> implementation.
> >>
> >> For LDM/STM to run at full speed it would need to operate on a
> >> full 64B cache line, 8 register wide datapath to/from memory. That's
> >> - 8 read ports on the rename tables
> > <
> > A 6-wide machine already has 12-14 of these ports.
> Plus 8 rename write ports as it would need to rename 8 registers at once
> for each LDM uOp.
> > <
> >> - 8 read and 8 write register file ports
> > <
> > A 6-wide reservation station machine already has 12-14 of these
<
> It usually has lots of read ports but not that many write ports.
<
Consider the empty execution window, and you issue 6 instructions
into reservation stations. You need 12-14 ports into those stations
to write all the operands.
<
You only need 6 write ports to capture results.
<
When 6 instructions get issued, yo need read ports for all operands
12-14.
>
> Also maybe only a subset of the ports are available for load/store
> instructions. So issue logic can launch 6 or 8 uOps per clock
> but only 2 of them can be to the Load Store Unit.
<
A 6-wide machine should have 3 LD/ST stations, each accepting
3 operand (2 register 1 immediate), each capturing 6 results,
and when fired, you need read ports for all the operands 3×3=9.
> > <
> >> - 8 operand buses to LSQ, store-load forwarding,
> > <
> > A 6-wide machine already has 12-read 6-write.
<
> Again it may be that only a subset of buses run from RF to LSQ
> to avoid having a full blown operand crossbar to all FU.
<
You can so constrain your machine, I would not consider it, and
when I was told to by "higher ups" it ended up greatly complicating
the design, ultimately losing performance and schedule.
<
> > <
> >> (possibly also internally forwarding withing the LSQ itself)
> >> and input operand forwarding from FU results
> >> - 8 result buses from LSQ, with output forwarding
> > <
> > A 6-wide machine already has 6 of these.
> > <
> >> (plus possibly internal forwarding withing the LSQ itself)
> >> - 512 bit datapath to/from cache with alignment shifters for line straddles.
> > <
> > You are suggesting that these instructions occupy 1 instruction
> > in the stream, and are issued with another 5 instructions which
> > are completely dependent on the completion of the LDM or STM.
<
> Just exploring the hardware needed to optimize load or store multiple of
> up to 32 64-bit registers faster than 32 individual LD or ST instructions,
> ideally in 4 clocks. Similar concept to a hardware byte buffer block move..
>
> Cache line is 64B and we would like to pack 8 registers together
> in a single load or store operation. Decode sees an LDM/STM with a
> register mask or range select of up to 32 registers, and emits 1..4 uOps
> each for load or store of up to 8 data registers plus address registers.
>
> Each STM uOp basically takes over the Dispatcher resources,
> using all the read ports and buses to move the 0..2 address registers
> plus 1..8 data registers to a AGU-LSQ entry.
>
> Each LDM uOp Dispatch is like a regular load in that Dispatcher moves
> 0..2 address registers to a AGU-LSQ entry. But on completion it takes
> over all the result write and forwarding buses for its 1..8 results.
>
> Each set of 8 loaded or stored registers must obey all the usual rules
> for store-load forwarding and x86-TSO coherence. This is an expansion
> of existing rules since the memory bytes are contiguous though
> not necessarily cache aligned.
>
> If the load or store straddles 2 cache lines then it needs a 512-bit shifter
> and able to read/update 2 cache lines at once (dual port or odd/even banks).

Re: Around the bike shed: Instruction names and assembler syntax

<c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:246b:b0:435:418c:71b6 with SMTP id im11-20020a056214246b00b00435418c71b6mr2735249qvb.57.1646353748892;
Thu, 03 Mar 2022 16:29:08 -0800 (PST)
X-Received: by 2002:a05:6870:b39c:b0:d1:4a9f:35f9 with SMTP id
w28-20020a056870b39c00b000d14a9f35f9mr6268036oap.119.1646353748586; Thu, 03
Mar 2022 16:29:08 -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: Thu, 3 Mar 2022 16:29:08 -0800 (PST)
In-Reply-To: <svrlqg$dc7$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:20e8:8981:e8d6:173d;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:20e8:8981:e8d6:173d
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com> <svrlqg$dc7$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 04 Mar 2022 00:29:08 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 264
 by: MitchAlsup - Fri, 4 Mar 2022 00:29 UTC

On Thursday, March 3, 2022 at 6:17:24 PM UTC-6, BGB wrote:
> On 3/3/2022 1:45 PM, MitchAlsup wrote:
> > On Thursday, March 3, 2022 at 1:07:21 PM UTC-6, BGB wrote:
> >> On 3/3/2022 5:45 AM, a...@littlepinkcloud.invalid wrote:
> >>> Stephen Fuld <sf...@alumni.cmu.edu.invalid> wrote:
> >>>> On 3/2/2022 3:24 AM, a...@littlepinkcloud.invalid wrote:
> >>>>> Theo Markettos <theom...@chiark.greenend.org.uk> wrote:
> >>>>>>
> >>>>>> (32 bit ARM is interesting as it was designed to be nice to program
> >>>>>> in assembly, a consideration not normally part of instruction set
> >>>>>> design these days)
> >>>>>
> >>>>> That's an interesting point. In my experience 64-bit ARM is as nice to
> >>>>> program in assembly, at least as far as the set of base instructions
> >>>>> goes, even though there are more instructions.
> >>>>>
> >>>>> I also believe that if an instruction set is nice to program in
> >>>>> assembly, it's also nice to write a code generator for.
> >>>>
> >>>> Wasn't one of the results from the studies of generated code,that
> >>>> was used to justify RISC, that "nice to write assembly in" features
> >>>> such as complex and orthogonal addressing modes just weren't used in
> >>>> generated code?
> >>>
> >>> Are complex addressing modes nice to write assembly in, though? I've
> >>> never found it to be so. I think the problem identified with IBM 370
> >>> was that many of the addressing modes weren't being used by compilers
> >>> or by hand-cranked code, but I can't find any data for that one way or
> >>> the other.
> >>>
> >>> I can see the point of orthogonality, as long as it's not extended too
> >>> far. Of course no-one actually wants to have to use, say, a dedicated
> >>> pair of registers to do a multiply.
> >>>
> >> There is likely some room for debate here.
> >> Some people seemingly consider anything much beyond (Rb,Disp) to be
> >> complex...
> >>
> >>
> >> IME, ranking is roughly:
> >> (Rb,Disp):
> >> Very common
> >> (Rb,Ri):
> >> Also very common (2nd place)
> >> (Scale matches access size)
> >> (Rb,Ri*Sc, Disp)
> >> Uncommon, Harder to make use of.
> >>
> > My 66000 has scale encoded in one place and width encoded in another.
> > <
> > As to utility: although they only make up 2%-3% of instruction stream
> > they pretty much convert 2 instructions into 1 so they represent 2%-3%
> > performance gain. That may not be enough to make the cut in some
> > designs, and I disparage them not. On the other hand, while doing x86-64
> > I saw how little HW it took to do them, and how much it helped when
> > you really needed, and it saved a register when they were scant, too.
> > <
> Issue is that one needs to spare two extra bits to encode the separate
> scale.
<
I found a place for these--I stole bits used in calculation instructions
that negate operands.
>
> In my case, 32-bit encodings can only do:
> MOV.x (Rb, Ri), Rn
> Whereas Op64 and Op40x2 can do:
> MOV.x (Rb, Ri*Sc, Disp11) //Op64
> MOV.x (Rb, Ri*Sc, Disp5) //Op40x2
<
My equivalent does:
MEM Rd,[Rbase+Rindex<<scale+disp32]
>
> Though, this is considered part of an ISA extension.
> >>
> >>
> >> Then, "danger zone":
> >> @Rb+, @-Rb: Uncommon and requires an extra write port (1)
> >> @+Rb, @Rb-: Likewise
> >> @@Rb: Devil crap.
> >> ...
> > These require all sorts of compromise, including more register write
> > ports, more RAW dependencies, and are generally hard to pipeline.
> > In effect: you may not have shot yourself in the foot, but you took an
> > ice pick and drove it through nonetheless.
> This is part of why I left them out.
> >>
> >> 1: Though, in premise, these can map to C's "*ptr++" and "*--ptr" modes
> >> and similar, the occurrence of "*ptr++" in C isn't common enough to
> >> really justify having a dedicated instruction for it (when the increment
> >> or decrement can often be run in parallel with another instruction).
> >>
> >>
> >> While using PC or GBR or similar as a base register are useful, I will
> >> not consider them as separate address modes. Depending on the ISA asd
> >> ABI design, these may end up fairly common (namely for loading/storing
> >> global variables).
> >>
> >> Other semi-common cases are the ability to encode:
> >> LEA (Rb, Disp), Rn //More Common
> > <
> > This is often used as a prelude to MEM Rd,[Rn+Ri<<s] when you don't
> > have 2-registers+displacement memory references.
> > <
>
>
> >> LEA.x (Rb, Ri), Rn //Less Common
> > <
> > What does the ".x" signify ?
> That is the type used to encode the scale used for Ri.
> So:
> LEA.B (Rb, Ri), Rn // Rn=Rb+Ri
> LEA.W (Rb, Ri), Rn // Rn=Rb+Ri*2
> LEA.L (Rb, Ri), Rn // Rn=Rb+Ri*4
> LEA.Q (Rb, Ri), Rn // Rn=Rb+Ri*8
<
Can I ask if you were a bit peeved at Thomas' dislike of "dots" ?
>
> This detail can be glossed over for the (Rb, Disp) case.
>
> In my case, for XLEA, only the .B encoding was provided in the base ISA,
> and the others were provided indirectly via Op64 encodings.
>
> Partly this was because some other encodings occupied the same space
> that might have otherwise been used for the other LEA's (and scaled
> index LEA being fairly uncommon).
> >>
> >> This can almost be subsumed into ADD, except:
> >> It is useful to be able to encode PC or GBR or similar as a base
> >> If these are not available as GPRs
> >> If pointers are "special" in some way, a plain ADD may not be usable.
> > <
> > You might also have different overflow/saturation conditions with
> > ADD.
> OK.
>
> I was thinking here mostly of things like capabilities and ISA's which
> have different register widths or formats for integer and pointer types.
> >>
> >>
> >> There are pros/cons, I am now leaning on the side of things that PC, LR,
> >> SP, and GBR, are commonly referenced enough in other instructions that
> >> it makes sense to have them available via the GPR encoding (assuming a
> >> 32 or 64 register design).
> > <
> > IP is almost never used as an operand to other than memory reference
> > instructions. Return address R0, SP R31are actual registers, So is FP R30,
> > and Thread_Local_Data R16.
> This is partly why I was thinking it might also make sense to alias it
> with a Zero Register in most other contexts.
> >>
> >> A Zero register is also useful, but one trick here is to have a register
> >> be interpreted as either PC or Zero depending on which register port it
> >> is accessed from (any instruction which tries to use PC as an Index or
> >> second argument will always get Zero).
> >>
> > In my opinion wasting a register to contain zero is simply a waste.
> > So, I have STx #0,[Rbase+Rindex<<scale+Disp] and MOV Rd,#imm16
> > when you really have to have it.
> The main advantage of a Zero register would be that it makes it possible
> to skip out on some encodings.
>
> Say:
> MOV Rm, Rn -> OR Rm, ZR, Rn
> NEG Rm, Rn -> SUB ZR, Rm, Rn
<
I have not seen a NEG yet, since Brian got his LLVM port up.
<
That is:
CALK Rd,-R1,-R2
<
gets rid of almost all of the 1-operands. The kind of negation is
dependent on the kind of calculation {integer is 2-s complement,
logical is bit-inversion, FP is sign inversion.}
<
> ...
>
> Though, yes, in most other cases, it is kinda pointless.
> >>
> >> One can also debate the merits of instructions using PC and similar as a
> >> target to encode branch instructions and similar.
> >> BRA Disp -> ADD PC, Disp, PC //Special
> >> BSR Disp -> ADD PC, Disp, LR //Special
> >> RTS -> ADD LR, ZR, PC //Special
> >> MOV Rm, Rn -> OR Rm, ZR, Rn //Pseudo
> > <
> > I recently added messages to My 66000 ISA. The caller sends a number of
> > registers to the called (in accordance with ABI) and whether or not the
> > called can access callers memory through indirection. Called runs in a
> > different address space, with different privilege, under a potentially
> > different Guest OS. Here Return Address = 0x01 (a magic cookie).
> > <
> > When called executes a RET instruction, control returns to caller in his
> > own address space, at his privilege, in a core of his affinity,...
> > <
> > The called "subroutine" cannot tell that he was invoked by the message
> > or called locally, except by looking at RA being the magic cookie. This
> > works if safe stack is in use or not on both sides.
> > <
> > Indirection is my variant of PDP-11/70s MOV from and MOV to (alternate
> > address space). I even set it up to use the ASID of the caller when accessing
> > caller's memory via indirection.
> > <
> > Total number of instructions added: 2: Message Call, and Message Send.
> > Total number of instructions modified: 2: RET and EXIT detect magic
> > cookie.
> > <
> I was mostly thinking of, say, one wants to skip having dedicated
> encoding space for things like BRA and BSR, and instead encodes them via
> overloading ADD and similar, using special case logic for PC and LR and
> similar.
<
How do you prevent things like::
<
DIV IP,R7,R19
<
But then again, maybe YOU don't want to.
>
> Or, sort of like if one took the RISC-V route further and also left out
> things like JAL and JALR and similar.
<
Realistically, my JMP instructions are equivalent to:: MOV IP,Reg
>
> Though, this would severely limit direct branch displacements, likely
> requiring a fair number of cases to use indirect branching instead.
>
I should note: I have switches and method calls that do not require
jumps.....and ARE position independent.
>
>
> Granted, from a cost POV, invoking magic when certain registers are used
> in an encoding doesn't really save anything over having a dedicated
> encoding (and, behaviorally, a BRA or BSR is very different from an ADD;
> these funky edge cases would likely still need to be detected and
> handled by the instruction decoder).
>
> But, this thing could still have "appeal" to the "More RISC means
> smaller instruction listing" crowd.
>
>
> Eg:
> 0Xddssdd //LD/ST (Disp only, for peak RISC)
> 1Xddsstt //ALU
> 20=ADD, 21=SUB, 22=SHLD, 23=SHAD,
> 24=-, 25=AND, 26=OR, 27=XOR, ...
> 28=ADDI, 29=SUBI, 2A=SHLDI, 2B=SHADI,
> 2C=-, 2D=ANDI, 2E=ORI, 2F=XORI, ...
>
> Then skip out on all these "frivolous" features like, branch or constant
> load instructions (eg, "Why do you need larger constants when you can do
> a PC relative load?...").
<
You pollute the Data cache by running instruction stream stuff through it.
>
> Exercise for reader being how one would implement conditional branching
> with neither conditional branch nor compare-and-branch instructions.
>
> ...
>
>
> >> ...
> >>
> >> ...
> >>
> >>
> >>> Andrew.


Click here to read the complete article
Re: Around the bike shed: Instruction names and assembler syntax

<svrsnn$ct2$1@gal.iecc.com>

  copy mid

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

  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: Around the bike shed: Instruction names and assembler syntax
Date: Fri, 4 Mar 2022 02:15:19 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <svrsnn$ct2$1@gal.iecc.com>
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <svoejm$89e$1@dont-email.me> <svq7eh$int$1@newsreader4.netcologne.de> <svqd2i$s6d$1@dont-email.me>
Injection-Date: Fri, 4 Mar 2022 02:15:19 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="13218"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <svcqrj$jj6$1@newsreader4.netcologne.de> <svoejm$89e$1@dont-email.me> <svq7eh$int$1@newsreader4.netcologne.de> <svqd2i$s6d$1@dont-email.me>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Fri, 4 Mar 2022 02:15 UTC

According to Ivan Godard <ivan@millcomputing.com>:
>> Restricting the user to single-letter variables would not be such
>> a great idea, I think.
>
>Was highly successful in the original BASIC.

Uh, sort of. You could have letter-digit, too. The compiler was
stupendously fast for the sort of small student programs that
Dartmouth's system usually ran so the tiny name space was excusable.

If you wanted to write real programs, they had Fortran and eventually PL/I.

--
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: registers, was Around the bike shed: Instruction names and assembler syntax

<svrsvg$ct2$2@gal.iecc.com>

  copy mid

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

  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: registers, was Around the bike shed: Instruction names and assembler syntax
Date: Fri, 4 Mar 2022 02:19:28 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <svrsvg$ct2$2@gal.iecc.com>
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me> <2022Mar3.120929@mips.complang.tuwien.ac.at>
Injection-Date: Fri, 4 Mar 2022 02:19:28 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="13218"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <svcqrj$jj6$1@newsreader4.netcologne.de> <ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me> <2022Mar3.120929@mips.complang.tuwien.ac.at>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Fri, 4 Mar 2022 02:19 UTC

It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
>Stephen Fuld <sfuld@alumni.cmu.edu.invalid> writes:
>>Wasn't one of the results from the studies of generated code,that was
>>used to justify RISC, that "nice to write assembly in" features such as
>>complex and orthogonal addressing modes just weren't used in generated code?
>
>There are multiple aspects to this:
>
>* Compilers around 1980 may have had a hard time generating some of
> these addressing modes, and that's why they did not generate them.

The Berkley RISC project used the old Unix pcc compiler which had an adequate
but not great code generator. They invented register windows because it
didn't try to minimize register usage. At the same time the IBM 801 had
a really good compiler with graph coloring so it knew exactly which registers
were live when, and it had a regular register file (24 bits as I recall)
and just single loads and stores.

--
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: Around the bike shed: Instruction names and assembler syntax

<svrt50$o0h$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Thu, 3 Mar 2022 20:22:21 -0600
Organization: A noiseless patient Spider
Lines: 357
Message-ID: <svrt50$o0h$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de>
<nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com>
<svrlqg$dc7$1@dont-email.me>
<c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 4 Mar 2022 02:22:24 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="561c00b80957b04c158636cc827cf633";
logging-data="24593"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187W0uRtCgSkwadlB8gBrIj"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:2VH7KQbGDAsTWj+CR12RGzm1B98=
In-Reply-To: <c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com>
Content-Language: en-US
 by: BGB - Fri, 4 Mar 2022 02:22 UTC

On 3/3/2022 6:29 PM, MitchAlsup wrote:
> On Thursday, March 3, 2022 at 6:17:24 PM UTC-6, BGB wrote:
>> On 3/3/2022 1:45 PM, MitchAlsup wrote:
>>> On Thursday, March 3, 2022 at 1:07:21 PM UTC-6, BGB wrote:
>>>> On 3/3/2022 5:45 AM, a...@littlepinkcloud.invalid wrote:
>>>>> Stephen Fuld <sf...@alumni.cmu.edu.invalid> wrote:
>>>>>> On 3/2/2022 3:24 AM, a...@littlepinkcloud.invalid wrote:
>>>>>>> Theo Markettos <theom...@chiark.greenend.org.uk> wrote:
>>>>>>>>
>>>>>>>> (32 bit ARM is interesting as it was designed to be nice to program
>>>>>>>> in assembly, a consideration not normally part of instruction set
>>>>>>>> design these days)
>>>>>>>
>>>>>>> That's an interesting point. In my experience 64-bit ARM is as nice to
>>>>>>> program in assembly, at least as far as the set of base instructions
>>>>>>> goes, even though there are more instructions.
>>>>>>>
>>>>>>> I also believe that if an instruction set is nice to program in
>>>>>>> assembly, it's also nice to write a code generator for.
>>>>>>
>>>>>> Wasn't one of the results from the studies of generated code,that
>>>>>> was used to justify RISC, that "nice to write assembly in" features
>>>>>> such as complex and orthogonal addressing modes just weren't used in
>>>>>> generated code?
>>>>>
>>>>> Are complex addressing modes nice to write assembly in, though? I've
>>>>> never found it to be so. I think the problem identified with IBM 370
>>>>> was that many of the addressing modes weren't being used by compilers
>>>>> or by hand-cranked code, but I can't find any data for that one way or
>>>>> the other.
>>>>>
>>>>> I can see the point of orthogonality, as long as it's not extended too
>>>>> far. Of course no-one actually wants to have to use, say, a dedicated
>>>>> pair of registers to do a multiply.
>>>>>
>>>> There is likely some room for debate here.
>>>> Some people seemingly consider anything much beyond (Rb,Disp) to be
>>>> complex...
>>>>
>>>>
>>>> IME, ranking is roughly:
>>>> (Rb,Disp):
>>>> Very common
>>>> (Rb,Ri):
>>>> Also very common (2nd place)
>>>> (Scale matches access size)
>>>> (Rb,Ri*Sc, Disp)
>>>> Uncommon, Harder to make use of.
>>>>
>>> My 66000 has scale encoded in one place and width encoded in another.
>>> <
>>> As to utility: although they only make up 2%-3% of instruction stream
>>> they pretty much convert 2 instructions into 1 so they represent 2%-3%
>>> performance gain. That may not be enough to make the cut in some
>>> designs, and I disparage them not. On the other hand, while doing x86-64
>>> I saw how little HW it took to do them, and how much it helped when
>>> you really needed, and it saved a register when they were scant, too.
>>> <
>> Issue is that one needs to spare two extra bits to encode the separate
>> scale.
> <
> I found a place for these--I stole bits used in calculation instructions
> that negate operands.
>>
>> In my case, 32-bit encodings can only do:
>> MOV.x (Rb, Ri), Rn
>> Whereas Op64 and Op40x2 can do:
>> MOV.x (Rb, Ri*Sc, Disp11) //Op64
>> MOV.x (Rb, Ri*Sc, Disp5) //Op40x2
> <
> My equivalent does:
> MEM Rd,[Rbase+Rindex<<scale+disp32]

OK.

There is not a direct equivalent in BJX2, where the options are:
(Rb, Disp33s) //Jumbo
(Rb, Ri, Disp13s) // Op64
(Rb, Ri*Sc, Disp11s) //Op64

There is not a dedicated Ri*Sc encoding with no Disp field, the closest
equivalent being to encode it with Disp==0.

>>
>> Though, this is considered part of an ISA extension.
>>>>
>>>>
>>>> Then, "danger zone":
>>>> @Rb+, @-Rb: Uncommon and requires an extra write port (1)
>>>> @+Rb, @Rb-: Likewise
>>>> @@Rb: Devil crap.
>>>> ...
>>> These require all sorts of compromise, including more register write
>>> ports, more RAW dependencies, and are generally hard to pipeline.
>>> In effect: you may not have shot yourself in the foot, but you took an
>>> ice pick and drove it through nonetheless.
>> This is part of why I left them out.
>>>>
>>>> 1: Though, in premise, these can map to C's "*ptr++" and "*--ptr" modes
>>>> and similar, the occurrence of "*ptr++" in C isn't common enough to
>>>> really justify having a dedicated instruction for it (when the increment
>>>> or decrement can often be run in parallel with another instruction).
>>>>
>>>>
>>>> While using PC or GBR or similar as a base register are useful, I will
>>>> not consider them as separate address modes. Depending on the ISA asd
>>>> ABI design, these may end up fairly common (namely for loading/storing
>>>> global variables).
>>>>
>>>> Other semi-common cases are the ability to encode:
>>>> LEA (Rb, Disp), Rn //More Common
>>> <
>>> This is often used as a prelude to MEM Rd,[Rn+Ri<<s] when you don't
>>> have 2-registers+displacement memory references.
>>> <
>>
>>
>>>> LEA.x (Rb, Ri), Rn //Less Common
>>> <
>>> What does the ".x" signify ?
>> That is the type used to encode the scale used for Ri.
>> So:
>> LEA.B (Rb, Ri), Rn // Rn=Rb+Ri
>> LEA.W (Rb, Ri), Rn // Rn=Rb+Ri*2
>> LEA.L (Rb, Ri), Rn // Rn=Rb+Ri*4
>> LEA.Q (Rb, Ri), Rn // Rn=Rb+Ri*8
> <
> Can I ask if you were a bit peeved at Thomas' dislike of "dots" ?

I have them because they were inherited from GAS and SuperH.

But, dots aren't too bad, '/' and '+' and similar in opcode names are
worse...

One could argue that I had '?', but it isn't really part of the
instruction name per-se, so it doesn't count.

>>
>> This detail can be glossed over for the (Rb, Disp) case.
>>
>> In my case, for XLEA, only the .B encoding was provided in the base ISA,
>> and the others were provided indirectly via Op64 encodings.
>>
>> Partly this was because some other encodings occupied the same space
>> that might have otherwise been used for the other LEA's (and scaled
>> index LEA being fairly uncommon).
>>>>
>>>> This can almost be subsumed into ADD, except:
>>>> It is useful to be able to encode PC or GBR or similar as a base
>>>> If these are not available as GPRs
>>>> If pointers are "special" in some way, a plain ADD may not be usable.
>>> <
>>> You might also have different overflow/saturation conditions with
>>> ADD.
>> OK.
>>
>> I was thinking here mostly of things like capabilities and ISA's which
>> have different register widths or formats for integer and pointer types.
>>>>
>>>>
>>>> There are pros/cons, I am now leaning on the side of things that PC, LR,
>>>> SP, and GBR, are commonly referenced enough in other instructions that
>>>> it makes sense to have them available via the GPR encoding (assuming a
>>>> 32 or 64 register design).
>>> <
>>> IP is almost never used as an operand to other than memory reference
>>> instructions. Return address R0, SP R31are actual registers, So is FP R30,
>>> and Thread_Local_Data R16.
>> This is partly why I was thinking it might also make sense to alias it
>> with a Zero Register in most other contexts.
>>>>
>>>> A Zero register is also useful, but one trick here is to have a register
>>>> be interpreted as either PC or Zero depending on which register port it
>>>> is accessed from (any instruction which tries to use PC as an Index or
>>>> second argument will always get Zero).
>>>>
>>> In my opinion wasting a register to contain zero is simply a waste.
>>> So, I have STx #0,[Rbase+Rindex<<scale+Disp] and MOV Rd,#imm16
>>> when you really have to have it.
>> The main advantage of a Zero register would be that it makes it possible
>> to skip out on some encodings.
>>
>> Say:
>> MOV Rm, Rn -> OR Rm, ZR, Rn
>> NEG Rm, Rn -> SUB ZR, Rm, Rn
> <
> I have not seen a NEG yet, since Brian got his LLVM port up.
> <
> That is:
> CALK Rd,-R1,-R2
> <
> gets rid of almost all of the 1-operands. The kind of negation is
> dependent on the kind of calculation {integer is 2-s complement,
> logical is bit-inversion, FP is sign inversion.}
> <


Click here to read the complete article
Re: Around the bike shed: Instruction names and assembler syntax

<16521e18-012d-49f4-a3e5-478b7ce582ben@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:afc5:0:b0:663:1033:dcc7 with SMTP id y188-20020a37afc5000000b006631033dcc7mr1384149qke.53.1646362243692;
Thu, 03 Mar 2022 18:50:43 -0800 (PST)
X-Received: by 2002:a9d:1723:0:b0:59a:7342:f36b with SMTP id
i35-20020a9d1723000000b0059a7342f36bmr21173325ota.282.1646362243423; Thu, 03
Mar 2022 18:50:43 -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: Thu, 3 Mar 2022 18:50:43 -0800 (PST)
In-Reply-To: <svrt50$o0h$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:20e8:8981:e8d6:173d;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:20e8:8981:e8d6:173d
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com> <svrlqg$dc7$1@dont-email.me>
<c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com> <svrt50$o0h$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <16521e18-012d-49f4-a3e5-478b7ce582ben@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 04 Mar 2022 02:50:43 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 67
 by: MitchAlsup - Fri, 4 Mar 2022 02:50 UTC

On Thursday, March 3, 2022 at 8:22:28 PM UTC-6, BGB wrote:
> On 3/3/2022 6:29 PM, MitchAlsup wrote:
>
> If one were trying to "distill things down to the essence of RISC" (in a
> possibly misguided way), may as well also leave out things like MUL and
> DIV and similar.
<
Inarguably 432 went too far, arguably VAX went too far in the CISC
directions.
<
I have been arguing that many RISCs went too far in the RISC direction,
too.
<
In particular, My 66000 has 32-bit and 64-bit constants for anything
needed (can't be done at compile time). In the case of STs, which
have both 32 and 64 bit displacements, but also 32 and 64-bit
immediates (as well as 5-bit immediates). This left me with inst-
ructons as long as 5-words (360 sized words not x86 sized words).
<
Surprisingly, this increases code density ! That is correct, making
instructions longer in the right ways makes the code footprint
smaller !
<
> >>
> >> Or, sort of like if one took the RISC-V route further and also left out
> >> things like JAL and JALR and similar.
> > <
> > Realistically, my JMP instructions are equivalent to:: MOV IP,Reg
> This isn't too far off from my case either within the pipeline.
> >>
> >> Though, this would severely limit direct branch displacements, likely
> >> requiring a fair number of cases to use indirect branching instead.
> >>
> > I should note: I have switches and method calls that do not require
> > jumps.....and ARE position independent.
> They are position-independent in BJX2 as well...
> >>
> >>
<snip>
> > <
> > You pollute the Data cache by running instruction stream stuff through it.
> Yes, granted, but more traditional RISCs did do it this way, and it IS a
> way to make the ISA listing smaller...
>
> This idea was partly intended as a joke, like taking a particular
> interpretation of the RISC philosophy "possibly a little too far".
>
I was there in early 1980s, I saw the malformed architectures, I saw
the limitations of the arguments, and I had to keep quiet and get my
stuff done.
<
More recently, I have not been under time pressure of "schedule" and
have produced much better art of architecture than what can be done
when a schedule indicates "this must be done by then".
<
It is like making Boef Bourguignon in 30 minutes.
>
> Then again, apart from needing some way to pull of conditional jumps in
> a "sane" way, this isn't likely to be "that" unworkable (performance and
> code density not withstanding).
>
> Could probably include a T-bit and predication.
> SUB R8, R9, ZR //Interpreted as "CMPGT R8, R9", Updates T
> ADD?T PC, 120, PC
>
> Likewise:
> AND R8, R9, ZR //Interpreted as TEST

Re: Around the bike shed: Instruction names and assembler syntax

<j8dt3tF15tiU1@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Fri, 4 Mar 2022 09:23:41 +0200
Organization: Tidorum Ltd
Lines: 32
Message-ID: <j8dt3tF15tiU1@mid.individual.net>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svoejm$89e$1@dont-email.me> <svq7eh$int$1@newsreader4.netcologne.de>
<svqd2i$s6d$1@dont-email.me> <svrsnn$ct2$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net TCK96jqMFkXhTcya2i5yegKL1JGfjPT2yDdvBNba5mWraNyI7X
Cancel-Lock: sha1:flIcA3EYkc/+Yyhd0WYftDq15R4=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0)
Gecko/20100101 Thunderbird/91.6.0
Content-Language: en-US
In-Reply-To: <svrsnn$ct2$1@gal.iecc.com>
 by: Niklas Holsti - Fri, 4 Mar 2022 07:23 UTC

On 2022-03-04 4:15, John Levine wrote:
> According to Ivan Godard <ivan@millcomputing.com>:
>>> Restricting the user to single-letter variables would not be such
>>> a great idea, I think.
>>
>> Was highly successful in the original BASIC.
>
> Uh, sort of. You could have letter-digit, too. The compiler was
> stupendously fast for the sort of small student programs that
> Dartmouth's system usually ran so the tiny name space was excusable.
>
> If you wanted to write real programs, they had Fortran and eventually PL/I.

In a former occupation, a boss of mine had written a program in HP BASIC
to control a radio telescope with an HP-2100 mini (yes, magnetic core
memory, 32 KB).

The program was getting rather large (using up lots and lots of punched
paper tape). He had an A4 sheet of paper ruled into boxes, with A-Z on
the vertical axis and 0-9 on the horizontal. Whenever he needed a new
variable name he looked for an empty box, defined the variable, and
ticked the box.

When all boxes were ticked he started using arrays, with a specific role
for each element.

And of course comments in the source code consumed run-time memory
space, so there were not many of those...

I introduced HP Algol and we were happier. Programs ran faster, too. And
were easily made multi-threaded with a little bit of assembler.

Re: Around the bike shed: Instruction names and assembler syntax

<svsesh$3k1$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-c7b-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Fri, 4 Mar 2022 07:25:05 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <svsesh$3k1$1@newsreader4.netcologne.de>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de>
<nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com>
<svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com>
<svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com>
<svrlqg$dc7$1@dont-email.me>
<c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com>
Injection-Date: Fri, 4 Mar 2022 07:25:05 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-c7b-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:c7b:0:7285:c2ff:fe6c:992d";
logging-data="3713"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 4 Mar 2022 07:25 UTC

MitchAlsup <MitchAlsup@aol.com> schrieb:
> On Thursday, March 3, 2022 at 6:17:24 PM UTC-6, BGB wrote:

>> Say:
>> MOV Rm, Rn -> OR Rm, ZR, Rn
>> NEG Rm, Rn -> SUB ZR, Rm, Rn
><
> I have not seen a NEG yet, since Brian got his LLVM port up.

I can show you some :-)

they are not frequent, but they exist. This is for the Polyhedron
benchmark fatigue2.f90, with the latest version of the compiler.

$ grep "add.*#0,-" fatigue2.s
fadd r3,#0,-r13
fadd r1,#0,-r1
fadd r4,#0,-r1
fadd r28,#0,-r28
fadd r28,#0,-r27
fadd r10,#0,-r10
fadd r6,#0,-r6
fadd r6,#0,-r6
fadd r7,#0,-r7
fadd r6,#0,-r6
fadd r7,#0,-r7
fadd r6,#0,-r6
fadd r13,#0,-r13
fadd r11,#0,-r11
fadd r6,#0,-r6
add r7,#0,-r7
add r10,#0,-r9
add r2,#0,-r14
fadd r4,#0,-r4
fadd r2,#0,-r2

$ wc -l fatigue2.s
15727 fatigue2.s

A typical example for the floating point stuff is

fmul r7,r7,r4
fmul r6,r6,r4
fadd r6,#0,-r6
fmac r6,r14,r13,r6
fadd r7,#0,-r7
fmac r7,r14,r9,r7
fmul r7,r7,r15
fmul r6,r6,r15

and the example for r7 is followed by

add r7,#0,-r7
..LBB14_47: ; %vector.body282.epil
; =>This Inner Loop Header: Depth=1
sll r8,r6,<0:3>
.loc 1 1392 1 ; fatigue2.f90:1392:1
or r8,r8,#8
std r5,[r8,r2,0]
std r5,[r8,r2,-8]
std r5,[r8,r2,16]
std r5,[r8,r2,8]
add r6,r6,#4
add r8,r7,#1
cmp r7,r8,r7
srl r7,r7,<1:12>
cmp r9,r7,#1
mov r7,r8
bne r9,.LBB14_47

Re: Around the bike shed: Instruction names and assembler syntax

<svsn29$ald$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Fri, 4 Mar 2022 03:44:38 -0600
Organization: A noiseless patient Spider
Lines: 133
Message-ID: <svsn29$ald$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de>
<nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com>
<svrlqg$dc7$1@dont-email.me>
<c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com>
<svrt50$o0h$1@dont-email.me>
<16521e18-012d-49f4-a3e5-478b7ce582ben@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 4 Mar 2022 09:44:41 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="561c00b80957b04c158636cc827cf633";
logging-data="10925"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+90YXCKQsqVHdPSkrUCEt6"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:wlojUca+bqCRjoD1kWYje6/gk40=
In-Reply-To: <16521e18-012d-49f4-a3e5-478b7ce582ben@googlegroups.com>
Content-Language: en-US
 by: BGB - Fri, 4 Mar 2022 09:44 UTC

On 3/3/2022 8:50 PM, MitchAlsup wrote:
> On Thursday, March 3, 2022 at 8:22:28 PM UTC-6, BGB wrote:
>> On 3/3/2022 6:29 PM, MitchAlsup wrote:
>>
>> If one were trying to "distill things down to the essence of RISC" (in a
>> possibly misguided way), may as well also leave out things like MUL and
>> DIV and similar.
> <
> Inarguably 432 went too far, arguably VAX went too far in the CISC
> directions.

What little I looked at iAPX 432, it was a bit WTF.

> <
> I have been arguing that many RISCs went too far in the RISC direction,
> too.

Possibly true.
The first wave has mostly died off now.

I never saw the first wave of RISCs firsthand.

Pretty much my whole life has been in the era of x86-based desktop PCs
and similar.

Have seen some amount of complaining about stuff "not being RISC
enough", which often amounts to them wanting the ISA listing to be
fairly small.

So, the joke ISA was partly a case of "what if one tried to design an
ISA like how people complaining about things not being RISCy enough seem
to want it". This was sort of the direction I tried to go with the idea.

Most traditional RISCs I am aware of, do have dedicated branch
instructions and similar though, but omitting them could be a way to
make the listing smaller, which does seem to be a major indicator of
"RISCness" in many peoples' minds, ...

Making an "actually good" ISA would note really be the priority of such
a design though (hence the lack of indexed load/store, and suggestion of
loading constants from memory, both of which are "RISC" things, but not
necessarily "good idea" things...).

> <
> In particular, My 66000 has 32-bit and 64-bit constants for anything
> needed (can't be done at compile time). In the case of STs, which
> have both 32 and 64 bit displacements, but also 32 and 64-bit
> immediates (as well as 5-bit immediates). This left me with inst-
> ructons as long as 5-words (360 sized words not x86 sized words).
> <
> Surprisingly, this increases code density ! That is correct, making
> instructions longer in the right ways makes the code footprint
> smaller !
> <

Yeah. There are possible advantages to a consistent encoding, rather
than an ad-hoc collection of encodings.

But, alas...

>>>>
>>>> Or, sort of like if one took the RISC-V route further and also left out
>>>> things like JAL and JALR and similar.
>>> <
>>> Realistically, my JMP instructions are equivalent to:: MOV IP,Reg
>> This isn't too far off from my case either within the pipeline.
>>>>
>>>> Though, this would severely limit direct branch displacements, likely
>>>> requiring a fair number of cases to use indirect branching instead.
>>>>
>>> I should note: I have switches and method calls that do not require
>>> jumps.....and ARE position independent.
>> They are position-independent in BJX2 as well...
>>>>
>>>>
> <snip>
>>> <
>>> You pollute the Data cache by running instruction stream stuff through it.
>> Yes, granted, but more traditional RISCs did do it this way, and it IS a
>> way to make the ISA listing smaller...
>>
>> This idea was partly intended as a joke, like taking a particular
>> interpretation of the RISC philosophy "possibly a little too far".
>>
> I was there in early 1980s, I saw the malformed architectures, I saw
> the limitations of the arguments, and I had to keep quiet and get my
> stuff done.
> <
> More recently, I have not been under time pressure of "schedule" and
> have produced much better art of architecture than what can be done
> when a schedule indicates "this must be done by then".
> <
> It is like making Boef Bourguignon in 30 minutes.

In my case, I ended up where I ended up via incremental fiddly.
Could maybe be better, but not come up with much of anything "clearly
better" than what I have already (even as much as what I have already
kinda sucks in some ways).

>>
>> Then again, apart from needing some way to pull of conditional jumps in
>> a "sane" way, this isn't likely to be "that" unworkable (performance and
>> code density not withstanding).
>>
>> Could probably include a T-bit and predication.
>> SUB R8, R9, ZR //Interpreted as "CMPGT R8, R9", Updates T
>> ADD?T PC, 120, PC
>>
>> Likewise:
>> AND R8, R9, ZR //Interpreted as TEST
>

I went and wrote a quick and dirty spec for the idea at least (doubtful
I will do much with it beyond this).

This was amid getting around to implementing S3M playback support for my
MOD player code.

After dealing with some of this, I start to suspect some of this stuff
could probably be done "better" with a format partway between a Tracker
format and MIDI. But, this partly falls more into "meh, whatever"
territory (I have neither the musical skills nor motivation to make
effective use of such a thing).

Re: Around the bike shed: Instruction names and assembler syntax

<svsriq$a5m$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-c7b-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Fri, 4 Mar 2022 11:01:46 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <svsriq$a5m$1@newsreader4.netcologne.de>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de>
<nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com>
<svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com>
<svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com>
<svrlqg$dc7$1@dont-email.me>
<c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com>
<svrt50$o0h$1@dont-email.me>
<16521e18-012d-49f4-a3e5-478b7ce582ben@googlegroups.com>
<svsn29$ald$1@dont-email.me>
Injection-Date: Fri, 4 Mar 2022 11:01:46 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-c7b-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:c7b:0:7285:c2ff:fe6c:992d";
logging-data="10422"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 4 Mar 2022 11:01 UTC

BGB <cr88192@gmail.com> schrieb:
> On 3/3/2022 8:50 PM, MitchAlsup wrote:
>> On Thursday, March 3, 2022 at 8:22:28 PM UTC-6, BGB wrote:
>>> On 3/3/2022 6:29 PM, MitchAlsup wrote:
>>>
>>> If one were trying to "distill things down to the essence of RISC" (in a
>>> possibly misguided way), may as well also leave out things like MUL and
>>> DIV and similar.
>> <
>> Inarguably 432 went too far, arguably VAX went too far in the CISC
>> directions.
>
> What little I looked at iAPX 432, it was a bit WTF.
>
>
>> <
>> I have been arguing that many RISCs went too far in the RISC direction,
>> too.
>
> Possibly true.
> The first wave has mostly died off now.
>
> I never saw the first wave of RISCs firsthand.

I worked a lot on HP-PA workstations. After IBM mainframes using
3270-compatible terminals, using a variety of HP 9000/700 series
machines. HP-UX wasn't great, but it served, and because they
had been purchased as CAD workstations, their screens were _huge_.
Processors were HP-PA, at least in later days.

I also worked on SGI-Machines using terminals, MIPS-based, and
a bit on IBM RS/6000 systems (on one occasion only, compiling
code on them for the Distributed Internet Crack of a 40-bit
DES code - anybody else remember that one? Terje, this sounds
like somthing that would have appealed to you.)

Re: Around the bike shed: Instruction names and assembler syntax

<yNadnW-i3PPul7__nZ2dnUU7-QHNnZ2d@supernews.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!2.eu.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 04 Mar 2022 06:47:47 -0600
Sender: Andrew Haley <aph@zarquon.pink>
From: aph...@littlepinkcloud.invalid
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Newsgroups: comp.arch
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk> <svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk> <ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me> <lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <1c9f8d6a-e8ac-41f5-adf7-f3fd369904a7n@googlegroups.com>
User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX) (Linux/4.18.0-305.25.1.el8_4.x86_64 (x86_64))
Message-ID: <yNadnW-i3PPul7__nZ2dnUU7-QHNnZ2d@supernews.com>
Date: Fri, 04 Mar 2022 06:47:47 -0600
Lines: 22
X-Trace: sv3-ESi17q2ljqs+D5CRvPcjAEm81b6DibrFkL/2kpeo/wOHQOL8tVJ55kPkUm/yTtJDu1djlyFGDqai2N4!eoo9zJ5V/ukdWI1Tfbmw1sBMaYTD620FcZbmc13NwlgLLjiyN/gyexZwOOTaHaGCeUu3de06LhhL!3ZiEhTCc
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2031
 by: aph...@littlepinkcloud.invalid - Fri, 4 Mar 2022 12:47 UTC

MitchAlsup <MitchAlsup@aol.com> wrote:
> Brian

which one?

> had little trouble using:
> MEM Rd,[Rbase+Rindex<<size+Displacement]
> as the model.

That form turns out to be very useful on x86 for running Java, where
an array has a descriptor at its start, followed by the data. That was
one of the very few times I can think of where I've missed an x86 CISC
feature. In practice though, when running on ARM the offset adjustment
can be lifted out of loops, so it doesn't seem much to matter.

> With the additions of:
> Rbase = R0 substitutes IP as base register
> Rindex = R0 substituted 0x0 as the index

Yeah, I think I see.

Andrew.

Re: Around the bike shed: Instruction names and assembler syntax

<8500ec48-e610-4a44-8266-42130b412b10n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:a515:0:b0:47b:555:5c4d with SMTP id o21-20020a37a515000000b0047b05555c4dmr2668594qke.458.1646405471223;
Fri, 04 Mar 2022 06:51:11 -0800 (PST)
X-Received: by 2002:a4a:d21b:0:b0:2e2:113:db90 with SMTP id
c27-20020a4ad21b000000b002e20113db90mr21553153oos.50.1646405471012; Fri, 04
Mar 2022 06:51:11 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!border1.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: Fri, 4 Mar 2022 06:51:10 -0800 (PST)
In-Reply-To: <svsesh$3k1$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:1110:4bc:5009:e298;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:1110:4bc:5009:e298
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com> <svrlqg$dc7$1@dont-email.me>
<c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com> <svsesh$3k1$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8500ec48-e610-4a44-8266-42130b412b10n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 04 Mar 2022 14:51:11 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 72
 by: MitchAlsup - Fri, 4 Mar 2022 14:51 UTC

On Friday, March 4, 2022 at 1:25:08 AM UTC-6, Thomas Koenig wrote:
> MitchAlsup <Mitch...@aol.com> schrieb:
> > On Thursday, March 3, 2022 at 6:17:24 PM UTC-6, BGB wrote:
>
> >> Say:
> >> MOV Rm, Rn -> OR Rm, ZR, Rn
> >> NEG Rm, Rn -> SUB ZR, Rm, Rn
> ><
> > I have not seen a NEG yet, since Brian got his LLVM port up.
> I can show you some :-)
>
> they are not frequent, but they exist. This is for the Polyhedron
> benchmark fatigue2.f90, with the latest version of the compiler.
>
> $ grep "add.*#0,-" fatigue2.s
> fadd r3,#0,-r13
> fadd r1,#0,-r1
> fadd r4,#0,-r1
> fadd r28,#0,-r28
> fadd r28,#0,-r27
> fadd r10,#0,-r10
> fadd r6,#0,-r6
> fadd r6,#0,-r6
> fadd r7,#0,-r7
> fadd r6,#0,-r6
> fadd r7,#0,-r7
> fadd r6,#0,-r6
> fadd r13,#0,-r13
> fadd r11,#0,-r11
> fadd r6,#0,-r6
> add r7,#0,-r7
> add r10,#0,-r9
> add r2,#0,-r14
> fadd r4,#0,-r4
> fadd r2,#0,-r2
>
> $ wc -l fatigue2.s
> 15727 fatigue2.s
>
> A typical example for the floating point stuff is
>
> fmul r7,r7,r4
> fmul r6,r6,r4
> fadd r6,#0,-r6
> fmac r6,r14,r13,r6
<
Above and below looks like a missed optimization, as
FMAC Rd,Rm,Rp,-Ra is available.
<
> fadd r7,#0,-r7
> fmac r7,r14,r9,r7
> fmul r7,r7,r15
> fmul r6,r6,r15
>
> and the example for r7 is followed by
>
> add r7,#0,-r7
> .LBB14_47: ; %vector.body282.epil
> ; =>This Inner Loop Header: Depth=1
> sll r8,r6,<0:3>
> .loc 1 1392 1 ; fatigue2.f90:1392:1
> or r8,r8,#8
> std r5,[r8,r2,0]
> std r5,[r8,r2,-8]
> std r5,[r8,r2,16]
> std r5,[r8,r2,8]
> add r6,r6,#4
> add r8,r7,#1
> cmp r7,r8,r7
> srl r7,r7,<1:12>
> cmp r9,r7,#1
> mov r7,r8
> bne r9,.LBB14_47

Re: Around the bike shed: Instruction names and assembler syntax

<5199e94f-6bfa-4770-98cd-3e2666dc4691n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5a91:0:b0:2de:25c5:1d68 with SMTP id c17-20020ac85a91000000b002de25c51d68mr31687595qtc.94.1646405641993;
Fri, 04 Mar 2022 06:54:01 -0800 (PST)
X-Received: by 2002:a9d:2f61:0:b0:5af:5d99:29ed with SMTP id
h88-20020a9d2f61000000b005af5d9929edmr23421412otb.142.1646405641396; Fri, 04
Mar 2022 06:54:01 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 4 Mar 2022 06:54:01 -0800 (PST)
In-Reply-To: <svsn29$ald$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:1110:4bc:5009:e298;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:1110:4bc:5009:e298
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com> <svrlqg$dc7$1@dont-email.me>
<c8b09a09-4666-45e6-8425-cd9332df29adn@googlegroups.com> <svrt50$o0h$1@dont-email.me>
<16521e18-012d-49f4-a3e5-478b7ce582ben@googlegroups.com> <svsn29$ald$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5199e94f-6bfa-4770-98cd-3e2666dc4691n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 04 Mar 2022 14:54:01 +0000
Content-Type: text/plain; charset="UTF-8"
 by: MitchAlsup - Fri, 4 Mar 2022 14:54 UTC

On Friday, March 4, 2022 at 3:44:44 AM UTC-6, BGB wrote:
> On 3/3/2022 8:50 PM, MitchAlsup wrote:
> > On Thursday, March 3, 2022 at 8:22:28 PM UTC-6, BGB wrote:
> >> On 3/3/2022 6:29 PM, MitchAlsup wrote:
> >>
> >> If one were trying to "distill things down to the essence of RISC" (in a
> >> possibly misguided way), may as well also leave out things like MUL and
> >> DIV and similar.
> > <
> > Inarguably 432 went too far, arguably VAX went too far in the CISC
> > directions.
> What little I looked at iAPX 432, it was a bit WTF.
> > <
> > I have been arguing that many RISCs went too far in the RISC direction,
> > too.
> Possibly true.
> The first wave has mostly died off now.
>
> I never saw the first wave of RISCs firsthand.
<
I was in the prime of life................alas
>
> Pretty much my whole life has been in the era of x86-based desktop PCs
> and similar.
>
>
> Have seen some amount of complaining about stuff "not being RISC
> enough", which often amounts to them wanting the ISA listing to be
> fairly small.
>
> So, the joke ISA was partly a case of "what if one tried to design an
> ISA like how people complaining about things not being RISCy enough seem
> to want it". This was sort of the direction I tried to go with the idea.
>
>
> Most traditional RISCs I am aware of, do have dedicated branch
> instructions and similar though, but omitting them could be a way to
> make the listing smaller, which does seem to be a major indicator of
> "RISCness" in many peoples' minds, ...
>
> Making an "actually good" ISA would note really be the priority of such
> a design though (hence the lack of indexed load/store, and suggestion of
> loading constants from memory, both of which are "RISC" things, but not
> necessarily "good idea" things...).
<
I started My 66000 in April of 2006 and have been making incremental
improvements ever since.
> > <
> > In particular, My 66000 has 32-bit and 64-bit constants for anything
> > needed (can't be done at compile time). In the case of STs, which
> > have both 32 and 64 bit displacements, but also 32 and 64-bit
> > immediates (as well as 5-bit immediates). This left me with inst-
> > ructons as long as 5-words (360 sized words not x86 sized words).
> > <
> > Surprisingly, this increases code density ! That is correct, making
> > instructions longer in the right ways makes the code footprint
> > smaller !
> > <
> Yeah. There are possible advantages to a consistent encoding, rather
> than an ad-hoc collection of encodings.
>
> But, alas...
> >>>>
> >>>> Or, sort of like if one took the RISC-V route further and also left out
> >>>> things like JAL and JALR and similar.
> >>> <
> >>> Realistically, my JMP instructions are equivalent to:: MOV IP,Reg
> >> This isn't too far off from my case either within the pipeline.
> >>>>
> >>>> Though, this would severely limit direct branch displacements, likely
> >>>> requiring a fair number of cases to use indirect branching instead.
> >>>>
> >>> I should note: I have switches and method calls that do not require
> >>> jumps.....and ARE position independent.
> >> They are position-independent in BJX2 as well...
> >>>>
> >>>>
> > <snip>
> >>> <
> >>> You pollute the Data cache by running instruction stream stuff through it.
> >> Yes, granted, but more traditional RISCs did do it this way, and it IS a
> >> way to make the ISA listing smaller...
> >>
> >> This idea was partly intended as a joke, like taking a particular
> >> interpretation of the RISC philosophy "possibly a little too far".
> >>
> > I was there in early 1980s, I saw the malformed architectures, I saw
> > the limitations of the arguments, and I had to keep quiet and get my
> > stuff done.
> > <
> > More recently, I have not been under time pressure of "schedule" and
> > have produced much better art of architecture than what can be done
> > when a schedule indicates "this must be done by then".
> > <
> > It is like making Boef Bourguignon in 30 minutes.
<
> In my case, I ended up where I ended up via incremental fiddly.
<
The word "mung" comes to mind.......
<
> Could maybe be better, but not come up with much of anything "clearly
> better" than what I have already (even as much as what I have already
> kinda sucks in some ways).
> >>
> >> Then again, apart from needing some way to pull of conditional jumps in
> >> a "sane" way, this isn't likely to be "that" unworkable (performance and
> >> code density not withstanding).
> >>
> >> Could probably include a T-bit and predication.
> >> SUB R8, R9, ZR //Interpreted as "CMPGT R8, R9", Updates T
> >> ADD?T PC, 120, PC
> >>
> >> Likewise:
> >> AND R8, R9, ZR //Interpreted as TEST
> >
> I went and wrote a quick and dirty spec for the idea at least (doubtful
> I will do much with it beyond this).
>
>
> This was amid getting around to implementing S3M playback support for my
> MOD player code.
>
>
> After dealing with some of this, I start to suspect some of this stuff
> could probably be done "better" with a format partway between a Tracker
> format and MIDI. But, this partly falls more into "meh, whatever"
> territory (I have neither the musical skills nor motivation to make
> effective use of such a thing).

Re: registers, was Around the bike shed: Instruction names and assembler syntax

<164640748069.10246.9397714480845474848@media.vsta.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: van...@vsta.org (Andy Valencia)
Newsgroups: comp.arch
Subject: Re: registers, was Around the bike shed: Instruction names and assembler syntax
Date: Fri, 04 Mar 2022 07:24:40 -0800
Lines: 17
Message-ID: <164640748069.10246.9397714480845474848@media.vsta.org>
References: <svrsvg$ct2$2@gal.iecc.com> <svcqrj$jj6$1@newsreader4.netcologne.de> <ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me> <2022Mar3.120929@mips.complang.tuwien.ac.at>
X-Trace: individual.net 1OMVN+gPnb8Rgct8Cvz3YgdOZmtCAVJ34gs7ko6ztwm1iwiKYs
X-Orig-Path: media
Cancel-Lock: sha1:/KGgeu+67m0MjpwnEmM4v+LAuC0=
User-Agent: rn.py v0.0.1
 by: Andy Valencia - Fri, 4 Mar 2022 15:24 UTC

John Levine <johnl@taugh.com> writes:
> The Berkley RISC project used the old Unix pcc compiler which had an adequate
> but not great code generator.

The coder had to use "register" declarations to do the register allocation
(manually). If you picked the right number of such, and if your code
generation target templates for that CPU lined up, you could get tolerable
code. (I remember code bases with "reg1", "reg2", etc. modifiers so you
could ifdef to fit against a given target's register resources.)

The whole design of pcc's code generation was hostile to the code generator
deciding any of these tradeoffs. I suspect that's why this generation of
compiler technology has faded away without a trace.

Andy Valencia
Home page: https://www.vsta.org/andy/
To contact me: https://www.vsta.org/contact/andy.html

Re: registers, was Around the bike shed: Instruction names and assembler syntax

<svtgom$1urb$1@gal.iecc.com>

  copy mid

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

  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: registers, was Around the bike shed: Instruction names and assembler syntax
Date: Fri, 4 Mar 2022 17:03:18 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <svtgom$1urb$1@gal.iecc.com>
References: <svrsvg$ct2$2@gal.iecc.com> <svodqv$rc$1@dont-email.me> <2022Mar3.120929@mips.complang.tuwien.ac.at> <164640748069.10246.9397714480845474848@media.vsta.org>
Injection-Date: Fri, 4 Mar 2022 17:03:18 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="64363"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <svrsvg$ct2$2@gal.iecc.com> <svodqv$rc$1@dont-email.me> <2022Mar3.120929@mips.complang.tuwien.ac.at> <164640748069.10246.9397714480845474848@media.vsta.org>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Fri, 4 Mar 2022 17:03 UTC

According to Andy Valencia <vandys@vsta.org>:
>John Levine <johnl@taugh.com> writes:
>> The Berkley RISC project used the old Unix pcc compiler which had an adequate
>> but not great code generator. ...

>The whole design of pcc's code generation was hostile to the code generator
>deciding any of these tradeoffs. I suspect that's why this generation of
>compiler technology has faded away without a trace.

In its defense, pcc did what it was designed to do. It generated decent code
for C programs on a wide range of targets, and it was small enough to fit on
a PDP-11 where you got 64K of code and 64K of data.

On modern computers where you can always keep the internal form of an entire program
in RAM, you can do a lot better.

R's,
John
--
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: registers, was Around the bike shed: Instruction names and assembler syntax

<0f4c207f-b126-4e35-8220-cab1220033c8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:309:b0:2dd:53e9:ae80 with SMTP id q9-20020a05622a030900b002dd53e9ae80mr32267142qtw.557.1646413402957;
Fri, 04 Mar 2022 09:03:22 -0800 (PST)
X-Received: by 2002:a05:6870:f297:b0:c5:570:32da with SMTP id
u23-20020a056870f29700b000c5057032damr109429oap.106.1646413402711; Fri, 04
Mar 2022 09:03:22 -0800 (PST)
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!border1.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: Fri, 4 Mar 2022 09:03:22 -0800 (PST)
In-Reply-To: <164640748069.10246.9397714480845474848@media.vsta.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:1110:4bc:5009:e298;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:1110:4bc:5009:e298
References: <svrsvg$ct2$2@gal.iecc.com> <svcqrj$jj6$1@newsreader4.netcologne.de>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<2022Mar3.120929@mips.complang.tuwien.ac.at> <164640748069.10246.9397714480845474848@media.vsta.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0f4c207f-b126-4e35-8220-cab1220033c8n@googlegroups.com>
Subject: Re: registers, was Around the bike shed: Instruction names and
assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 04 Mar 2022 17:03:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 35
 by: MitchAlsup - Fri, 4 Mar 2022 17:03 UTC

On Friday, March 4, 2022 at 9:29:31 AM UTC-6, Andy Valencia wrote:
> John Levine <jo...@taugh.com> writes:
> > The Berkley RISC project used the old Unix pcc compiler which had an adequate
> > but not great code generator.
> The coder had to use "register" declarations to do the register allocation
> (manually). If you picked the right number of such, and if your code
> generation target templates for that CPU lined up, you could get tolerable
> code. (I remember code bases with "reg1", "reg2", etc. modifiers so you
> could ifdef to fit against a given target's register resources.)
<
When I did the Denelcor HEP port of this compiler, I rewrote the entire backend;
throwing away the "take a guess and try again" code generation philosophy;
and creating a code generator that generated perfect straight line code--but
having to forget everything at labels. The code generated by my back end ran
2× as fast as the native port.
>
> The whole design of pcc's code generation was hostile to the code generator
> deciding any of these tradeoffs. I suspect that's why this generation of
> compiler technology has faded away without a trace.
<
The seminal paper of this kind of compiler code generator was "maximal
munching method"--which by a careless oversight '<' was replaced by '>'
ran as the "minimal munching method"--CMU circa 1975 for VAX-like ISAs.
>
> Andy Valencia
> Home page: https://www.vsta.org/andy/
> To contact me: https://www.vsta.org/contact/andy.html

Pages:12345678910
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor