arm64: Implement VarHandle GetAndSet intrinsics.

Add an extra test to 160-read-barrier-stress. The main path
is sufficiently exercised by 712-varhandle-invocations.

Using benchmarks provided by
    https://android-review.googlesource.com/1420959
on blueline little cores with fixed frequency 1420800:
                                  before after
GetAndSetStaticFieldInt           23.809 0.027
GetAndSetStaticFieldString        27.112 0.035
GetAndSetFieldInt                 26.988 0.028
GetAndSetFieldString              29.626 0.034
GetAndSetAcquireStaticFieldInt    23.900 0.025
GetAndSetAcquireStaticFieldString 27.084 0.034
GetAndSetAcquireFieldInt          26.972 0.026
GetAndSetAcquireFieldString       29.617 0.032
GetAndSetReleaseStaticFieldInt    23.876 0.027
GetAndSetReleaseStaticFieldString 27.093 0.035
GetAndSetReleaseFieldInt          26.969 0.028
GetAndSetReleaseFieldString       29.609 0.034

Test: testrunner.py --target --64 --optimizing
Test: Repeat with ART_USE_READ_BARRIER=false ART_HEAP_POISONING=true.
Test: Repeat with ART_READ_BARRIER_TYPE=TABLELOOKUP.
      (Ignore two pre-existing checker test failures.)
Bug: 71781600
Change-Id: I6a03858b1446354919cd4d08348ef93b725aafc6
5 files changed