Skip to content

arm: allow swap_atomic dst == loc

Kimplul requested to merge Kimplul/lightening:arm-fix into main

When swap_atomic is called on arm (or aarch64) with dst == loc, it will overwrite the location register and not work as intended. I added similar logic as in cas_atomic to check if dst == loc || dst == val, as well as new tests for the *_atomic instructions, though they don't really check for actual atomicity, rather just that the instructions can be generated without segfaults/aborts and the values end up in the right places etc.

Merge request reports