Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

We have a equal opportunity Calculus class -- it's fully integrated.


devel / comp.arch / Re: short'nin linky stuff, RISC-V adding 48-bit instructions

SubjectAuthor
* Re: linky stuff, RISC-V adding 48-bit instructionsIvan Godard
+- Re: linky stuff, RISC-V adding 48-bit instructionsMitchAlsup
`* Re: linky stuff, RISC-V adding 48-bit instructionsMitchAlsup
 `* Re: short'nin linky stuff, RISC-V adding 48-bit instructionsJohn Levine
  +- Re: short'nin linky stuff, RISC-V adding 48-bit instructionsIvan Godard
  `- Re: short'nin linky stuff, RISC-V adding 48-bit instructionsTerje Mathisen

1
Re: linky stuff, RISC-V adding 48-bit instructions

<tansco$2gret$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: linky stuff, RISC-V adding 48-bit instructions
Date: Wed, 13 Jul 2022 18:43:51 -0700
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <tansco$2gret$1@dont-email.me>
References: <3271bea7-e39a-40b8-a0c5-b2a39467ddf2n@googlegroups.com>
<865bfcdd-f9c0-4ed6-b493-37808e35b0e2n@googlegroups.com>
<jwv8roxarrb.fsf-monnier+comp.arch@gnu.org> <IqEzK.367268$ssF.3295@fx14.iad>
<tan76v$qnd$1@gal.iecc.com> <tan989$2f3b1$1@dont-email.me>
<2c7f3e9e-d98f-4037-a732-e2b03c38c9aen@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 14 Jul 2022 01:43:52 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e837aec828f7d726d245f01b8405200f";
logging-data="2649565"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aeZtO3GH9r2/oTSpPoRTJ"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:ehglCgxc4P+EPjkyzPPt7jjMb/M=
Content-Language: en-US
In-Reply-To: <2c7f3e9e-d98f-4037-a732-e2b03c38c9aen@googlegroups.com>
 by: Ivan Godard - Thu, 14 Jul 2022 01:43 UTC

On 7/13/2022 2:28 PM, MitchAlsup wrote:
> On Wednesday, July 13, 2022 at 3:17:16 PM UTC-5, Ivan Godard wrote:
>> On 7/13/2022 12:42 PM, John Levine wrote:
>>> According to EricP <ThatWould...@thevillage.com>:
>>>> I assume all compilers emit 64-bit global offsets and a
>>>> compacting linker eliminates the excess when it determines
>>>> which calls and mem refs are intra-dll and which are inter.
>>>> The ISA supported offset sizes just determines the frequency
>>>> of each compaction.
>>>
>>> Perhaps on some systems. On systems that use ELF libraries, including
>>> linux and the BSDs, each executable or library has a table called the
>>> Procedure Linkage Table (PLT), which contains an entry for each
>>> external routine called from the library. Initially each PLT entry
>>> contains a call to the dynamic linker which is patched on the first
>>> call to be a jump to the actual routine. So all the calls in the code
>>> are actually calls to the PLT which can use a short address.
>>>
>>> I have written assemblers that do address shortening, and the way it
>>> would work in a linker would be similar. Doing it well is NP-complete
>>> and can require a lot of code patching, since it can change the
>>> offsets of data references, so it's not a feature I would want to use
>>> a lot.
>> Don't think it's NP.
>>
>> Walk the code, keeping two distances for each unresolved branch. One is
>> how far the target would be if all unresolved were resolved as near; the
>> other is if all unresolved were resolved as far. For each unresolved, if
>> the as-far is less than the near range then resolve as near, and if the
>> as-near is greater than the near range then resolve as far; if neither
>> then leave it unresolved and go to the next unresolved. Repeat until a
>> pass resolves nothing additional. At that point, resolve all unresolved
>> as near. Done. The algorithm generalizes in the obvious way to ISAs with
>> more than two range categories.
>>
>> It helps if the code is in internal form that doesn't represent the
>> branches as instructions, i.e. short sequences of fixed length
>> containing non-branch instructions, together with the max and min
>> distances of the terminating branch; that way you walk the sequence
>> descriptors and not the actual instructions. Resolution of a descriptor
>> generates the binary of the resolved branch and glues it to the sequence
>> on either side to make a longer sequence; gluing may be actual copy or
>> just an adjustment of links.
>>
>> I have never seen actual code take more than three iterations to get to
>> the fix point, but in any case the number of iterations cannot be
>> greater than the number of branches, so not NP.
> <
> Mc 88110 just did one fix up pass and left the rest using large addresses.
> <
> I think, technically, getting it perfect requires a pass for every resolved address*
> and this smells a bit like NP-complete to me. In practice, Mc 88100 used one
> pass and saw virtually no excess code path dynamically.
> <
> (*) every time the linker shortens up an access, it creates the potential that
> some already passed over access that was left long might now fit in shorter
> form. This would require a very carefully laid out access order and corresponding
> inverted placement lay out order.

Yes, as I described, a maximal contrived example will need one pass over
the remaining unresolved branches per branch. That is O<branches>, which
is linear. If the code is represented as a sequence of descriptors, each
containing length and max/min distances, each pass over the remaining
descriptors will consolidate at least one pair, so the maximal number of
descriptors examined is (n^2)/2 where n is again the number of branches,
which is quadratic. Neither is anything like NP, which requires
exponentiality or worse.

In practice, the number of passes over real code is ~3, and the number
of descriptor examinations is ~1, both roughly constant and growing with
n at a very low rate, ~0.

Re: linky stuff, RISC-V adding 48-bit instructions

<1cdb8f8a-a5c1-48ff-8d89-e8b66d8d89fdn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5e0e:0:b0:31d:380b:c59d with SMTP id h14-20020ac85e0e000000b0031d380bc59dmr7900666qtx.197.1657807932890;
Thu, 14 Jul 2022 07:12:12 -0700 (PDT)
X-Received: by 2002:ac8:5f96:0:b0:31d:3db0:a7a0 with SMTP id
j22-20020ac85f96000000b0031d3db0a7a0mr8195242qta.563.1657807932733; Thu, 14
Jul 2022 07:12:12 -0700 (PDT)
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, 14 Jul 2022 07:12:12 -0700 (PDT)
In-Reply-To: <tansco$2gret$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=104.59.204.55; posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 104.59.204.55
References: <3271bea7-e39a-40b8-a0c5-b2a39467ddf2n@googlegroups.com>
<865bfcdd-f9c0-4ed6-b493-37808e35b0e2n@googlegroups.com> <jwv8roxarrb.fsf-monnier+comp.arch@gnu.org>
<IqEzK.367268$ssF.3295@fx14.iad> <tan76v$qnd$1@gal.iecc.com>
<tan989$2f3b1$1@dont-email.me> <2c7f3e9e-d98f-4037-a732-e2b03c38c9aen@googlegroups.com>
<tansco$2gret$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1cdb8f8a-a5c1-48ff-8d89-e8b66d8d89fdn@googlegroups.com>
Subject: Re: linky stuff, RISC-V adding 48-bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 14 Jul 2022 14:12:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 74
 by: MitchAlsup - Thu, 14 Jul 2022 14:12 UTC

On Wednesday, July 13, 2022 at 8:43:56 PM UTC-5, Ivan Godard wrote:
> On 7/13/2022 2:28 PM, MitchAlsup wrote:
> > On Wednesday, July 13, 2022 at 3:17:16 PM UTC-5, Ivan Godard wrote:
> >> On 7/13/2022 12:42 PM, John Levine wrote:
> >>> According to EricP <ThatWould...@thevillage.com>:
> >>>> I assume all compilers emit 64-bit global offsets and a
> >>>> compacting linker eliminates the excess when it determines
> >>>> which calls and mem refs are intra-dll and which are inter.
> >>>> The ISA supported offset sizes just determines the frequency
> >>>> of each compaction.
> >>>
> >>> Perhaps on some systems. On systems that use ELF libraries, including
> >>> linux and the BSDs, each executable or library has a table called the
> >>> Procedure Linkage Table (PLT), which contains an entry for each
> >>> external routine called from the library. Initially each PLT entry
> >>> contains a call to the dynamic linker which is patched on the first
> >>> call to be a jump to the actual routine. So all the calls in the code
> >>> are actually calls to the PLT which can use a short address.
> >>>
> >>> I have written assemblers that do address shortening, and the way it
> >>> would work in a linker would be similar. Doing it well is NP-complete
> >>> and can require a lot of code patching, since it can change the
> >>> offsets of data references, so it's not a feature I would want to use
> >>> a lot.
> >> Don't think it's NP.
> >>
> >> Walk the code, keeping two distances for each unresolved branch. One is
> >> how far the target would be if all unresolved were resolved as near; the
> >> other is if all unresolved were resolved as far. For each unresolved, if
> >> the as-far is less than the near range then resolve as near, and if the
> >> as-near is greater than the near range then resolve as far; if neither
> >> then leave it unresolved and go to the next unresolved. Repeat until a
> >> pass resolves nothing additional. At that point, resolve all unresolved
> >> as near. Done. The algorithm generalizes in the obvious way to ISAs with
> >> more than two range categories.
> >>
> >> It helps if the code is in internal form that doesn't represent the
> >> branches as instructions, i.e. short sequences of fixed length
> >> containing non-branch instructions, together with the max and min
> >> distances of the terminating branch; that way you walk the sequence
> >> descriptors and not the actual instructions. Resolution of a descriptor
> >> generates the binary of the resolved branch and glues it to the sequence
> >> on either side to make a longer sequence; gluing may be actual copy or
> >> just an adjustment of links.
> >>
> >> I have never seen actual code take more than three iterations to get to
> >> the fix point, but in any case the number of iterations cannot be
> >> greater than the number of branches, so not NP.
> > <
> > Mc 88110 just did one fix up pass and left the rest using large addresses.
> > <
> > I think, technically, getting it perfect requires a pass for every resolved address*
> > and this smells a bit like NP-complete to me. In practice, Mc 88100 used one
> > pass and saw virtually no excess code path dynamically.
> > <
> > (*) every time the linker shortens up an access, it creates the potential that
> > some already passed over access that was left long might now fit in shorter
> > form. This would require a very carefully laid out access order and corresponding
> > inverted placement lay out order.
<
> Yes, as I described, a maximal contrived example will need one pass over
> the remaining unresolved branches per branch. That is O<branches>, which
<
You also need to consider LDs and STs as these have several lengths depending...
<
> is linear. If the code is represented as a sequence of descriptors, each
> containing length and max/min distances, each pass over the remaining
> descriptors will consolidate at least one pair, so the maximal number of
> descriptors examined is (n^2)/2 where n is again the number of branches,
> which is quadratic. Neither is anything like NP, which requires
> exponentiality or worse.
>
> In practice, the number of passes over real code is ~3, and the number
> of descriptor examinations is ~1, both roughly constant and growing with
> n at a very low rate, ~0.

Re: linky stuff, RISC-V adding 48-bit instructions

<44b2e51a-05f6-4ac4-bd66-e454ab50323cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ae9:de82:0:b0:6b5:90dc:a7df with SMTP id s124-20020ae9de82000000b006b590dca7dfmr6403101qkf.615.1657811817463;
Thu, 14 Jul 2022 08:16:57 -0700 (PDT)
X-Received: by 2002:a0c:8170:0:b0:473:af82:9a77 with SMTP id
103-20020a0c8170000000b00473af829a77mr1177149qvc.87.1657811817341; Thu, 14
Jul 2022 08:16:57 -0700 (PDT)
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, 14 Jul 2022 08:16:57 -0700 (PDT)
In-Reply-To: <tansco$2gret$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=104.59.204.55; posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 104.59.204.55
References: <3271bea7-e39a-40b8-a0c5-b2a39467ddf2n@googlegroups.com>
<865bfcdd-f9c0-4ed6-b493-37808e35b0e2n@googlegroups.com> <jwv8roxarrb.fsf-monnier+comp.arch@gnu.org>
<IqEzK.367268$ssF.3295@fx14.iad> <tan76v$qnd$1@gal.iecc.com>
<tan989$2f3b1$1@dont-email.me> <2c7f3e9e-d98f-4037-a732-e2b03c38c9aen@googlegroups.com>
<tansco$2gret$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <44b2e51a-05f6-4ac4-bd66-e454ab50323cn@googlegroups.com>
Subject: Re: linky stuff, RISC-V adding 48-bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 14 Jul 2022 15:16:57 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 72
 by: MitchAlsup - Thu, 14 Jul 2022 15:16 UTC

On Wednesday, July 13, 2022 at 8:43:56 PM UTC-5, Ivan Godard wrote:
> On 7/13/2022 2:28 PM, MitchAlsup wrote:
> > On Wednesday, July 13, 2022 at 3:17:16 PM UTC-5, Ivan Godard wrote:
> >> On 7/13/2022 12:42 PM, John Levine wrote:
> >>> According to EricP <ThatWould...@thevillage.com>:
> >>>> I assume all compilers emit 64-bit global offsets and a
> >>>> compacting linker eliminates the excess when it determines
> >>>> which calls and mem refs are intra-dll and which are inter.
> >>>> The ISA supported offset sizes just determines the frequency
> >>>> of each compaction.
> >>>
> >>> Perhaps on some systems. On systems that use ELF libraries, including
> >>> linux and the BSDs, each executable or library has a table called the
> >>> Procedure Linkage Table (PLT), which contains an entry for each
> >>> external routine called from the library. Initially each PLT entry
> >>> contains a call to the dynamic linker which is patched on the first
> >>> call to be a jump to the actual routine. So all the calls in the code
> >>> are actually calls to the PLT which can use a short address.
> >>>
> >>> I have written assemblers that do address shortening, and the way it
> >>> would work in a linker would be similar. Doing it well is NP-complete
> >>> and can require a lot of code patching, since it can change the
> >>> offsets of data references, so it's not a feature I would want to use
> >>> a lot.
> >> Don't think it's NP.
> >>
> >> Walk the code, keeping two distances for each unresolved branch. One is
> >> how far the target would be if all unresolved were resolved as near; the
> >> other is if all unresolved were resolved as far. For each unresolved, if
> >> the as-far is less than the near range then resolve as near, and if the
> >> as-near is greater than the near range then resolve as far; if neither
> >> then leave it unresolved and go to the next unresolved. Repeat until a
> >> pass resolves nothing additional. At that point, resolve all unresolved
> >> as near. Done. The algorithm generalizes in the obvious way to ISAs with
> >> more than two range categories.
> >>
> >> It helps if the code is in internal form that doesn't represent the
> >> branches as instructions, i.e. short sequences of fixed length
> >> containing non-branch instructions, together with the max and min
> >> distances of the terminating branch; that way you walk the sequence
> >> descriptors and not the actual instructions. Resolution of a descriptor
> >> generates the binary of the resolved branch and glues it to the sequence
> >> on either side to make a longer sequence; gluing may be actual copy or
> >> just an adjustment of links.
> >>
> >> I have never seen actual code take more than three iterations to get to
> >> the fix point, but in any case the number of iterations cannot be
> >> greater than the number of branches, so not NP.
> > <
> > Mc 88110 just did one fix up pass and left the rest using large addresses.
> > <
> > I think, technically, getting it perfect requires a pass for every resolved address*
> > and this smells a bit like NP-complete to me. In practice, Mc 88100 used one
> > pass and saw virtually no excess code path dynamically.
> > <
> > (*) every time the linker shortens up an access, it creates the potential that
> > some already passed over access that was left long might now fit in shorter
> > form. This would require a very carefully laid out access order and corresponding
> > inverted placement lay out order.
> Yes, as I described, a maximal contrived example will need one pass over
> the remaining unresolved branches per branch. That is O<branches>, which
> is linear. If the code is represented as a sequence of descriptors, each
> containing length and max/min distances, each pass over the remaining
> descriptors will consolidate at least one pair, so the maximal number of
> descriptors examined is (n^2)/2 where n is again the number of branches,
> which is quadratic. Neither is anything like NP, which requires
> exponentiality or worse.
>
> In practice, the number of passes over real code is ~3, and the number
> of descriptor examinations is ~1, both roughly constant and growing with
> n at a very low rate, ~0.
<
But, yes, far less than NP.

Re: short'nin linky stuff, RISC-V adding 48-bit instructions

<tapceo$tqv$1@gal.iecc.com>

  copy mid

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

  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: short'nin linky stuff, RISC-V adding 48-bit instructions
Date: Thu, 14 Jul 2022 15:24:08 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <tapceo$tqv$1@gal.iecc.com>
References: <3271bea7-e39a-40b8-a0c5-b2a39467ddf2n@googlegroups.com> <2c7f3e9e-d98f-4037-a732-e2b03c38c9aen@googlegroups.com> <tansco$2gret$1@dont-email.me> <44b2e51a-05f6-4ac4-bd66-e454ab50323cn@googlegroups.com>
Injection-Date: Thu, 14 Jul 2022 15:24:08 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="30559"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <3271bea7-e39a-40b8-a0c5-b2a39467ddf2n@googlegroups.com> <2c7f3e9e-d98f-4037-a732-e2b03c38c9aen@googlegroups.com> <tansco$2gret$1@dont-email.me> <44b2e51a-05f6-4ac4-bd66-e454ab50323cn@googlegroups.com>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Thu, 14 Jul 2022 15:24 UTC

According to MitchAlsup <MitchAlsup@aol.com>:
>> In practice, the number of passes over real code is ~3, and the number
>> of descriptor examinations is ~1, both roughly constant and growing with
>> n at a very low rate, ~0.
><
>But, yes, far less than NP.

Like many NP complete problems, this one has approximate solutions
that are pretty close and are adequate except perhaps in the occasional
embedded application where you're trying to squeeze everything into a
small fixed amount of ROM.

--
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: short'nin linky stuff, RISC-V adding 48-bit instructions

<tapeob$2okn1$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: short'nin linky stuff, RISC-V adding 48-bit instructions
Date: Thu, 14 Jul 2022 09:03:22 -0700
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <tapeob$2okn1$1@dont-email.me>
References: <3271bea7-e39a-40b8-a0c5-b2a39467ddf2n@googlegroups.com>
<2c7f3e9e-d98f-4037-a732-e2b03c38c9aen@googlegroups.com>
<tansco$2gret$1@dont-email.me>
<44b2e51a-05f6-4ac4-bd66-e454ab50323cn@googlegroups.com>
<tapceo$tqv$1@gal.iecc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 14 Jul 2022 16:03:23 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e837aec828f7d726d245f01b8405200f";
logging-data="2904801"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+grJ5fsDFk/5TlW9OFfaJX"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:gzpT6isGDKkwls3DMc2V0POLZuI=
Content-Language: en-US
In-Reply-To: <tapceo$tqv$1@gal.iecc.com>
 by: Ivan Godard - Thu, 14 Jul 2022 16:03 UTC

On 7/14/2022 8:24 AM, John Levine wrote:
> According to MitchAlsup <MitchAlsup@aol.com>:
>>> In practice, the number of passes over real code is ~3, and the number
>>> of descriptor examinations is ~1, both roughly constant and growing with
>>> n at a very low rate, ~0.
>> <
>> But, yes, far less than NP.
>
> Like many NP complete problems, this one has approximate solutions
> that are pretty close and are adequate except perhaps in the occasional
> embedded application where you're trying to squeeze everything into a
> small fixed amount of ROM.
>
>
>
>

Worse case is linear in number of passes, quadratic in number of
instructions read. That's not an approximation, that's Deterministic
Polynomial. https://en.wikipedia.org/wiki/NP_(complexity)

Re: short'nin linky stuff, RISC-V adding 48-bit instructions

<tapk6d$174m$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!10O9MudpjwoXIahOJRbDvA.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: short'nin linky stuff, RISC-V adding 48-bit instructions
Date: Thu, 14 Jul 2022 19:36:13 +0200
Organization: Aioe.org NNTP Server
Message-ID: <tapk6d$174m$1@gioia.aioe.org>
References: <3271bea7-e39a-40b8-a0c5-b2a39467ddf2n@googlegroups.com>
<2c7f3e9e-d98f-4037-a732-e2b03c38c9aen@googlegroups.com>
<tansco$2gret$1@dont-email.me>
<44b2e51a-05f6-4ac4-bd66-e454ab50323cn@googlegroups.com>
<tapceo$tqv$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="40086"; posting-host="10O9MudpjwoXIahOJRbDvA.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.13
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Thu, 14 Jul 2022 17:36 UTC

John Levine wrote:
> According to MitchAlsup <MitchAlsup@aol.com>:
>>> In practice, the number of passes over real code is ~3, and the number
>>> of descriptor examinations is ~1, both roughly constant and growing with
>>> n at a very low rate, ~0.
>> <
>> But, yes, far less than NP.
>
> Like many NP complete problems, this one has approximate solutions
> that are pretty close and are adequate except perhaps in the occasional
> embedded application where you're trying to squeeze everything into a
> small fixed amount of ROM.

On those systems you were much more likely to manually optimize for
size, to the point where _all_ branches were short, all stack-relative
offsets were in the -128 to 127 range, and calls would use extremely
non-standard ABIs.

Take a look at the 256-byte asm challenges, I am very impressed by what
has been shown to be possible.

Personally I was _very_ happy with my PC-DOS TSR which replaced
IBM/Microsoft's kbd & screen (font) drivers: The originals needed 20-60
KB depending upon version and capabilities, my replacement which
provided a true superset (it included a replacement font for 43 and
50-line EGA/VGA text modes) made do with just under 700 bytes. Far
branches were never an issue. :-)

Terje
PS. HP/Compaq Norway liked it as well, to the point where they stole it
twice...

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

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor