3 ms·
I have a question: Let's say you compile FreeBSD yourself (or another kernel with 64-bit RISC-V support), and you decide that you don't want the C-extension (co
by fwsgonzo 6y ago
I have a question: Let's say you compile FreeBSD yourself (or another kernel with 64-bit RISC-V support), and you decide that you don't want the C-extension (compressed instructions). Will you be able to switch this extension off without encountering any issues, for example with assembly? I have a feeling that you can't even write compressed instructions with assembly unless you hand-write the instruction opcodes yourself, so maybe it's not an issue?
- jeff-davis 6y agoI thought they were the same instructions, just a more compact representation (that has a subset of functionality)?
- fwsgonzo 6y agoThey are, but there are some drawbacks: 32-bit instructions can cross page-boundries and 16-bit instructions makes the length of the instruction dependent on a bit-pattern instead of a fixed-width.
- jabl 6y agoYes, they should have specified that even with the C extension, 32-bit instructions are 32-bit aligned. That would have slightly worsened density as you'd need a 16-bit nop to pad an uneven number of 16-bit instructions, but would have simplified decoding.