x86_64: Implement VarHandle.getAndAdd for fields.

The implementation is based on XADD instruction, so it cannot be reused
for other getAnd* methods.

Benchmarks improvements (using benchmarks provided by
https://android-review.googlesource.com/1420959):

  benchmark                           before   after
  --------------------------------------------------
  GetAndAddStaticFieldInt             2.338    0.012
  GetAndAddFieldInt                   2.614    0.012
  GetAndAddStaticFieldFloat           2.338    0.010
  GetAndAddFieldFloat                 2.612    0.010
  GetAndAddAcquireStaticFieldInt      2.337    0.007
  GetAndAddAcquireFieldInt            2.617    0.007
  GetAndAddAcquireStaticFieldFloat    2.337    0.010
  GetAndAddAcquireFieldFloat          2.610    0.010
  GetAndAddReleaseStaticFieldInt      2.336    0.007
  GetAndAddReleaseFieldInt            2.615    0.007
  GetAndAddReleaseStaticFieldFloat    2.334    0.010
  GetAndAddReleaseFieldFloat          2.613    0.010

Bug: 71781600
Test: lunch aosp_cf_x86_64_phone-userdebug \
  && art/test.py --host -r -t 712-varhandle-invocations --64
Test: Repeat with ART_USE_READ_BARRIER=false.
Test: Repeat with ART_HEAP_POISONING=true.
Change-Id: If41fd01b7e444a7157478999640f45d64bbf17f1
1 file changed