Deutsch   English   Français   Italiano  
<16462d5aa26345e4e015f240b30bba02@www.novabbs.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.arch
Subject: Re: Split instruction and immediate stream
Date: Sun, 9 Mar 2025 21:19:41 +0000
Organization: Rocksolid Light
Message-ID: <16462d5aa26345e4e015f240b30bba02@www.novabbs.org>
References: <vqhjpv$65am$1@dont-email.me> <vqiikd$c35o$1@dont-email.me> <fmnzP.432863$2zn8.70525@fx15.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
	logging-data="3631052"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="o5SwNDfMfYu6Mv4wwLiW6e/jbA93UAdzFodw5PEa6eU";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$mUibJdqxoZ3Vf3URJKHPZ.jPo00nRHTi0zXYbZR0uQTHs64IQwLdO
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: cb29269328a20fe5719ed6a1c397e21f651bda71
Bytes: 3109
Lines: 44

On Sun, 9 Mar 2025 21:02:44 +0000, EricP wrote:

> Robert Finch wrote:
>> On 2025-03-08 9:21 a.m., Thomas Koenig wrote:
>>> There was a recent post to the gcc mailing list which showed
>>> interesting concept of dealing with large constants in an ISA:
>>> Splitting a the instruction and constant stream.  It can be found
>>> at https://github.com/michaeljclark/glyph/ , and is named "glyph".
>>>
>>> I think the problem the author is trying to solve is better addressed by
>>> My 66000 (and I would absolutely _hate_ to write an assembler for it).
>>> Still, I thought it worth mentioning.
>>
>> I think it is better to use a constant prefix / postfix instruction to
>> encode larger constants in the instruction stream. Or use a wider
>> instruction format. In Q+ constant postfixes can be used to override a
>> register spec, allowing immediate constants to be used with many more
>> instructions.
>
> Yes a kind of prefix instruction that say "here comes an immediate
> value"
> and loads a 2, 4, or 8 byte immediate with all the sign or zero extend
> options into a special constant register in the Decoder and marks it
> valid.
> The next instruction just says add immediate "ADDI rd, rs" and it
> implies
> the constant it just stashed.
>
> That relieves the consumer opcodes from having to encode all the
> different variable immediate formats.
>
> It could easily extend to multiple immediate prefix instructions so
> one can have instructions like store immediate STD [rd+imm1], imm2
> by just adding a second constant register to the Decoder.
>
> The only complication I can see is if the instruction producer-consumer
> pair straddle pages and their is a page fault on the second.
> I wouldn't want to have to save the stashed constant as "thread context"
> so it should roll back to the start of the immediate instruction.

Execute the instruction and the (preceding) constant as a single
instruction, so any fault leaves IP pointing at the constant.

> In which case the faulting RIP is the first instruction and the
> faulting address is someplace in the second.