X86: Refactor UnsafeCAS and VarHandle.compareAndSet intrinsics.

This commit overloads GenCAS method to have the possibility to use it
for code generation of both UnsafeCAS and VarHandle.compareAndSet. This
also implied readjusting the locations builder of VarHandle
compareAndSet.

Test: ART_HEAP_POISONING=true art/test.py --host --all-compiler -r --32
Test: ART_HEAP_POISONING=false art/test.py --host --all-compiler -r --32
Test: ART_USE_READ_BARRIER=true art/test.py --host --all-compiler -r --32
Test: ART_USE_READ_BARRIER=false art/test.py --host --all-compiler -r --32
Bug: 65872996

Change-Id: Iaabcbf3d239313cb701c622f2f63e46d11e9f982
1 file changed