X86: Implement VarHandle.getAndSet, getAndSetAcquire, getAndSetRelease
This commit implements VarHandle getAndSet variants. This implied adding
xchgb and xchgw instructions and tests for them.
Also, all the varType checks were moved to GenerateVarHandleCommonChecks.
Test: ART_HEAP_POISONING=true art/test.py --host -r -t 712-varhandle-invocation --32
Test: ART_HEAP_POISONING=false art/test.py --host -r -t 712-varhandle-invocation --32
Test: ART_USE_READ_BARRIER=true art/test.py --host -r -t 712-varhandle-invocation --32
Test: ART_USE_READ_BARRIER=false art/test.py --host -r -t 712-varhandle-invocation --32
Test: m test-art-host-gtest
Bug: 65872996
Change-Id: I675f47e1dbb51a5ece42f20ad8ce552cfef63ffe
5 files changed