mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Do not clobber dead temp registers at RestoreLiveRegisters as it may destroy the content of the result register as well. Fixes issue 21957.
Review URL: https://codereview.chromium.org//818343002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42566 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
e86aeecc72
commit
49343faead
6 changed files with 17 additions and 17 deletions
|
@ -1494,10 +1494,6 @@ void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
|
|||
|
||||
|
||||
void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
|
||||
#if defined(DEBUG)
|
||||
ClobberDeadTempRegisters(locs);
|
||||
#endif
|
||||
|
||||
// General purpose registers have the highest register number at the
|
||||
// lowest address.
|
||||
for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) {
|
||||
|
|
|
@ -1461,9 +1461,6 @@ void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
|
|||
|
||||
|
||||
void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
|
||||
#if defined(DEBUG)
|
||||
ClobberDeadTempRegisters(locs);
|
||||
#endif
|
||||
// General purpose registers have the highest register number at the
|
||||
// lowest address.
|
||||
for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) {
|
||||
|
|
|
@ -1486,10 +1486,6 @@ void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
|
|||
|
||||
|
||||
void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
|
||||
#if defined(DEBUG)
|
||||
ClobberDeadTempRegisters(locs);
|
||||
#endif
|
||||
|
||||
// General purpose registers have the highest register number at the
|
||||
// lowest address.
|
||||
for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) {
|
||||
|
|
|
@ -1520,9 +1520,6 @@ void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
|
|||
|
||||
|
||||
void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
|
||||
#if defined(DEBUG)
|
||||
ClobberDeadTempRegisters(locs);
|
||||
#endif
|
||||
// General purpose registers have the highest register number at the
|
||||
// lowest address.
|
||||
__ TraceSimMsg("RestoreLiveRegisters");
|
||||
|
|
|
@ -1505,9 +1505,6 @@ void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
|
|||
|
||||
|
||||
void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
|
||||
#if defined(DEBUG)
|
||||
ClobberDeadTempRegisters(locs);
|
||||
#endif
|
||||
__ PopRegisters(locs->live_registers()->cpu_registers(),
|
||||
locs->live_registers()->fpu_registers());
|
||||
}
|
||||
|
|
17
tests/language/issue21957_test.dart
Normal file
17
tests/language/issue21957_test.dart
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// Check slow path for PotentialUnboxedStore.
|
||||
// VMOptions=--optimization_counter_threshold=-1
|
||||
|
||||
main() {
|
||||
for (int i = 0; i < 1000000; i++) {
|
||||
new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
var a = 1.0;
|
||||
}
|
||||
|
Loading…
Reference in a new issue