diff options
author | 2024-10-04 20:01:54 +0100 | |
---|---|---|
committer | 2024-10-07 15:17:41 +0000 | |
commit | 2e78250a7500601b2feedaf40164b7bcf8abc18a (patch) | |
tree | d1a3b26b952262513df02e5d6329c97f71c8e1b0 /compiler/optimizing/intrinsics_x86.cc | |
parent | f758d6a7530324ca95a69d551ce48f9a0cc9014c (diff) |
Address comments from aosp/3282234
Follow up to aosp/3282234 regarding comments after submission.
Bug: 362916226
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: Id572dd42e5aa877f4ae4a20cd43ad7a778e92815
Diffstat (limited to 'compiler/optimizing/intrinsics_x86.cc')
-rw-r--r-- | compiler/optimizing/intrinsics_x86.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/compiler/optimizing/intrinsics_x86.cc b/compiler/optimizing/intrinsics_x86.cc index dc88de474c..c1ec8bda82 100644 --- a/compiler/optimizing/intrinsics_x86.cc +++ b/compiler/optimizing/intrinsics_x86.cc @@ -2517,8 +2517,10 @@ void CreateUnsafeGetAndUpdateLocations(ArenaAllocator* allocator, // to take advantage of XCHG or XADD. Arbitrarily pick EAX. locations->SetInAt(3, Location::RegisterLocation(EAX)); // Only set the `out` register if it's needed. In the void case we can still use EAX in the - // same manner as it is used an as `in` register. - if (!is_void) { + // same manner as it is marked as a temp register. + if (is_void) { + locations->AddTemp(Location::RegisterLocation(EAX)); + } else { locations->SetOut(Location::RegisterLocation(EAX)); } } @@ -4296,8 +4298,10 @@ static void CreateVarHandleGetAndSetLocations(HInvoke* invoke, CodeGeneratorX86* } else { locations->SetInAt(value_index, Location::RegisterLocation(EAX)); // Only set the `out` register if it's needed. In the void case we can still use EAX in the - // same manner as it is used an as `in` register. - if (!is_void) { + // same manner as it is marked as a temp register. + if (is_void) { + locations->AddTemp(Location::RegisterLocation(EAX)); + } else { locations->SetOut(Location::RegisterLocation(EAX)); } } @@ -4680,8 +4684,10 @@ static void CreateVarHandleGetAndAddLocations(HInvoke* invoke, CodeGeneratorX86* // xadd updates the register argument with the old value. ByteRegister required for xaddb. locations->SetInAt(value_index, Location::RegisterLocation(EAX)); // Only set the `out` register if it's needed. In the void case we can still use EAX in the - // same manner as it is used an as `in` register. - if (!is_void) { + // same manner as it is marked as a temp register. + if (is_void) { + locations->AddTemp(Location::RegisterLocation(EAX)); + } else { locations->SetOut(Location::RegisterLocation(EAX)); } } |