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

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

Issue 783103003: Clobber non-live temporaries on some paths involving a possible slow-path allocation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: unnedded temp saves 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 default: 1955 default:
1956 UNREACHABLE(); 1956 UNREACHABLE();
1957 break; 1957 break;
1958 } 1958 }
1959 if (can_pack_into_smi()) { 1959 if (can_pack_into_smi()) {
1960 __ SmiTag(result); 1960 __ SmiTag(result);
1961 } else { 1961 } else {
1962 // If the value cannot fit in a smi then allocate a mint box for it. 1962 // If the value cannot fit in a smi then allocate a mint box for it.
1963 Register value = locs()->temp(0).reg(); 1963 Register value = locs()->temp(0).reg();
1964 Register temp = locs()->temp(1).reg(); 1964 Register temp = locs()->temp(1).reg();
1965 // Value register needs to be manually preserved on allocation slow-path.
1966 locs()->live_registers()->Add(locs()->temp(0), kUnboxedInt32);
1967
1965 ASSERT(result != value); 1968 ASSERT(result != value);
1966 __ MoveRegister(value, result); 1969 __ MoveRegister(value, result);
1967 __ SmiTag(result); 1970 __ SmiTag(result);
1968 1971
1969 Label done; 1972 Label done;
1970 __ TestImmediate(value, 0xC0000000); 1973 __ TestImmediate(value, 0xC0000000);
1971 __ b(&done, EQ); 1974 __ b(&done, EQ);
1972 BoxAllocationSlowPath::Allocate( 1975 BoxAllocationSlowPath::Allocate(
1973 compiler, this, compiler->mint_class(), result, temp); 1976 compiler, this, compiler->mint_class(), result, temp);
1974 __ eor(temp, temp, Operand(temp)); 1977 __ eor(temp, temp, Operand(temp));
(...skipping 4936 matching lines...) Expand 10 before | Expand all | Expand 10 after
6911 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 6914 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
6912 #if defined(DEBUG) 6915 #if defined(DEBUG)
6913 __ LoadImmediate(R4, kInvalidObjectPointer); 6916 __ LoadImmediate(R4, kInvalidObjectPointer);
6914 __ LoadImmediate(R5, kInvalidObjectPointer); 6917 __ LoadImmediate(R5, kInvalidObjectPointer);
6915 #endif 6918 #endif
6916 } 6919 }
6917 6920
6918 } // namespace dart 6921 } // namespace dart
6919 6922
6920 #endif // defined TARGET_ARCH_ARM 6923 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698