diff options
| author | 2012-04-06 22:16:31 -0700 | |
|---|---|---|
| committer | 2012-04-07 10:35:49 -0700 | |
| commit | b77799df950bf486abe3780185bc4932a3b47bad (patch) | |
| tree | 6a792c5627e1cb69498f88d9d2a1a616571e4a15 /src/compiler_llvm | |
| parent | 14924fed933f533a427ea36751c497eb21646beb (diff) | |
Fix the fill-array-data bug in method compiler (LLVM).
64-bit components were mis-aligned.
Change-Id: I5c563104b5035882137d6b1c47683f79d123f01e
Diffstat (limited to 'src/compiler_llvm')
| -rw-r--r-- | src/compiler_llvm/method_compiler.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc index 7c19774538..f4bc3c208a 100644 --- a/src/compiler_llvm/method_compiler.cc +++ b/src/compiler_llvm/method_compiler.cc @@ -1883,12 +1883,9 @@ void MethodCompiler::EmitInsn_FillArrayData(uint32_t dex_pc, 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, |