Skip to content

Commit 268acb7

Browse files
agattidpgeorge
authored andcommittedJan 2, 2025
py/emitinlinerv32: Add inline assembler support for RV32.
This commit adds support for writing inline assembler functions when targeting a RV32IMC processor. Given that this takes up a bit of rodata space due to its large instruction decoding table and its extensive error messages, it is enabled by default only on offline targets such as mpy-cross and the qemu port. Signed-off-by: Alessandro Gatti <[email protected]>
1 parent 3044233 commit 268acb7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2649
-45
lines changed
 

‎mpy-cross/mpconfigport.h

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#define MICROPY_EMIT_INLINE_XTENSA (1)
4848
#define MICROPY_EMIT_XTENSAWIN (1)
4949
#define MICROPY_EMIT_RV32 (1)
50+
#define MICROPY_EMIT_INLINE_RV32 (1)
5051
#define MICROPY_EMIT_NATIVE_DEBUG (1)
5152
#define MICROPY_EMIT_NATIVE_DEBUG_PRINTER (&mp_stdout_print)
5253

‎ports/qemu/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ QSTR_DEFS = qstrdefsport.h
1919
MICROPY_ROM_TEXT_COMPRESSION ?= 1
2020

2121
ifeq ($(QEMU_ARCH),arm)
22-
FROZEN_MANIFEST ?= "require('unittest'); freeze('test-frzmpy')"
22+
FROZEN_MANIFEST ?= "require('unittest'); freeze('test-frzmpy', ('frozen_asm_thumb.py', 'frozen_const.py', 'frozen_viper.py', 'native_frozen_align.py'))"
2323
endif
2424
ifeq ($(QEMU_ARCH),riscv32)
25-
FROZEN_MANIFEST ?= "require('unittest'); freeze('test-frzmpy', ('frozen_const.py', 'frozen_viper.py', 'native_frozen_align.py'))"
25+
FROZEN_MANIFEST ?= "require('unittest'); freeze('test-frzmpy', ('frozen_asm_rv32.py', 'frozen_const.py', 'frozen_viper.py', 'native_frozen_align.py'))"
2626
endif
2727

2828
# include py core make definitions

0 commit comments

Comments
 (0)
Please sign in to comment.