Conversation
This reverts commit 8bb2b84. The assertion makeStore is failing and I'm not going to debug that right now.
| // If control flow reaches the point of the WASM_UNREACHABLE(), the program is | ||
| // undefined. | ||
| #if __has_builtin(__builtin_unreachable) | ||
| #if __has_builtin(__builtin_unreachable) && defined(NDEBUG) |
There was a problem hiding this comment.
It means that it uses __builtin_unreachable only in release mode, and aborts in debug mode. Makes catching bugs easier.
src/wasm/wasm-binary.cpp
Outdated
| if (maybeVisitConst(curr, code)) break; | ||
| if (maybeVisitLoad(curr, code)) break; | ||
| if (maybeVisitStore(curr, code)) break; | ||
| if (maybeVisitLoad(curr, code, /*isAtomc=*/false)) break; |
|
I think we might need some followup work here:
|
|
Yes, we definitely need followup work. I probably should have said more about my current plan in a bug or something. But anyway, yeah this is definitely the beginning of adding atomic/shared mem support. |
Add IR, wast and binary support for atomic loads and stores.
Currently all IR generated by means other than parsing wast and binary files always generates non-atomic accesses, and optimizations have not yet been made aware of atomics, so they are certainly not ready to be used yet.