4 ms·
You look up the opcodes for each assembler instructions in the ISA specifications, like https://www2.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-118.pdf http
by ReleaseCandidat 2y ago
You look up the opcodes for each assembler instructions in the ISA specifications, like https://www2.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-118.pdf https://www2.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-.... Information about the machine code format starts at "2.2 Base Instruction Formats". The actual opcodes you can find in chapter 9,"RV32/64G Instruction Set Listings".
But be aware that some assembler instructions (called e.g. pseudo instructions) generate more than one.
The linked document is an old one, current ones are at https://riscv.org/technical/specifications/ https://riscv.org/technical/specifications/
- alok-g 2y agoAwesome! Thanks!