diff options
| author | 2014-06-25 05:27:36 +0000 | |
|---|---|---|
| committer | 2014-06-25 03:33:03 +0000 | |
| commit | b9d11f7e2f60bdebfd2ece34e01ecc789921837d (patch) | |
| tree | 074b21eae1eb1b11682a4416a51b93e3ee1f9a12 /compiler | |
| parent | c6f0f60bf3d4e3402c6e30bb4a4b88b345530954 (diff) | |
| parent | b6564c19c5e14a3caa3f8da423b0da510fda7026 (diff) | |
Merge "x86_64: Fix wide argument increment"
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/dex/quick/x86/target_x86.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/dex/quick/x86/target_x86.cc b/compiler/dex/quick/x86/target_x86.cc index e369d26df3..408a40a3fb 100644 --- a/compiler/dex/quick/x86/target_x86.cc +++ b/compiler/dex/quick/x86/target_x86.cc @@ -2150,7 +2150,8 @@ int X86Mir2Lir::GenDalvikArgsRange(CallInfo* info, int call_state, if (in_to_reg_storage_mapping.IsThereStackMapped()) { RegStorage regSingle = TargetReg(kArg2); RegStorage regWide = RegStorage::Solo64(TargetReg(kArg3).GetReg()); - for (int i = start_index; i <= last_mapped_in + regs_left_to_pass_via_stack; i++) { + for (int i = start_index; + i < last_mapped_in + size_of_the_last_mapped + regs_left_to_pass_via_stack; i++) { RegLocation rl_arg = info->args[i]; rl_arg = UpdateRawLoc(rl_arg); RegStorage reg = in_to_reg_storage_mapping.Get(i); @@ -2166,7 +2167,6 @@ int X86Mir2Lir::GenDalvikArgsRange(CallInfo* info, int call_state, LoadValueDirectWideFixed(rl_arg, regWide); StoreBaseDisp(TargetReg(kSp), out_offset, regWide, k64, kNotVolatile); } - i++; } else { if (rl_arg.location == kLocPhysReg) { StoreBaseDisp(TargetReg(kSp), out_offset, rl_arg.reg, k32, kNotVolatile); @@ -2179,6 +2179,9 @@ int X86Mir2Lir::GenDalvikArgsRange(CallInfo* info, int call_state, call_state = next_call_insn(cu_, info, call_state, target_method, vtable_idx, direct_code, direct_method, type); } + if (rl_arg.wide) { + i++; + } } } @@ -2190,13 +2193,15 @@ int X86Mir2Lir::GenDalvikArgsRange(CallInfo* info, int call_state, if (reg.Valid()) { if (rl_arg.wide) { LoadValueDirectWideFixed(rl_arg, reg); - i++; } else { LoadValueDirectFixed(rl_arg, reg); } call_state = next_call_insn(cu_, info, call_state, target_method, vtable_idx, direct_code, direct_method, type); } + if (rl_arg.wide) { + i++; + } } call_state = next_call_insn(cu_, info, call_state, target_method, vtable_idx, |