diff options
author | Alessandro Gatti <a.gatti@frob.it> | 2025-09-11 21:59:31 +0200 |
---|---|---|
committer | Alessandro Gatti <a.gatti@frob.it> | 2025-09-19 15:52:20 +0200 |
commit | 1fea1e20db7f677db5fb10b1e0becd7713755bb6 (patch) | |
tree | 6690c20a07e7c55c6ddba34c314809a97d4c3073 | |
parent | 40dbf774151140839c74e0bf226bb7d254129eb9 (diff) |
qemu: Enable Zba opcodes for the VIRT_RV32 board.
This commit enables the usage of the Zba address generation opcodes in
the QEMU port when targeting the "VIRT_RV32" board, which emulates a
generic RV32 target.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
-rw-r--r-- | ports/qemu/Makefile | 2 | ||||
-rw-r--r-- | ports/qemu/boards/VIRT_RV32/mpconfigboard.mk | 2 | ||||
-rw-r--r-- | ports/qemu/mpconfigport.h | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/ports/qemu/Makefile b/ports/qemu/Makefile index 685bb3536..84711cc45 100644 --- a/ports/qemu/Makefile +++ b/ports/qemu/Makefile @@ -193,7 +193,7 @@ CFLAGS += $(SPECS_FRAGMENT) LDFLAGS += $(SPECS_FRAGMENT) endif -RUN_TESTS_FULL_ARGS = -t execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../ports/qemu/$<" $(RUN_TESTS_ARGS) +RUN_TESTS_FULL_ARGS = -t execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../ports/qemu/$<" --mpy-cross-flags='$(MPY_CROSS_FLAGS)' $(RUN_TESTS_ARGS) ################################################################################ # Source files and libraries diff --git a/ports/qemu/boards/VIRT_RV32/mpconfigboard.mk b/ports/qemu/boards/VIRT_RV32/mpconfigboard.mk index ce1272092..6a3b94a98 100644 --- a/ports/qemu/boards/VIRT_RV32/mpconfigboard.mk +++ b/ports/qemu/boards/VIRT_RV32/mpconfigboard.mk @@ -8,4 +8,4 @@ LDSCRIPT = mcu/rv32/virt.ld SRC_BOARD_O += shared/runtime/gchelper_native.o shared/runtime/gchelper_rv32i.o -MPY_CROSS_FLAGS += -march=rv32imc +MPY_CROSS_FLAGS += -march=rv32imc -march-flags=zba diff --git a/ports/qemu/mpconfigport.h b/ports/qemu/mpconfigport.h index 1649d8a01..3d2466a91 100644 --- a/ports/qemu/mpconfigport.h +++ b/ports/qemu/mpconfigport.h @@ -41,6 +41,7 @@ #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1)) #elif defined(__riscv) && (__riscv_xlen == 32) #define MICROPY_EMIT_RV32 (1) +#define MICROPY_EMIT_RV32_ZBA (1) #define MICROPY_EMIT_INLINE_RV32 (1) #endif |