-
Notifications
You must be signed in to change notification settings - Fork 647
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
Implement local and global variables handling for wasm simd #4056
base: dev/simd_for_interp
Are you sure you want to change the base?
Implement local and global variables handling for wasm simd #4056
Conversation
f9a278d
to
bf72fdb
Compare
bf72fdb
to
2bc58d6
Compare
d59ec3c
to
8723135
Compare
952538c
to
c2909be
Compare
362946f
to
b8c9245
Compare
@@ -3536,6 +3541,24 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, | |||
HANDLE_OP_END(); | |||
} | |||
|
|||
#if WASM_ENABLE_SIMDE != 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't seem right - it makes the assumption about SIMD implementation; if for some platforms there will be another library used to implement SIMD instructions, you'd have to remember to update this place (and the condition will become more and more complicated). We should attempt to refactor the code so the simple and universal condition WASM_ENABLE SIMD != 0
should be sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment for all the other similar conditions in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's tackle this separately and out of this PR
addr = GET_OPERAND(uint32, I32, 0); \ | ||
frame_ip += 2; \ | ||
addr_ret = GET_OFFSET(); \ | ||
CHECK_MEMORY_OVERFLOW(4); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't it check the address of the v128 destination? if so, should that be 4 or rather 16?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check this once more
Co-authored-by: Marcin Kolny <[email protected]>
Co-authored-by: Marcin Kolny <[email protected]>
Co-authored-by: Marcin Kolny <[email protected]>
Co-authored-by: Marcin Kolny <[email protected]>
5450cae
to
36833e4
Compare
@@ -3536,6 +3541,24 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, | |||
HANDLE_OP_END(); | |||
} | |||
|
|||
#if WASM_ENABLE_SIMD != 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's repetitive but let's do it in a separate PR (same for all the places where v128 repeats i64 a lot
cc9b7ae
to
dbbbd0a
Compare
if (WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR "ARM.*") | ||
add_definitions (-DWASM_ENABLE_SIMDE=1) | ||
endif () | ||
add_definitions (-DWASM_ENABLE_SIMDE=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should hopefully be gone after refactoring but keeping it here so far
dbbbd0a
to
8cae7cc
Compare
note:
I plan a bigger refactoring in a separate PR when we have all the spec tests passing so that I can easily check that there are no regressions from refactoring