๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Paul Clayton Thu, 12 Nov 2026 04:11
Re: Really compressed instruction streams
#701
Author: Paul Clayton
Date: Thu, 12 Nov 2026 04:11
71 lines
4490 bytes
On 9/24/26 6:17 PM, MitchAlsup wrote:
 > Thomas Koenig <tkoenig@netcologne.de> posted:

[snip block-based instruction compression]
>> For example, one could make the Icache into a micro-op-store
>> and decode on fetching from L2.
> 
> What happens when somebody (ld.so) writes into code space ??
> What happens when SSD writes into code space ??

This seems the same kind of problem that ยตop caches face. A
write to the compressed storage address has to invalidate the
cached uncompressed format. Coherent ยตop caches do not seem to
be a problem. (This does increase the cost of modifying cached
code. Something as "harmless" โ€” in the sense of not adjusting 
data flow โ€” as changing one computation immediate value will
typically invalidate an entire Icache block of code, but this
is also just a consequence of writeback data caching. I doubt
localized changes are common.)

>> Branch targets could then be in the form block,instruction in
>> block.
> 
> Or bit addresses (see above) and leave out blocks altogether.

Bit addressing would require larger offsets. If the bit-variable
length instructions are not designed to be expanded into a
reasonably nice cached format, a compressed format that does
target a "nice" cached format would presumably be better.

Bit-variable length instructions also localize the compression
within the instruction, which sacrifices some compression (while
avoiding the possibility of internal fragmentation of blocks).

>>          There would have to be an upper limit on the number
>> of instructions per block, leading to some waste for easily
>> compressible instructions.  Also, instructions which no
>> longer fit in a block would reduce the efficieny.
> 
> Packet and trace caches have this problem. After building a
> packet-cache (1991) and seeing the instruction density (60%
> filled and less than 1/2 as dense as normal instruction
> cache--I decided to go a different direction for my current
> 6-wide machine.

Would the density have been significantly improved if two
code slices could share a "cache block". If I understand
correctly, the packet-cache was a VLIW format, so compaction
would have been less efficient requiring at least a bit per
operation slot and extra time to expand that format. Sharing
a block would also required an additional tag and slot-present
bits. If the slots were different sizes (which is a nice feature
of traditional VLIW), expansion would be more complex.

Choosing a block size would also mean weighing utilization
tradeoffs. If the such a cache could have two valid hits that
could be read in parallel (being in different banks by
construction), it might be possible/practical to split a
packet into two blocks, so two blocks with 1.5 packet capacity
could hold two full packets and two half-packets or four
appropriately compacted packets (e.g., 0.7,0.8, 0.9, 0.6).

[snip]
> Imaging the poor guy trying to debug::
> 
>       ADD  IP,R7,#1234567

Since the proposal was for block compression, instruction
targets would be encoded as block+offset. Adding an
integer to an instruction address does not seem to make
sense. (Maybe I am missing something.)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads