4 ms·
One thing that comes to mind: Compressed instructions enable 2-byte alignment for all instructions, and actually allows for a 4-byte instruction to span two pag
by fwsgonzo 3y ago
One thing that comes to mind: Compressed instructions enable 2-byte alignment for all instructions, and actually allows for a 4-byte instruction to span two pages.
EDIT: Looks like I'm not alone: https://news.ycombinator.com/item?id=29667135 https://news.ycombinator.com/item?id=29667135
He is completely right and I have had those exact problems: Not being able to figure out where you are in the instruction stream annoys me when it comes to RVC. I actually dislike it so much that I intentionally disregard it in my RISC-V emulator and focus on other things, eg. RV64GVB etc. I support C-extension, but it's hard to make it run fast. I wish they solved compression another way. We have very fast compressors/decompressors that can use dedicated dictionaries that could have been used in ELF loading instead.
- circuit10 3y agoDecompressing during loading wouldn’t help memory/cache usage once the code is loaded
- fwsgonzo 3y agoI didn't think about the potential benefits of fitting in icache. I managed to find this PDF that does admit that it has a modest 2-3% benefit whenever the code wouldn't normally fit in icache: https://forums.macrumors.com/attachments/a-case-to-remove-the-c-extension-from-app-profiles-profiltes-tg-20230929-pdf.2290162/ https://forums.macrumors.com/attachments/a-case-to-remove-th...