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

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

Issue 10536096: Add code comment to ia32 disassembly as well, bug fix new ia32 compiler, remove use of TMP register… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/flow_graph_optimizer.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 if (local_count > 0) { 921 if (local_count > 0) {
922 __ movq(RAX, Immediate(reinterpret_cast<intptr_t>(Object::null()))); 922 __ movq(RAX, Immediate(reinterpret_cast<intptr_t>(Object::null())));
923 const int base = parsed_function().first_stack_local_index(); 923 const int base = parsed_function().first_stack_local_index();
924 for (int i = 0; i < local_count; ++i) { 924 for (int i = 0; i < local_count; ++i) {
925 // Subtract index i (locals lie at lower addresses than RBP). 925 // Subtract index i (locals lie at lower addresses than RBP).
926 __ movq(Address(RBP, (base - i) * kWordSize), RAX); 926 __ movq(Address(RBP, (base - i) * kWordSize), RAX);
927 } 927 }
928 } 928 }
929 929
930 // Generate stack overflow check. 930 // Generate stack overflow check.
931 __ movq(TMP, Immediate(Isolate::Current()->stack_limit_address())); 931 __ movq(RDI, Immediate(Isolate::Current()->stack_limit_address()));
932 __ cmpq(RSP, Address(TMP, 0)); 932 __ cmpq(RSP, Address(RDI, 0));
933 Label no_stack_overflow; 933 Label no_stack_overflow;
934 __ j(ABOVE, &no_stack_overflow, Assembler::kNearJump); 934 __ j(ABOVE, &no_stack_overflow, Assembler::kNearJump);
935 GenerateCallRuntime(AstNode::kNoId, 935 GenerateCallRuntime(AstNode::kNoId,
936 function.token_index(), 936 function.token_index(),
937 CatchClauseNode::kInvalidTryIndex, 937 CatchClauseNode::kInvalidTryIndex,
938 kStackOverflowRuntimeEntry); 938 kStackOverflowRuntimeEntry);
939 __ Bind(&no_stack_overflow); 939 __ Bind(&no_stack_overflow);
940 940
941 if (FLAG_print_scopes) { 941 if (FLAG_print_scopes) {
942 // Print the function scope (again) after generating the prologue in order 942 // Print the function scope (again) after generating the prologue in order
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 __ cvtsi2sd(result, temp); 1029 __ cvtsi2sd(result, temp);
1030 __ Bind(&done); 1030 __ Bind(&done);
1031 } 1031 }
1032 1032
1033 1033
1034 #undef __ 1034 #undef __
1035 1035
1036 } // namespace dart 1036 } // namespace dart
1037 1037
1038 #endif // defined TARGET_ARCH_X64 1038 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698