DescriptionSubzero: lower the rest of the atomic operations.
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
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=a3a01a2
Patch Set 1 #Patch Set 2 : sketch of cross test #Patch Set 3 : fill out xchg also #Patch Set 4 : add crosstest flag #Patch Set 5 : cross test now works #Patch Set 6 : fix esp/ebp #Patch Set 7 : extend live range to model the loop... #Patch Set 8 : beef up the crosstest a bit #Patch Set 9 : rename files #Patch Set 10 : Add an actually threaded test #Patch Set 11 : comment cleanup #
Total comments: 39
Patch Set 12 : first review-ish #Patch Set 13 : test a 64-bit #Patch Set 14 : rebase #Patch Set 15 : extend live range for xchg too #Patch Set 16 : revert register alloc workarounds #
Total comments: 12
Patch Set 17 : jf review #Patch Set 18 : var name style #Patch Set 19 : rebase #
Messages
Total messages: 10 (0 generated)
|