-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
M68000 OperandTypes not being set properly #4355
Comments
Operand type determination is very sensitive to how a language is written and the complexity of operand subconstructors. In some cases the issue can stem from poor choices in language specification in other cases it is unavoidable. Could you please provide screen captures of the Instruction Information dialog for sample instruction cases. This dialog can be displayed via the popup menu in the listing for a selected instruction. |
You should probably eliminate the following restriction in your script to allow output for every operand. Not all operands produce op-objects but may produce an operand type.
It is also confusing since some of your output relates to the entire instruction but is output for each operand. Your nested loops which both iterate per operand seems odd:
|
For the two iterators, the first loop is iterating through the operands, and the second is iterating through the objects in each operand. E.g. for the instruction And as for printing out the same instruction for each operand, that was just so I could have the context of what the instruction was in every print. |
Case 1: For your Case 2: The
The DYNAMIC type is a default if no other specific type can be determined. You can also look into the |
@alex-bellon API appears to be working as intended - albeit confusing at times. Closing ticket, but feel free to add comments/questions if you like. |
Describe the bug
For instructions where one of the operands is a register, the OperandTypes are not always set the same.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Unless I am misunderstanding how these flags work, operands that are using the same addressing modes (e.g. offset from the address in a register) should have the same resulting operand types.
Screenshots
Here, the second operand is an address, but is not marked as one (output from my own script, attached)
But here another operand is using the same addressing mode and is marked as an
ADDRESS
in addition toDYNAMIC
Here is another example, where in one case a register is properly flagged as
REGISTER
,but here a register is not
Attachments
My (hacky) Ghidra script to print out this information:
Environment (please complete the following information):
pacman
The text was updated successfully, but these errors were encountered: