-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, the named fields are belong to each instruction and don't carry instruction based semantics.
Here is example of addi instruction with rs1, rd, imm
addi:
long_name: Add immediate
description: Add an immediate to the value in rs1, and store the result in rd
definedBy: I
assembly: xd, xs1, imm
encoding:
match: -----------------000-----0010011
variables:
- name: imm
location: 31-20
- name: rs1
location: 19-15
- name: rd
location: 11-7Does it make sense to specify reference from each instruction into common reference table that will carry more detailed information about the field (type, zero/sign extension, addressing mode, source/destination, etc.)
Here is how the table could look like:
https://github.com/drom/riscv/blob/master/lib/fieldo.js
This information could be elaborated inside the instruction when flat form is needed.
addi:
long_name: Add immediate
description: Add an immediate to the value in rs1, and store the result in rd
definedBy: I
assembly: xd, xs1, imm
encoding:
match: -----------------000-----0010011
variables:
- {$ref: 'fieldo.json/imm12'}
- {$ref: 'fieldo.json/rs1'}
- {$ref: 'fieldo.json/rd'}Also, looking at the large usage counts of some fields, it might be important to know that some set of instructions share semantics of some field.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request