Fix the fill-array-data bug in method compiler (LLVM).
64-bit components were mis-aligned.
Change-Id: I5c563104b5035882137d6b1c47683f79d123f01e
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc
index 7c19774..f4bc3c2 100644
--- a/src/compiler_llvm/method_compiler.cc
+++ b/src/compiler_llvm/method_compiler.cc
@@ -1883,12 +1883,9 @@
EmitGuard_ArrayIndexOutOfBoundsException(dex_pc, array_addr, last_index);
- // TODO: currently FillArray doesn't support I, J, D and L, [ so computing the component
- // size using int alignment is safe. This code should determine the width of the FillArray
- // component.
// Get array data field
llvm::Value* data_field_offset_value =
- irb_.getPtrEquivInt(Array::DataOffset(sizeof(int32_t)).Int32Value());
+ irb_.getPtrEquivInt(Array::DataOffset(payload->elem_width_).Int32Value());
llvm::Value* data_field_addr =
irb_.CreatePtrDisp(array_addr, data_field_offset_value,