ARM: Reimplement the UnsafeCASObject intrinsic.
Clean up the shared code for all the UnsafeCAS* intrinsics
to avoid deprecated instructions (IT should only be followed
by a single 16-bit instruction) and simplify heap poisoning
code (to be more readable at the cost of performance).
For the UnsafeCASObject with Baker read barriers, drop the
old code updating the field. Perform the main path CAS loop
and redirect the flow for failure to a slow path that marks
the old value and compares it with the expected value (if
not marking, this is just a few instructions to determine
that they differ). If it's the same, the old value is known
to be the from-space reference to the expected object and
the slow path performs a modified CAS loop checking for both
expected object references (from-space and to-space).
Also replace all uses of vixl's EmissionCheckScope with the
ExactAssemblyScope in the arm32 codegen; all these uses are
related to the Baker read barrier using introspection.
Test: Already covered by 160-read-barrier-stress.
Test: m test-art-host-gtest
Test: Pixel 2 XL boots.
Test: testrunner.py --target --optimizing --32
Test: ART_HEAP_POISONING=true testrunner.py --target --optimizing --32
Bug: 36141117
Change-Id: If0b77d278826eb909b437ea9a1336afec575ccdf
3 files changed