Plugin-based opcode table

Dmitry Selyutin ghostmansd@gmail.com
Tue May 17 12:37:36 GMT 2022


Hello folks,

recently we've been discussing the opcode allocation for SVP64[0]. Either
the exact opcodes should be reserved for SVP64 needs, or there must be some
established and documented way to determine programmatically that the code
uses SVP64 extensions, and not other extension. Either way, we're waiting
for OpenPOWER Foundation decision.

Before this decision is taken, and OPF approves and documents it, we'd like
to have some option to adjust the opcodes dynamically, effectively
populating the opcodes table with SVP64 instructions. Or, alternatively,
have a way to provide the alternative opcode table. This way, we would not
pollute the opcodes table and vanilla binutils with opcodes not blessed by
OPF yet. We've been thinking of some plugin, with obvious candidates being
dlopen/dlsym combo. Sure the code will be public, as well as the whole work
around libresoc and SVP64. Also, we might opt to tune few other things via
plugin as well: SVP64 prefixed opcodes are a perfect example of the place
where we fork.

I recall there are plugins in binutils, but I'm not sure whether these are
designed to areas other than linker. I'm also not sure whether this is
supported, and if there is a sufficient documentation on API. A quick
search yields include/plugin-api.h, which might be not what we want.

We'd like to consult with binutils developers on how to approach this
issue, and collect a feedback. Thank you in advance!

[0] https://sourceware.org/pipermail/binutils/2022-May/120775.html

Best regards,
Dmitry


More information about the Binutils mailing list