Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Unified Diff: runtime/vm/intermediate_language.cc

Issue 811823002: Support remaping of pair location inside materializations for slow paths. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 8a1d388ef4817d8932912e00743b11f7ad5b196e..9a0dd0aa2bbcc36cfb7016634a94bf798744159a 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -2704,42 +2704,16 @@ void MaterializeObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// This function should be kept in sync with
// FlowGraphCompiler::SlowPathEnvironmentFor().
-void MaterializeObjectInstr::RemapRegisters(intptr_t* fpu_reg_slots,
- intptr_t* cpu_reg_slots) {
+void MaterializeObjectInstr::RemapRegisters(intptr_t* cpu_reg_slots,
+ intptr_t* fpu_reg_slots) {
if (registers_remapped_) {
return;
}
registers_remapped_ = true;
for (intptr_t i = 0; i < InputCount(); i++) {
- Location loc = LocationAt(i);
- if (loc.IsRegister()) {
- intptr_t index = cpu_reg_slots[loc.reg()];
- ASSERT(index >= 0);
- locations_[i] = Location::StackSlot(index);
- } else if (loc.IsFpuRegister()) {
- intptr_t index = fpu_reg_slots[loc.fpu_reg()];
- ASSERT(index >= 0);
- Value* value = InputAt(i);
- switch (value->definition()->representation()) {
- case kUnboxedDouble:
- locations_[i] = Location::DoubleStackSlot(index);
- break;
- case kUnboxedFloat32x4:
- case kUnboxedInt32x4:
- case kUnboxedFloat64x2:
- locations_[i] = Location::QuadStackSlot(index);
- break;
- default:
- UNREACHABLE();
- }
- } else if (loc.IsPairLocation()) {
- UNREACHABLE();
- } else if (loc.IsInvalid() &&
- InputAt(i)->definition()->IsMaterializeObject()) {
- InputAt(i)->definition()->AsMaterializeObject()->RemapRegisters(
- fpu_reg_slots, cpu_reg_slots);
- }
+ locations_[i] = LocationAt(i).RemapForSlowPath(
+ InputAt(i)->definition(), cpu_reg_slots, fpu_reg_slots);
}
}

Powered by Google App Engine
This is Rietveld 408576698