Re: My 66000 and High word facility

Liste des GroupesRevenir à c arch 
Sujet : Re: My 66000 and High word facility
De : cr88192 (at) *nospam* gmail.com (BGB)
Groupes : comp.arch
Date : 19. Aug 2024, 20:18:29
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va05q8$2vuo4$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Mozilla Thunderbird
On 8/17/2024 3:40 PM, Brett wrote:
Thomas Koenig <tkoenig@netcologne.de> wrote:
Brett <ggtgp@yahoo.com> schrieb:
MitchAlsup1 <mitchalsup@aol.com> wrote:
>
Anytime one removes more "MOVs and saves and restore" instructions
than the called subroutine contains within the prologue and epilogue
bounds, the subroutine should be inlined.
>
In principle, yes.
>
You can either use C++ headers, which result in huge compilation
times, or you can use LTO.  LTO, if done right, is a huge time-eater
(I was looking for an English translation of "Zeitgrab", literarlly
"time grave" or "time tomb", this was the best I could come up with).
>
[...]
>
When HW is doing the saves, it does them in a known order and
can mark the registers "in use" or "busy" instantaneously and
clear that status as data arrives. When SW is doing the same,
SW ahs to wait for the instruction to arrive and then do them
one-to-small numbers at a time. HW is not so constrained.
>
Ok, so the hardware is smart enough.
But has anyone told the software guys?
>
Software guys generally work with high-level languages where this is
irrelevant, except for...
>
Of course convincing programmers to RTFM is futile. ;(
>
...people writing operating systems or drivers, and they better
read the docs for the architecture they are working on.
>
So we are back to finding any downsides for 64 registers in My 66000.
>
Encoding space.  Not sure if you have Mitch's document,
 Section 4.1 Instruction Template, Figure 25, page 33-179
 
but having
one more bit per register would reduce the 16-bit data in the
offset to 14 (no way you can expand that by a factor of four),
 14 is plenty, you can actually do 12 and pack those instructions in with
shifts which have a pair of 6 bit fields, width and offset. This would
expand some constants but you make it back in shorter code with less MOVs
and more performance.
 
FWIW, Ld/St Disp and Imm fields in BJX2 are:
   Baseline: 9-bit, Zero (Common) or One (Rare) Extended
   XG2:
     Disp9u -> Disp10s
     Imm9u -> Imm10u | Imm10s (*1)
     Imm9n -> Imm10n
*1: Most ops extend Imm9u to Imm10u, except AND and RSUB, which are Imm10s. At the time, it was because I realized I needed one-extended AND more often than I needed 10-bit AND, and there were no more Imm9 spots available at this point. RSUB just came along for the ride.
If a Jumbo-Imm (FE) prefix is used, Immed and Disp fields increase to 33-bits sign-extended.
Ironically, despite being smaller that RV imm fields, there doesn't seem to be a large difference in statistical hit-rate, and Jumbo prefixes give an advantage (a 64-bit Jumbo op being better than a 3-op LUI+ADD+OP sequence).
One minor downside is that there is not currently support for unaligned displacements, which while rare isn't strictly zero.
Though mostly unused, as typically encoded as:
   FFw0-Uvii-F0nm-0eiZ  Ld/St (Rm, Disp17s), Rn
Which encodes multiple addressing sub-modes:
   (Rm, Disp17s)        //Scaled as usual
   (Rm, Disp17s*1)      //Not yet implemented (*1)
   (Rm, Ro, Disp11u)    //Optional Extension
   (Rm, Ro*Sc, Disp9u)  //Optional Extension
     If supported: AGU adds an unscaled displacement.
     Else: Trying to use these is UB.
       At present, behaves as if Disp is always 0.
*1: I was left trying to think up a new encoding, then I noticed I had already defined this case, it is just not implemented (as a Disp5u op with V.w==1)...
And, the U field encodes:
   0=MOV, 1=XCHG, 2=ADD, 3=SUB (M-R), 4=SUB (R-M), 5=AND, 6=OR, 7=XOR
   8..F repeat, but NoCache/Volatile
     Previously: Store but Imm5, but dropped as unimplemented/unused,
     and I realized I needed Volatile more than I needed Imm5 store.
Though, not quite 1:1 with the RV64 'A' ops, as they behave more like x86 operations. Same underlying mechanism is used in both cases though.
Just the RV 'A' case performs an OpStore but with destination register as not ZZR (Zero Register).
Though, EXCH/XCHG is special, and will behave like in the 'A' extension (allowing a value in memory to be swapped with the value in the register).

would require eight instead of one major opcodes for the three-
register instructions,
 Mitch gloats about how many major opcodes he has free, in his 7 bit opcode
he has the greater part of a bit free, so we are a good part of the way
there.
 Conceptually some of the modifier bits move into the opcode space, not as
clean but you have to squeeze those bits hard. One can come up with a few
patterns that are not hard to decode, and spread across several instruction
types.
 
and the four-register instructions like FMA...
 Trying to wave a red flag in front of Mitch. ;)
 This is a pain point.
I would sacrifice most or all of XCOM6 the predicate instructions.
 Does it fit or does one look at extended opcodes for FMA.
 
FWIW: I have 4 register FMAC instructions... But:
   Only a basic 3R form can be encoded in 32-bits.
So:
     F0nm-5eoB
   FMAC Rm, Ro, Rn  //32-bit, Rn=Rn+Rm*Ro
And:
     FFw0-0vpp F0nm-5eoB
   FMAC Rm, Ro, Rp, Rn  //64-bit, Rn=Rm*Ro+Rp
   FMAS Rm, Ro, Rp, Rn  //64-bit, Rn=Rm*Ro-Rp
   FMRS Rm, Ro, Rp, Rn  //64-bit, Rn=Rp-Rm*Ro
   FMRA Rm, Ro, Rp, Rn  //64-bit, Rn=-(Rm*Ro+Rp)
Where the 'v' field encodes the sub-op (0..3).
   Possible: Consider 4..7 as PMAC.H and PMAC.F (SIMD).
     Went and now added this as part of the NNX extension.
     Though, general SIMD MAC would be fairly slow ATM (*1).
Currently not Immed forms of FMAC as this would require coming up with a new encoding scheme for them.
Most likely something like:
     FEii-iiii FFw0-0vii F0nm-5eoB
   FMAC Rm, Imm32, Ro, Rn  //64-bit, Rn=Rm*Imm+Ro
   FMAS Rm, Imm32, Ro, Rn  //64-bit, Rn=Rm*Imm-Ro
   FMRS Rm, Imm32, Ro, Rn  //64-bit, Rn=Ro-Rm*Imm
   FMRA Rm, Imm32, Ro, Rn  //64-bit, Rn=-(Rm*Imm+Ro)
With the Immed as Binary64 truncated to 32 bits.
Anything more than this would require a 128-bit encoding, but at present supporting 128-bit instruction fetch/decode isn't likely to be worth the added cost (though, could may save needing a 4th decoder by doing it in a way that would be "a bit hackish").
*1: Only real way to make SIMD MAC.H work quickly enough to be pipelined would be to do it at horrible precision.
Otherwise, routing it through the main FPU is going to make these ops take roughly 16 clock cycles (but, ironically, would be "Single Rounded" for sake of being internally performed at Double Precision...).

This would not matter if we were still living in a 36-bit world,
but the days of the IBM 704, the PDP-10 or the UNIVAC 1100 have
passed, except for emulation.
>
  

Date Sujet#  Auteur
10 Aug 24 * My 66000 and High word facility94Brett
10 Aug 24 +* Re: My 66000 and High word facility92MitchAlsup1
11 Aug 24 i`* Re: My 66000 and High word facility91Brett
11 Aug 24 i +- Re: My 66000 and High word facility1Thomas Koenig
11 Aug 24 i +* Re: My 66000 and High word facility61Anton Ertl
11 Aug 24 i i+* Re: My 66000 and High word facility20Brett
12 Aug 24 i ii`* Re: My 66000 and High word facility19Anton Ertl
12 Aug 24 i ii +* Re: My 66000 and High word facility17MitchAlsup1
12 Aug 24 i ii i`* Re: My 66000 and High word facility16BGB
12 Aug 24 i ii i `* Re: My 66000 and High word facility15MitchAlsup1
12 Aug 24 i ii i  `* Re: My 66000 and High word facility14BGB
13 Aug 24 i ii i   `* Re: My 66000 and High word facility13MitchAlsup1
13 Aug 24 i ii i    `* Re: My 66000 and High word facility12BGB
13 Aug 24 i ii i     `* Re: My 66000 and High word facility11MitchAlsup1
13 Aug 24 i ii i      `* Re: My 66000 and High word facility10BGB
13 Aug 24 i ii i       `* Re: My 66000 and High word facility9MitchAlsup1
13 Aug 24 i ii i        +* Re: My 66000 and High word facility5Thomas Koenig
13 Aug 24 i ii i        i+* Re: My 66000 and High word facility3MitchAlsup1
14 Aug 24 i ii i        ii`* Re: My 66000 and High word facility2Thomas Koenig
14 Aug 24 i ii i        ii `- Re: My 66000 and High word facility1MitchAlsup1
14 Aug 24 i ii i        i`- Re: My 66000 and High word facility1BGB
14 Aug 24 i ii i        `* Re: My 66000 and High word facility3BGB
15 Aug 24 i ii i         `* Re: My 66000 and High word facility2MitchAlsup1
15 Aug 24 i ii i          `- Re: My 66000 and High word facility1BGB
15 Aug 24 i ii `- Re: My 66000 and High word facility1MitchAlsup1
11 Aug 24 i i+- Re: My 66000 and High word facility1Niklas Holsti
11 Aug 24 i i+* Re: My 66000 and High word facility31BGB
12 Aug 24 i ii`* Re: My 66000 and High word facility30Brett
12 Aug 24 i ii +* Re: My 66000 and High word facility2Terje Mathisen
16 Oct 24 i ii i`- Re: My 66000 and High word facility1Paul A. Clayton
15 Aug 24 i ii +* Re: My 66000 and High word facility25MitchAlsup1
15 Aug 24 i ii i`* Re: My 66000 and High word facility24Brett
15 Aug 24 i ii i `* Re: My 66000 and High word facility23Brett
15 Aug 24 i ii i  `* Re: My 66000 and High word facility22Stephen Fuld
16 Aug 24 i ii i   `* Re: My 66000 and High word facility21Brett
16 Aug 24 i ii i    +- Re: My 66000 and High word facility1Brett
16 Aug 24 i ii i    `* Re: My 66000 and High word facility19MitchAlsup1
17 Aug 24 i ii i     `* Re: My 66000 and High word facility18Brett
17 Aug 24 i ii i      +* Re: My 66000 and High word facility8Thomas Koenig
17 Aug 24 i ii i      i`* Re: My 66000 and High word facility7Brett
18 Aug 24 i ii i      i +* Re: My 66000 and High word facility5Thomas Koenig
18 Aug 24 i ii i      i i`* Re: My 66000 and High word facility4MitchAlsup1
18 Aug 24 i ii i      i i +- Re: My 66000 and High word facility1Brett
18 Aug 24 i ii i      i i `* Re: My 66000 and High word facility2Thomas Koenig
19 Aug 24 i ii i      i i  `- Re: My 66000 and High word facility1BGB
19 Aug 24 i ii i      i `- Re: My 66000 and High word facility1BGB
17 Aug 24 i ii i      `* Re: My 66000 and High word facility9MitchAlsup1
17 Aug 24 i ii i       `* Re: My 66000 and High word facility8Brett
18 Aug 24 i ii i        +* Re: My 66000 and High word facility2MitchAlsup1
18 Aug 24 i ii i        i`- Re: My 66000 and High word facility1Brett
19 Aug 24 i ii i        `* Re: My 66000 and High word facility5Stefan Monnier
19 Aug 24 i ii i         +- Re: My 66000 and High word facility1BGB
19 Aug 24 i ii i         `* Re: My 66000 and High word facility3MitchAlsup1
19 Aug 24 i ii i          +- Re: My 66000 and High word facility1Thomas Koenig
20 Aug 24 i ii i          `- Re: My 66000 and High word facility1Michael S
20 Aug 24 i ii `* Re: My 66000 and High word facility2Stefan Monnier
21 Aug 24 i ii  `- Re: My 66000 and High word facility1BGB
15 Aug 24 i i`* Re: My 66000 and High word facility8MitchAlsup1
15 Aug 24 i i +* Re: My 66000 and High word facility3Anton Ertl
15 Aug 24 i i i`* Re: My 66000 and High word facility2Michael S
15 Aug 24 i i i `- Re: My 66000 and High word facility1MitchAlsup1
15 Aug 24 i i `* Re: My 66000 and High word facility4Michael S
15 Aug 24 i i  `* Re: My 66000 and High word facility3Stephen Fuld
15 Aug 24 i i   `* Re: My 66000 and High word facility2Michael S
15 Aug 24 i i    `- Re: My 66000 and High word facility1MitchAlsup1
19 Aug 24 i `* Re: My 66000 and High word facility28MitchAlsup1
19 Aug 24 i  `* Re: My 66000 and High word facility27Brett
19 Aug 24 i   `* Re: My 66000 and High word facility26MitchAlsup1
20 Aug 24 i    +* Re: My 66000 and High word facility3Brett
20 Aug 24 i    i`* Re: My 66000 and High word facility2MitchAlsup1
20 Aug 24 i    i `- Re: My 66000 and High word facility1Brett
20 Aug 24 i    `* number of registers (was: My 66000 and High word facility)22Anton Ertl
20 Aug 24 i     `* Re: number of registers21MitchAlsup1
20 Aug 24 i      +* Re: number of registers13Michael S
20 Aug 24 i      i`* Re: number of registers12MitchAlsup1
21 Aug 24 i      i +* Re: number of registers6Brett
21 Aug 24 i      i i+* Re: number of registers4MitchAlsup1
21 Aug 24 i      i ii+* Re: number of registers2Brett
23 Aug 24 i      i iii`- Re: number of registers1Brett
22 Aug 24 i      i ii`- Re: number of registers1Stephen Fuld
21 Aug 24 i      i i`- Re: number of registers1Anton Ertl
21 Aug 24 i      i `* Re: number of registers5Anton Ertl
21 Aug 24 i      i  +* Re: number of registers3Stephen Fuld
21 Aug 24 i      i  i`* Re: number of registers2Anton Ertl
21 Aug 24 i      i  i `- Re: number of registers1Stephen Fuld
21 Aug 24 i      i  `- Re: number of registers1Anton Ertl
20 Aug 24 i      `* Re: number of registers7MitchAlsup1
21 Aug 24 i       `* Re: number of registers6Anton Ertl
21 Aug 24 i        +* Re: number of registers3Michael S
21 Aug 24 i        i`* Re: number of registers2Anton Ertl
21 Aug 24 i        i `- Re: number of registers1Michael S
21 Aug 24 i        `* Re: number of registers2MitchAlsup1
21 Aug 24 i         `- Re: number of registers1Michael S
10 Aug 24 `- Re: My 66000 and High word facility1MitchAlsup1

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal