[Libre-soc-dev] Compressed instructions

Alexandre Oliva oliva at gnu.org
Sun Nov 22 18:04:18 GMT 2020


Hello, Cole,

Thanks for the info and for the appreciation.

I finally had a click last night, in which the 10-bit encoding I kept
hearing about but couldn't find documented anywhere made sense was the
very insn that switched to 16-bit mode, rather than something entirely
different that I couldn't tell whether was preexisting or something else
we were working on.  Now I think I have a solid picture.  We may have:

  <32-bit insn>
  <10-bit insn>
  <16-bit insn>
  <more 16-bit insns>
  <16-bit insn with bits to switch back to 32-bit mode>
  <32-bit insn>
  
This means we do have the problem of, by just looking at the bits at a
certain location, not knowing how it ought to be decoded.  That may be
trouble for the disassembler, but given we spend 6 bits just for the
mode-switch, I very much doubt it would be viable and wise to make pairs
of 16-bit instructions immediately recognizable as such, rather than as
a single 32-bit instruction, by their encoding.

Since the extra bit needed to tell how to interpret the code stream is
dynamic, in a status register, we will need to find some other way for a
disassembler to identify 16-bit-encoded code ranges.  This will likely
not be very unreliable :-(

-- 
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