mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 11:40:18 +01:00
mpy-cross: Add RISC-V RV32IMC support in MPY files.
MPY files can now hold generated RV32IMC native code. This can be accomplished by passing the `-march=rv32imc` flag to mpy-cross. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit is contained in:
committed by
Damien George
parent
8338f66352
commit
99f5659cf5
@@ -113,6 +113,7 @@ MP_NATIVE_ARCH_ARMV7EMSP = 7
|
||||
MP_NATIVE_ARCH_ARMV7EMDP = 8
|
||||
MP_NATIVE_ARCH_XTENSA = 9
|
||||
MP_NATIVE_ARCH_XTENSAWIN = 10
|
||||
MP_NATIVE_ARCH_RV32IMC = 11
|
||||
|
||||
MP_PERSISTENT_OBJ_FUN_TABLE = 0
|
||||
MP_PERSISTENT_OBJ_NONE = 1
|
||||
@@ -1094,8 +1095,10 @@ class RawCodeNative(RawCode):
|
||||
):
|
||||
# ARMV6 or Xtensa -- four byte align.
|
||||
self.fun_data_attributes += " __attribute__ ((aligned (4)))"
|
||||
elif MP_NATIVE_ARCH_ARMV6M <= config.native_arch <= MP_NATIVE_ARCH_ARMV7EMDP:
|
||||
# ARMVxxM -- two byte align.
|
||||
elif (
|
||||
MP_NATIVE_ARCH_ARMV6M <= config.native_arch <= MP_NATIVE_ARCH_ARMV7EMDP
|
||||
) or config.native_arch == MP_NATIVE_ARCH_RV32IMC:
|
||||
# ARMVxxM or RV32IMC -- two byte align.
|
||||
self.fun_data_attributes += " __attribute__ ((aligned (2)))"
|
||||
|
||||
def disassemble(self):
|
||||
|
||||
Reference in New Issue
Block a user