x86_64: Implement VarHandle.compareAnd* for arrays and byte array views.

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

  benchmark                                   before   after
  ----------------------------------------------------------
  CompareAndSetArrayElementInt                2.870    0.007
  CompareAndSetArrayElementString             3.447    0.008
  CompareAndExchangeArrayElementInt           2.826    0.007
  CompareAndExchangeArrayElementString        3.437    0.009
  CompareAndSetByteArrayViewInt               2.929    0.007
  CompareAndExchangeByteArrayViewInt          2.878    0.007
  CompareAndSetByteArrayViewBigEndianInt      2.930    0.007
  CompareAndExchangeByteArrayViewBigEndianInt 2.875    0.007

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: I48fb24ff53b7badfe55ee9d6f394d99ae59efb39
1 file changed