summaryrefslogtreecommitdiff
path: root/compiler/optimizing/intrinsics_x86_64.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-07-05 15:13:28 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2024-07-08 08:18:31 +0000
commit342fef74762b2e827a638286d4b81a821b4c2b07 (patch)
tree79ff611f62796c47c98a4bc65bbb3a0498b52628 /compiler/optimizing/intrinsics_x86_64.cc
parentd685b0e5d8f3b38b3e492ffc1989e188885edda0 (diff)
Fix code generation of Unsafe.putByte in x86 and x64.
We were not using the right instruction. Test: serial benchmark Bug: 339571886 Change-Id: Ice38a8c34acdb65908e3c41cebb3aad26a774beb
Diffstat (limited to 'compiler/optimizing/intrinsics_x86_64.cc')
-rw-r--r--compiler/optimizing/intrinsics_x86_64.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/optimizing/intrinsics_x86_64.cc b/compiler/optimizing/intrinsics_x86_64.cc
index 131460d605..0a60e9c642 100644
--- a/compiler/optimizing/intrinsics_x86_64.cc
+++ b/compiler/optimizing/intrinsics_x86_64.cc
@@ -2080,8 +2080,11 @@ static void GenUnsafePut(LocationSummary* locations, DataType::Type type, bool i
__ movl(temp, value);
__ PoisonHeapReference(temp);
__ movl(Address(base, offset, ScaleFactor::TIMES_1, 0), temp);
- } else {
+ } else if (type == DataType::Type::kInt32 || type == DataType::Type::kReference) {
__ movl(Address(base, offset, ScaleFactor::TIMES_1, 0), value);
+ } else {
+ CHECK_EQ(type, DataType::Type::kInt8) << "Unimplemented GenUnsafePut data type";
+ __ movb(Address(base, offset, ScaleFactor::TIMES_1, 0), value);
}
if (is_volatile) {