-
Notifications
You must be signed in to change notification settings - Fork 1.2k
How to add a custom non-standard instruction type format #795
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
Comments
Binutils doesn't use instruction formats, except for the .insn pseudo op. If you want .insn support for your new instruction you might need to change that if the existing r4 instruction format support doesn't work. Otherwise, instruction formats are irrrelevant, and all that matters are the MASK/MATCH bit masks, and the 'd' 's' 't' etc letters to specify operands. But if your format is close enough to r4 then you probably don't need a new operand letter. |
FYI, I suppose all instructions can be derived from the existing instruction formats, although some of them might look weird. |
This should help, riscvarchive/riscv-binutils-gdb#184 |
Many thanks for your help Mr Wilson, with this I fixed the problem releted to the riscv-toolchain. Best Regards. |
Good morning to everyone, I want to add a custom non-standard instruction that should have the following type format:
This field format is not new for the RISC-V ISA, it resembles the R4-type format that is used for the encoding of some instructions in the standard extension RV32F for single precision floating point calculation. In that specific case the rs3 source register field has been replaced with the destination register called RD1, in which I want to write something.
I already find out how to encode this new instruction extension, but I’d like to know, as far as possible, the procedure on how to add this new instruction type format to the current RISCV toolchain ISA, in particular which files I have to modify in order to write a piece of code that allows to write onto the RD1 field.
Many thanks for your help.
The text was updated successfully, but these errors were encountered: