[Libre-soc-dev] v3.1B prefix

Alexandre Oliva oliva at gnu.org
Sun Dec 20 08:32:33 GMT 2020


On Dec 14, 2020, Alexandre Oliva <oliva at gnu.org> wrote:

> 32-bit uncompressed instructions: 109169
> 16-bit compressed instructions: 7732
> 16-imm compressed-mode instructions: 14509
> 10-bit compressed instructions: 4057

> 10-bit mode-switching nops: 3398
> 10-bit mode-switching nops for imm-16: 10821
> 16-bit mode-switching nops after imm-16: 1876

> 10-bit nop+16-imm pairs above, backtracked to 32-bit: 9171

> Compressed size estimate: 521462
> Original size: 541868
> Compressed/original ratio: 0.962341

I've implemented an estimator (lxo/532/comp16-v1alt-skel.py) that uses
the same rules to tell whether or not an insn is compressible, but
a different mode-switching logic: if a compressible insn is found, and
we are in uncompressed mode, we issue a 32-bit insn that breaks down
into:

-  6 bits for the opcode

- 16 bits for the compressed insn

- 10 bits corresponding to 10 subsequent insns, to tell whether each of
     them is compressed

Same program as above, same rules, much better compression rate, even
without repurposing the mode-switching bits from the 16-bit insns:

32-bit uncompressed instructions: 109169
16-bit compressed instructions: 26298
16-bit mode-switching nops: 8402

Compressed size estimate: 506076
Original size: 541868
Compressed/original ratio: 0.933947


This Sunday, I plan to go over the svp64 encoding.

-- 
Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
   Free Software Activist         GNU Toolchain Engineer
        Vim, Vi, Voltei pro Emacs -- GNUlius Caesar



More information about the Libre-soc-dev mailing list