DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.61k stars 554 forks source link

AArch64 codec is not scalable #5326

Open AssadHashmi opened 2 years ago

AssadHashmi commented 2 years ago

The current methods of defining and generating encode and decode functionality are not scalable for implementing support of ISA versions after v8.0

At present AArch64 has one codec.txt and one codec.c file which defines all instructions currently supported as well as all the bitmask and operand definitions. Encode and decode data and code generated from codec.txt are also all in one set of files regardless of ISA version.

Test files like dis-a64.txt and ir_aarch64.c contain all encode/decode instructions tests.

This issue will track separation of the codec by ISA version for the purposes of reduced maintenance overhead and more reliable functionality.

derekbruening commented 2 years ago

Would this be related to #4393?

AssadHashmi commented 2 years ago

Would this be related to https://github.com/DynamoRIO/dynamorio/issues/4393?

Yes. Partitioning by version will cleanly separate the current method of definition and generation from a future method.

derekbruening commented 2 years ago

Is there a plan to expose the ISA version in the IR interface? Would it be in the instruction structure, or all ISA version changes are assumed to be completely isolated by opcode (i.e., a version never adds a variant of an existing opcode) and it can be looked up purely from the opcode?