dynamorio icon indicating copy to clipboard operation
dynamorio copied to clipboard

AArch64 codec is not scalable

Open AssadHashmi opened this issue 3 years ago • 3 comments

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.

AssadHashmi avatar Feb 03 '22 12:02 AssadHashmi

Would this be related to #4393?

derekbruening avatar Feb 03 '22 16:02 derekbruening

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.

AssadHashmi avatar Feb 03 '22 17:02 AssadHashmi

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?

derekbruening avatar Feb 09 '22 15:02 derekbruening