-
Notifications
You must be signed in to change notification settings - Fork 12
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
[JSON]: Handling Optional Operands #17
Conversation
operands
[WIP]: This needs more work. The logic for extracting operands is not sound currently, as we need to extract it from the actual |
This currently extends the operands with an optional boolean field:
|
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.
I did a cursory review as I head out the door, and will revisit this tomorrow. I have left some comments that could be addressed in the meantime.
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.
3 minor comments, inline.
[when
is new to me, but I understand it adds an additional condition for the entire case to be satisfied. Neat!]
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.
2 very minor comments, and a small refactor request. (Then, I think we're good.)
Sorry about the recent commits. I was working on this issue and accidentally committed here. I've since reverted the changes. |
Let me know if you have any further feedback/suggestion. If this looks good, should i go ahead and squash the commits, with a proper descriptive message? |
No further comments. I was going to squash and merge, but you would be able to create your preferred commit if you squash. Thanks! |
This commit enhances the JSON Backend to properly handle instructions with optional operands. Previously, these operands were not handled correctly. The implementation introduces two new fields: `optional`, which indicates whether an operand is optional (boolean), and `default`, which holds the default value if no value is specified. for 'vle16.v': Before: ``` { "operands": [ ... { "name": "vm", "type": "bits(1)" } ... ] } ``` After: ``` { "operands": [ ... { "name": "vm", "type": "bits(1)", "optional": true, "default": "v0.t" } ... ] } ``` Fixes: ThinkOpenly#2
Squashed the commits.Let me know if you'd like any modifications to the commit message. Otherwise, I think we're ready to proceed with the merge. |
No description provided.