PULP Community
Add custom instruction - Printable Version

+- PULP Community (https://pulp-platform.org/community)
+-- Forum: PULP's Community forum (https://pulp-platform.org/community/forumdisplay.php?fid=1)
+--- Forum: PULP General questions (https://pulp-platform.org/community/forumdisplay.php?fid=2)
+--- Thread: Add custom instruction (/showthread.php?tid=183)



Add custom instruction - nayan - 04-08-2020

I downloaded pulp riscv gnu toolchain and pulp sdk. I there a way to add a custom instruction to the riscv cross compiler?


RE: Add custom instruction - bluewww - 04-08-2020

This is more a GCC than a PULP question. One way is that you study the pulp-riscv-gnu-toolchain code by looking how we added one instruction such p.lw. In general you need to add it to the gnu binutils table so that the assembler nows about it. Then you need to teach gcc about your instruction, this is much harder. There is no easy way.