Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/nuttx spectest option and symbols #1687

Conversation

dongsheng28849455
Copy link
Contributor

Enable spec test option on nuttx platform
Register more symbols in sym_map

NuttX doesn't have SO_REUSEPORT.
Register some symbols and enable the WASM_ENABLE_SPEC_TEST for nuttx
Copy link
Collaborator

@yamt yamt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment on lines 139 to 140
REG_SYM(sqrt), \
REG_SYM(sqrtf), \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sqrt/sqrtf might be a macro but not function, adding them here may cause compile error, see Windows CI report:
https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/3406870901

Suggest to register them like aot_memset/memmove:
Declare and implement aot_sqrt and aot_sqrtf in aot_runtime.h and aot_runtime.c, just after the code of aot_memset and aot_memmove:
https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/core/iwasm/aot/aot_runtime.h#L448-L452

And here:

{ "sqrt", (void*)aot_sqrt },
{ "sqrtf", (void*)aot_sqrtf },

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. then how can we know which APIs may not function but macro? if in future we encounter similar problems again

…indows platform

sqrt and sqrtf cannot be a const value to init struture instance on windows platform
@wenyongh wenyongh merged commit f59ffa0 into bytecodealliance:main Nov 8, 2022
NingW101 pushed a commit to NingW101/wasm-micro-runtime that referenced this pull request Dec 1, 2022
…nce#1687)

Enable spec test option on Nuttx platform.
Register sqrt/sqrtf in aot global symbol map and
_fixdfdi/__floatundidf in xtensa symbol map.
wenyongh pushed a commit that referenced this pull request Dec 6, 2022
Enable spec test option on Nuttx platform.
Register sqrt/sqrtf in aot global symbol map and
_fixdfdi/__floatundidf in xtensa symbol map.
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…nce#1687)

Enable spec test option on Nuttx platform.
Register sqrt/sqrtf in aot global symbol map and
_fixdfdi/__floatundidf in xtensa symbol map.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants