diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-02-04 09:45:14 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-02-04 09:45:14 +0000 |
commit | f4b24f7ea507ff41db39154a1e6a681a582e224a (patch) | |
tree | ed70e8d35e91dd93d9dd5130ab88d6453dd4b6f3 /compiler/dex | |
parent | 6bc17805d2df2678de186e3b4c3e2f959a48555f (diff) | |
parent | 3e6a3bf797e49b7f449256455c7e522e888687d8 (diff) | |
download | art-f4b24f7ea507ff41db39154a1e6a681a582e224a.zip art-f4b24f7ea507ff41db39154a1e6a681a582e224a.tar.gz art-f4b24f7ea507ff41db39154a1e6a681a582e224a.tar.bz2 |
Merge "ART: Change x86 long param ABI (Quick/JNI/Opt)"
Diffstat (limited to 'compiler/dex')
-rwxr-xr-x | compiler/dex/quick/x86/target_x86.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/compiler/dex/quick/x86/target_x86.cc b/compiler/dex/quick/x86/target_x86.cc index 43ebf55..c4adb09 100755 --- a/compiler/dex/quick/x86/target_x86.cc +++ b/compiler/dex/quick/x86/target_x86.cc @@ -2469,11 +2469,17 @@ RegStorage X86Mir2Lir::InToRegStorageX86Mapper::GetNextReg(ShortyArg arg) { return m2l_->TargetReg(fpArgMappingToPhysicalReg[cur_fp_reg_++], arg.IsWide() ? kWide : kNotWide); } - } else { - if (cur_core_reg_ < coreArgMappingToPhysicalRegSize) { - result = m2l_->TargetReg(coreArgMappingToPhysicalReg[cur_core_reg_++], - arg.IsRef() ? kRef : kNotWide); - if (arg.IsWide() && cur_core_reg_ < coreArgMappingToPhysicalRegSize) { + } else if (cur_core_reg_ < coreArgMappingToPhysicalRegSize) { + result = m2l_->TargetReg(coreArgMappingToPhysicalReg[cur_core_reg_++], + arg.IsRef() ? kRef : kNotWide); + if (arg.IsWide()) { + // This must be a long, as double is handled above. + // Ensure that we don't split a long across the last register and the stack. + if (cur_core_reg_ == coreArgMappingToPhysicalRegSize) { + // Leave the last core register unused and force the whole long to the stack. + cur_core_reg_++; + result = RegStorage::InvalidReg(); + } else if (cur_core_reg_ < coreArgMappingToPhysicalRegSize) { result = RegStorage::MakeRegPair( result, m2l_->TargetReg(coreArgMappingToPhysicalReg[cur_core_reg_++], kNotWide)); } |