summaryrefslogtreecommitdiff
path: root/compiler/utils/x86/assembler_x86.h
diff options
context:
space:
mode:
author Andra Danciu <andradanciu@google.com> 2020-09-22 13:27:18 +0000
committer Vladimir Marko <vmarko@google.com> 2020-09-23 08:05:32 +0000
commit9dfb1a9d642b9eb627895ef3364736fc839b4fe4 (patch)
tree776f1e58c13f620829bde196163ebab089506d1b /compiler/utils/x86/assembler_x86.h
parentc372314fe478afe6aec5573c26bca378d686072d (diff)
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
Diffstat (limited to 'compiler/utils/x86/assembler_x86.h')
-rw-r--r--compiler/utils/x86/assembler_x86.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/utils/x86/assembler_x86.h b/compiler/utils/x86/assembler_x86.h
index 3dfeecb5b7..a9050e6df1 100644
--- a/compiler/utils/x86/assembler_x86.h
+++ b/compiler/utils/x86/assembler_x86.h
@@ -695,6 +695,10 @@ class X86Assembler final : public Assembler {
void fptan();
void fprem();
+ void xchgb(ByteRegister reg, const Address& address);
+ void xchgb(Register reg, const Address& address);
+ void xchgw(Register reg, const Address& address);
+
void xchgl(Register dst, Register src);
void xchgl(Register reg, const Address& address);