The BO and BI field in PPC branch opcodes determine:
BO: if the ctr register is altered or a cr register field is checked.
BI: holds the offset of the cr bit to check.
Those fields are not explicitly stored in the cs_insn.detail.ppc struct. Instead register operands like cr5eq are added (which also matches the behavior of objdump).
Nonetheless it would be useful to have access to the raw values of all opcode fields without manual parsing.
As an example:
The link below leads to code where instructions are uplifted to an intermediate language. Since the uplifted instructions should match closely the ISA it is easier to work with the BO and BI values directly:
https://github.com/Rot127/rizin/blob/e8763786435e1829a68134d701e9b83231e82a4d/librz/analysis/arch/ppc/ppc_il.c#L585-L714
The
BOandBIfield in PPC branch opcodes determine:BO: if thectrregister is altered or acrregister field is checked.BI: holds the offset of thecrbit to check.Those fields are not explicitly stored in the
cs_insn.detail.ppcstruct. Instead register operands likecr5eqare added (which also matches the behavior of objdump).Nonetheless it would be useful to have access to the raw values of all opcode fields without manual parsing.
As an example:
The link below leads to code where instructions are uplifted to an intermediate language. Since the uplifted instructions should match closely the ISA it is easier to work with the
BOandBIvalues directly:https://github.com/Rot127/rizin/blob/e8763786435e1829a68134d701e9b83231e82a4d/librz/analysis/arch/ppc/ppc_il.c#L585-L714