-
Notifications
You must be signed in to change notification settings - Fork 561
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
i#5994 opcode_mix, part1: add categories to opcode_mix output #6512
Conversation
Groups instructions that belong to the same categories together, and prints (to std::cerr) a count of them at the end of opcode counts. Issue: #5994
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing! I have some suggestions.
executed instruction.
Category names are now space separated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, but I had a few more suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two more requests. (Sorry, not trying to "move the goalposts": should have put these in the first round of reviews.)
for opcode and category cache.
32 bits (i.e., all possible categories an instruction can belong to). This way we have single point of control in core/ir/instr_shared.c to assign a name for a new category.
instr_get_category_name().
and uncategorized instruction (OP_in).
we are now including tools.h .
The number of characters that were compared was always 8 (sizeof(category_names[i]) == sizeof(char*)), now using strlen().
of instr_get_category_name() api.
for debugging purposes.
(hopefully in the right place this time).
Moved run position after set() for unrelated opcode_mix test. Enforced order on opcode and categories when printed for consistency in expected output.
Undo tmate changes.
Only for x86_64 Linux, since the tested program is allasm_x86_64.
Test opcode_categories fixed. |
Now that we have temporary variables we need scopes, used the do { ... } while (0); trick. encode() and decode() return byte* not byte. Fixed.
function of opcode_mix_t.
Groups instructions that belong to the same categories together, and prints (to std::cerr) a count of them at the end of opcode counts.
Issue: #5994