Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AArch64 codec is not scalable #5326

Open
AssadHashmi opened this issue Feb 3, 2022 · 3 comments
Open

AArch64 codec is not scalable #5326

AssadHashmi opened this issue Feb 3, 2022 · 3 comments

Comments

@AssadHashmi
Copy link
Contributor

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
Copy link
Contributor

Would this be related to #4393?

@AssadHashmi
Copy link
Contributor Author

Would this be related to #4393?

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

AssadHashmi added a commit that referenced this issue Feb 8, 2022
The current methods of defining and generating encode and decode
functionality are not scalable for implementing support of ISA
versions after v8.0

This patch splits up the codec.txt file into codec_<version>.txt files
and opnd_defs.txt. Generated code is now split out into ISA version
specific files.

Tests and related files have not been split up yet. That will happen
as part of new ISA version implementations.

Issue: #5326, #4393
AssadHashmi added a commit that referenced this issue Feb 8, 2022
The current methods of defining and generating encode and decode
functionality are not scalable for implementing support of ISA
versions after v8.0

This patch splits up the codec.txt file into codec_<version>.txt files
and opnd_defs.txt. Generated code is now split out into ISA version
specific files.

Tests and related files have not been split up yet. That will happen
as part of new ISA version implementations.

Issue: #5326, #4393
@derekbruening
Copy link
Contributor

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?

joshua-warburton added a commit that referenced this issue Jul 11, 2022
Previously codecsort.py was only applied to a single
codec at a time and thus couldn't allocate enums
uniquely as it didn't know about the enum values in
other files. This patch simplifies the process of
calling codecsort.py so that it can consider all the
codecs at once, and thus rewrite them as needed.

It also changes the default mode so that it returns
an exit code of 1 if it detects a rewrite is needed
making checking th order easier.

Issue: #5326

Change-Id: Id433cb9123e7cf901ae0e6bf14e84590cf39eadb
joshua-warburton added a commit that referenced this issue Jul 12, 2022
…5558)

Previously codecsort.py was only applied to a single
codec at a time and thus couldn't allocate enums
uniquely as it didn't know about the enum values in
other files. This patch simplifies the process of
calling codecsort.py so that it can consider all the
codecs at once, and thus rewrite them as needed.

It also changes the default mode so that it returns
an exit code of 1 if it detects a rewrite is needed
making checking the order easier.

Issue: #5326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants