64-bit ops are expanded via a cmpxchg8b loop. 64/32-bit and/or/xor are also expanded into a cmpxchg / cmpxchg8b loop. Add a cross test for atomic RMW operations and compare and swap. Misc: Test that atomic.is.lock.free can be optimized out if result is ignored. TODO: * optimize compare and swap with compare+branch further down instruction stream. * optimize atomic RMW when the return value is ignored (adds a locked field to binary ops though). * We may want to do some actual target-dependent basic block splitting + expansion (the instructions inserted by the expansion must reference the pre-colored registers, etc.). Otherwise, we are currently getting by with modeling the extended liveness of the variables used in the loops using fake uses. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3882 R=jfb@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/362463002
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| crosstest.py | Loading commit data... | |
| mem_intrin.cpp | Loading commit data... | |
| mem_intrin.h | Loading commit data... | |
| mem_intrin_main.cpp | Loading commit data... | |
| runtests.sh | Loading commit data... | |
| simple_loop.c | Loading commit data... | |
| simple_loop_main.c | Loading commit data... | |
| test_arith.cpp | Loading commit data... | |
| test_arith.def | Loading commit data... | |
| test_arith.h | Loading commit data... | |
| test_arith_frem.ll | Loading commit data... | |
| test_arith_main.cpp | Loading commit data... | |
| test_arith_sqrt.ll | Loading commit data... | |
| test_cast.cpp | Loading commit data... | |
| test_cast.h | Loading commit data... | |
| test_cast_main.cpp | Loading commit data... | |
| test_cast_to_u1.ll | Loading commit data... | |
| test_fcmp.def | Loading commit data... | |
| test_fcmp.pnacl.ll | Loading commit data... | |
| test_fcmp_main.cpp | Loading commit data... | |
| test_global.cpp | Loading commit data... | |
| test_global.h | Loading commit data... | |
| test_global_main.cpp | Loading commit data... | |
| test_icmp.cpp | Loading commit data... | |
| test_icmp.def | Loading commit data... | |
| test_icmp.h | Loading commit data... | |
| test_icmp_main.cpp | Loading commit data... | |
| test_sync_atomic.cpp | Loading commit data... | |
| test_sync_atomic.def | Loading commit data... | |
| test_sync_atomic.h | Loading commit data... | |
| test_sync_atomic_main.cpp | Loading commit data... |