forked from rems-project/sail
-
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
Include optional operands #2
Comments
looking into this! |
I just thought of one additional piece of information needed here: the value to be used if there is no value specified. This was suggested in Slack:
Modifying that to add a default value might look like:
|
snapdgn
added a commit
to snapdgn/sail
that referenced
this issue
Apr 11, 2024
snapdgn
added a commit
to snapdgn/sail
that referenced
this issue
Apr 11, 2024
snapdgn
added a commit
to snapdgn/sail
that referenced
this issue
Apr 11, 2024
snapdgn
added a commit
to snapdgn/sail
that referenced
this issue
May 23, 2024
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
ThinkOpenly
pushed a commit
that referenced
this issue
Jun 17, 2024
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: #2
ThinkOpenly
pushed a commit
that referenced
this issue
Sep 16, 2024
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: #2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some instructions have optional operands, and these are not handled properly.
The functions which get mapped to the string with the operand (or without) are currently treated as "identity" functions and essentially ignored while the operand is preserved. The separator is generally emitted by these functions as well, so that is lost as well, leading to syntaxes like:
These situations may require the "syntax" field resolving to a list of strings instead of the current strings with something like:
The text was updated successfully, but these errors were encountered: