mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
Enable Nuttx spec test option and register aot symbols (#1687)
Enable spec test option on Nuttx platform. Register sqrt/sqrtf in aot global symbol map and _fixdfdi/__floatundidf in xtensa symbol map.
This commit is contained in:
parent
328fd59f43
commit
f59ffa0d63
|
@ -124,6 +124,8 @@ typedef struct {
|
||||||
{ "memset", (void*)aot_memset }, \
|
{ "memset", (void*)aot_memset }, \
|
||||||
{ "memmove", (void*)aot_memmove }, \
|
{ "memmove", (void*)aot_memmove }, \
|
||||||
{ "memcpy", (void*)aot_memmove }, \
|
{ "memcpy", (void*)aot_memmove }, \
|
||||||
|
{ "sqrt", (void*)aot_sqrt }, \
|
||||||
|
{ "sqrtf", (void*)aot_sqrtf }, \
|
||||||
REG_SYM(fmin), \
|
REG_SYM(fmin), \
|
||||||
REG_SYM(fminf), \
|
REG_SYM(fminf), \
|
||||||
REG_SYM(fmax), \
|
REG_SYM(fmax), \
|
||||||
|
|
|
@ -1968,6 +1968,18 @@ aot_memset(void *s, int c, size_t n)
|
||||||
return memset(s, c, n);
|
return memset(s, c, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double
|
||||||
|
aot_sqrt(double x)
|
||||||
|
{
|
||||||
|
return sqrt(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
aot_sqrtf(float x)
|
||||||
|
{
|
||||||
|
return sqrtf(x);
|
||||||
|
}
|
||||||
|
|
||||||
#if WASM_ENABLE_BULK_MEMORY != 0
|
#if WASM_ENABLE_BULK_MEMORY != 0
|
||||||
bool
|
bool
|
||||||
aot_memory_init(AOTModuleInstance *module_inst, uint32 seg_index, uint32 offset,
|
aot_memory_init(AOTModuleInstance *module_inst, uint32 seg_index, uint32 offset,
|
||||||
|
|
|
@ -451,6 +451,12 @@ aot_memmove(void *dest, const void *src, size_t n);
|
||||||
void *
|
void *
|
||||||
aot_memset(void *s, int c, size_t n);
|
aot_memset(void *s, int c, size_t n);
|
||||||
|
|
||||||
|
double
|
||||||
|
aot_sqrt(double x);
|
||||||
|
|
||||||
|
float
|
||||||
|
aot_sqrtf(float x);
|
||||||
|
|
||||||
#if WASM_ENABLE_BULK_MEMORY != 0
|
#if WASM_ENABLE_BULK_MEMORY != 0
|
||||||
bool
|
bool
|
||||||
aot_memory_init(AOTModuleInstance *module_inst, uint32 seg_index, uint32 offset,
|
aot_memory_init(AOTModuleInstance *module_inst, uint32 seg_index, uint32 offset,
|
||||||
|
|
|
@ -41,6 +41,9 @@ void __gtdf2();
|
||||||
void __umoddi3();
|
void __umoddi3();
|
||||||
void __floatdidf();
|
void __floatdidf();
|
||||||
void __divsf3();
|
void __divsf3();
|
||||||
|
void __fixdfdi();
|
||||||
|
void __floatundidf();
|
||||||
|
|
||||||
|
|
||||||
static SymbolMap target_sym_map[] = {
|
static SymbolMap target_sym_map[] = {
|
||||||
REG_COMMON_SYMBOLS
|
REG_COMMON_SYMBOLS
|
||||||
|
@ -80,8 +83,8 @@ static SymbolMap target_sym_map[] = {
|
||||||
REG_SYM(__umoddi3),
|
REG_SYM(__umoddi3),
|
||||||
REG_SYM(__floatdidf),
|
REG_SYM(__floatdidf),
|
||||||
REG_SYM(__divsf3),
|
REG_SYM(__divsf3),
|
||||||
REG_SYM(sqrt),
|
REG_SYM(__fixdfdi),
|
||||||
REG_SYM(sqrtf),
|
REG_SYM(__floatundidf),
|
||||||
};
|
};
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
||||||
|
|
|
@ -287,6 +287,12 @@ else
|
||||||
CFLAGS += -DWASM_ENABLE_GLOBAL_HEAP_POOL=0
|
CFLAGS += -DWASM_ENABLE_GLOBAL_HEAP_POOL=0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_INTERPRETERS_WAMR_ENABLE_SPEC_TEST),y)
|
||||||
|
CFLAGS += -DWASM_ENABLE_SPEC_TEST=1
|
||||||
|
else
|
||||||
|
CFLAGS += -DWASM_ENABLE_SPEC_TEST=0
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += -Wno-strict-prototypes -Wno-shadow -Wno-unused-variable
|
CFLAGS += -Wno-strict-prototypes -Wno-shadow -Wno-unused-variable
|
||||||
CFLAGS += -Wno-int-conversion -Wno-implicit-function-declaration
|
CFLAGS += -Wno-int-conversion -Wno-implicit-function-declaration
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user