fw: Replace custom picorv32 instructions when building for qemu

This commit is contained in:
Mikael Ågren 2025-03-13 15:33:20 +01:00
parent 50966f010d
commit c9a7910965
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
3 changed files with 22 additions and 0 deletions

View file

@ -4,8 +4,19 @@
*/
#include <tkey/tk1_mem.h>
#ifdef QEMU_SYSCALL
#define picorv32_retirq_insn(...) \
mv ra, x3; \
ret
#else
#include "picorv32/custom_ops.S" // PicoRV32 custom instructions
#endif
#define illegal_insn() .word 0
// Variables in bss

View file

@ -1,5 +1,13 @@
#ifdef QEMU_SYSCALL
#define picorv32_maskirq_insn(...)
#else
#include "../tk1/picorv32/custom_ops.S"
#endif
.section ".text"
.globl syscall_enable