[Libre-soc-bugs] [Bug 845] binutils: drop svmagic and deal with the prefix instead

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Jul 31 22:06:35 BST 2022


https://bugs.libre-soc.org/show_bug.cgi?id=845

--- Comment #5 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Dmitry Selyutin from comment #3)

> My question is, do we have some common technique to construct the whole
> "opcode" stuff? 

yyees... sort-of, i mean it's part of that wossname bugreport
the one for cleaning up (automated) decode svp64.py  ah! bug #838.

https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/decoder/power_decoder.py;hb=HEAD#l702

returns an object of type TopPowerDecoder which contains the
pattern-recognition list of XOs and associated bit-positions
where they start from.  just... err... in LSB0 order not MSB0.


> I mean, I understand the logic for cases like major.csv
> (where the OP is a simple integer) and for cases like minor_#.csv (where OP
> is # and XOP is determined by the entry). But how do we address other CSVs?
> Perhaps there's a simple way to get the "opcode" immediately in Python?

well, they're bit-pattern-matching, a mask plus a match.

in *theory* they could be turned into a single match plus start/end
because i don't believe there's any that are "---111---00101---"
i.e. all bits are contiguous.  i think.  have to check.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list