Assembly schema #1532
Paul Clarke (ThinkOpenly)
started this conversation in
General
Assembly schema
#1532
Replies: 2 comments
|
Currently, the gist of #1527 is to create a new instruction attribute, "operands" which is simply an array of the various operand types (register, immediate, and the other less-common types). Each operand will support/require attributes to fully define it. (Not everything listed above is there yet. This allows the assembly syntax to be formally defined, avoiding heuristics and conventions. It does not attempt to support linker symbols, nor does it include anything about operand-field mappings. |
0 replies
|
If we are mucking with the assembly string, I suggest we also enclose all operand references in {} (or something) to differentiate them other, non-special text |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This discussion is about how to represent the assembly syntax for instructions. Example:
Operands can be indexes into various register files, integer values, base+offset "integer_offset(base_general_purpose_register_file_index)", and various other special cases.
Currently the assembly syntax is represented simply as a string showing the comma-separated operands using various ad-hoc conventions for register file, source/destination, various attributes of integer values ("immediates") (signedness, class, etc.), etc.
As an example, from "store word" ("sw"):
If we restrict the term "operand" to just those elements in a comma-separated list, then we need to consider what those elements can be, and the various associated and independent attributes:
Adjacent, there needs to be an explicitly defined mapping from operands to opcode fields and vice-versa.
PR #1435 and PR #1527 are taking steps to address this representation. I'm opening this "discussion" to maybe talk through the approaches and make sure we end up with a reasonable complete and robust solution.
(Explicitly inviting Derek Hower (@dhower-qc) and Sam Elliott (@lenary), but anyone is welcome with constructive comments.)
All reactions