riscv/riscv-opcodes

Constants.py is duplicated between riscv-opcodes and riscv-config?

tovine opened this issue · 4 comments

Seems very much like it is, should ideally be merged to a single source of truth and/or the one in this repository should get the same improvements as this? riscv-software-src/riscv-config#105

They are not duplicated. I have used "constants" has a naming convention for a file holding manually defined constants. The constants.py file in opcodes and riscv-config is drastically different and used for completely different use-cases.

I see, but the list of extensions (and isa_regex) is still duplicated (and inconsistent!) between the two. Is there a way to have one of them be the "master" and include the other?
I guess having riscv-opcodes the main source of truth would make sense since it's the first one to be updated.

EDIT: also the isa_regex in this one currently has the same issues as I addressed in the linked PR for riscv-config

isa_regex in opcodes is probably useless.. I don't see any references to it and thus can be removed.
Thus, the RISC-V config version must be considered golden in this case

Good. This of course needs to be investigated, as it might be used in various other repositories that use this as a submodule, but it sounds like a good idea to remove it if unused (and any such dependents should in that case be modified to use the one from riscv-config instead)