Mill Computing, Inc. › Forums › The Mill › Architecture › Fractional byte packing? › Reply To: Fractional byte packing?
You could do that with one bitfield extract instructions per bitfield you’d want to extract: in this case six.
Those would all be independent, so max parallelism would be the number of execution units that implement that instruction.
If a bitfield is at the top or the bottom of the word, then a shiftr{s|u} or andl respectively could be done instead, possibly in another execution unit freeing up a bitfield extract unit.
If you have such a layout with one at bits 31:26 and one at 0:0, and there is a CPU with two execution units that do bitfield extract and one unit that does shiftru/andl, then full extraction should be possible with only two cycles of latency.
(Speaking very generically of course. Someone from Mill Computing could fill in the details)
- This reply was modified 3 months, 2 weeks ago by Findecanor.