Align opcodes

opam-2.0.0
Vova 3 years ago
parent 4916bc2065
commit c8337c44f8

@ -110,32 +110,30 @@ typedef int8_t i8;
# if defined (M3_COMPILER_MSVC)
# define vectorcall // For MSVC, better not to specify any call convention
# elif defined(__x86_64__)
# define vectorcall __attribute__((aligned(32)))
# elif defined(__MINGW32__)
# define vectorcall
# elif defined(WIN32)
# define vectorcall __vectorcall
# elif defined (ESP8266)
# include <c_types.h>
# define op_section //ICACHE_FLASH_ATTR
# define vectorcall //ICACHE_FLASH_ATTR
# elif defined (ESP32)
# if defined(M3_IN_IRAM) // the interpreter is in IRAM, attribute not needed
# define op_section
# define vectorcall
# else
# include "esp_system.h"
# define op_section IRAM_ATTR
# define vectorcall IRAM_ATTR
# endif
# elif defined (FOMU)
# define op_section __attribute__((section(".ramtext")))
# define vectorcall __attribute__((section(".ramtext")))
# endif
#ifndef vectorcall
#define vectorcall
#endif
#ifndef op_section
#define op_section
#endif
/*
* Device-specific defaults

@ -45,7 +45,7 @@ d_m3BeginExternC
typedef m3ret_t (vectorcall * IM3Operation) (d_m3OpSig);
#define d_m3RetSig static inline m3ret_t vectorcall
#define d_m3Op(NAME) M3_NO_UBSAN op_section d_m3RetSig op_##NAME (d_m3OpSig)
#define d_m3Op(NAME) M3_NO_UBSAN d_m3RetSig op_##NAME (d_m3OpSig)
#define nextOpImpl() ((IM3Operation)(* _pc))(_pc + 1, d_m3OpArgs)
#define jumpOpImpl(PC) ((IM3Operation)(* PC))( PC + 1, d_m3OpArgs)
@ -53,6 +53,11 @@ typedef m3ret_t (vectorcall * IM3Operation) (d_m3OpSig);
#define nextOpDirect() return nextOpImpl()
#define jumpOpDirect(PC) return jumpOpImpl((pc_t)(PC))
d_m3RetSig RunCode (d_m3OpSig)
{
nextOpDirect();
}
d_m3EndExternC
#endif // m3_exec_defs_h

Loading…
Cancel
Save