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

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 12995022: Update stack map computation to match the way XMM registers are spilled on the slow path. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 if (!locs->always_calls()) { 408 if (!locs->always_calls()) {
409 RegisterSet* regs = locs->live_registers(); 409 RegisterSet* regs = locs->live_registers();
410 if (regs->fpu_regs_count() > 0) { 410 if (regs->fpu_regs_count() > 0) {
411 // Denote FPU registers with 0 bits in the stackmap. Based on the 411 // Denote FPU registers with 0 bits in the stackmap. Based on the
412 // assumption that there are normally few live FPU registers, this 412 // assumption that there are normally few live FPU registers, this
413 // encoding is simpler and roughly as compact as storing a separate 413 // encoding is simpler and roughly as compact as storing a separate
414 // count of FPU registers. 414 // count of FPU registers.
415 // 415 //
416 // FPU registers have the highest register number at the highest 416 // FPU registers have the highest register number at the highest
417 // address (i.e., first in the stackmap). 417 // address (i.e., first in the stackmap).
418 const intptr_t kFpuRegisterSpillFactor = kFpuRegisterSize / kWordSize;
418 for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) { 419 for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) {
419 FpuRegister reg = static_cast<FpuRegister>(i); 420 FpuRegister reg = static_cast<FpuRegister>(i);
420 if (regs->ContainsFpuRegister(reg)) { 421 if (regs->ContainsFpuRegister(reg)) {
421 for (intptr_t j = 0; 422 for (intptr_t j = 0; j < kFpuRegisterSpillFactor; ++j) {
422 j < FlowGraphAllocator::kDoubleSpillSlotFactor;
423 ++j) {
424 bitmap->Set(bitmap->Length(), false); 423 bitmap->Set(bitmap->Length(), false);
425 } 424 }
426 } 425 }
427 } 426 }
428 } 427 }
429 // General purpose registers have the lowest register number at the 428 // General purpose registers have the lowest register number at the
430 // highest address (i.e., first in the stackmap). 429 // highest address (i.e., first in the stackmap).
431 for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) { 430 for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) {
432 Register reg = static_cast<Register>(i); 431 Register reg = static_cast<Register>(i);
433 if (locs->live_registers()->ContainsRegister(reg)) { 432 if (locs->live_registers()->ContainsRegister(reg)) {
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 if (i != largest_ix) { 1080 if (i != largest_ix) {
1082 // Swap. 1081 // Swap.
1083 CidTarget temp = (*sorted)[i]; 1082 CidTarget temp = (*sorted)[i];
1084 (*sorted)[i] = (*sorted)[largest_ix]; 1083 (*sorted)[i] = (*sorted)[largest_ix];
1085 (*sorted)[largest_ix] = temp; 1084 (*sorted)[largest_ix] = temp;
1086 } 1085 }
1087 } 1086 }
1088 } 1087 }
1089 1088
1090 } // namespace dart 1089 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698