[Libre-soc-bugs] [Bug 838] sync or at least statically check fields.text, power_decoder, trans/svp64, CSVs between each other

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Aug 10 21:10:30 BST 2022


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

--- Comment #43 from Dmitry Selyutin <ghostmansd at gmail.com> ---
(In reply to Dmitry Selyutin from comment #42)
> as they appear in our CSVs, I don't update the names for RC.ONE): ['lwbrx',
> 'addic.', 'andi.', 'andis.', 'stbcx', 'stdcx', 'sthcx', 'stwcx'].

Sorry, lwbrx appeared there by mistake, don't consider it.

A minor note so that it' clear which opcode values and masks I mean from
binutils point of view. Let's consider entry for lwbrx.

https://git.libre-soc.org/?p=binutils-gdb.git;a=blob;f=opcodes/ppc-opc.c#l8223

{"lwbrx",       X(31,534),      X_MASK,      PPCCOM,    0,              {RT,
RA0, RB}},

#define X(op, xop)          (OP (op) | ((((uint64_t)(xop)) & 0x3ff) << 1))
#define OP(x)               ((((uint64_t)(x)) & 0x3f) << 26)
#define XRC(op, xop, rc)    (X ((op), (xop)) | ((rc) & 1))
#define X_MASK              XRC (0x3f, 0x3ff, 1)

With our code, what we get is:
Instruction(name='lwbrx', opcode=FieldsOpcode(value=0x7c00042d,
mask=0xfc0007ff))

I obviously removed lot of other prints here (the dataclass printed the whole
fields), but you get the idea.

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


More information about the libre-soc-bugs mailing list