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

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

Issue 727623002: Support verified heap pointer writes on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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/intrinsifier_x64.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_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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 // RCX: new object end address. 1992 // RCX: new object end address.
1993 // RDI: iterator which initially points to the start of the variable 1993 // RDI: iterator which initially points to the start of the variable
1994 // data area to be initialized. 1994 // data area to be initialized.
1995 if (num_elements > 0) { 1995 if (num_elements > 0) {
1996 const intptr_t array_size = instance_size - sizeof(RawArray); 1996 const intptr_t array_size = instance_size - sizeof(RawArray);
1997 __ LoadObject(R12, Object::null_object(), PP); 1997 __ LoadObject(R12, Object::null_object(), PP);
1998 __ leaq(RDI, FieldAddress(RAX, sizeof(RawArray))); 1998 __ leaq(RDI, FieldAddress(RAX, sizeof(RawArray)));
1999 if (array_size < (kInlineArraySize * kWordSize)) { 1999 if (array_size < (kInlineArraySize * kWordSize)) {
2000 intptr_t current_offset = 0; 2000 intptr_t current_offset = 0;
2001 while (current_offset < array_size) { 2001 while (current_offset < array_size) {
2002 __ movq(Address(RDI, current_offset), R12); 2002 __ StoreIntoObjectNoBarrier(RAX, Address(RDI, current_offset), R12);
2003 current_offset += kWordSize; 2003 current_offset += kWordSize;
2004 } 2004 }
2005 } else { 2005 } else {
2006 Label init_loop; 2006 Label init_loop;
2007 __ Bind(&init_loop); 2007 __ Bind(&init_loop);
2008 __ movq(Address(RDI, 0), R12); 2008 __ StoreIntoObjectNoBarrier(RAX, Address(RDI, 0), R12);
2009 __ addq(RDI, Immediate(kWordSize)); 2009 __ addq(RDI, Immediate(kWordSize));
2010 __ cmpq(RDI, RCX); 2010 __ cmpq(RDI, RCX);
2011 __ j(BELOW, &init_loop, Assembler::kNearJump); 2011 __ j(BELOW, &init_loop, Assembler::kNearJump);
2012 } 2012 }
2013 } 2013 }
2014 __ jmp(done, Assembler::kNearJump); 2014 __ jmp(done, Assembler::kNearJump);
2015 } 2015 }
2016 2016
2017 2017
2018 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2018 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
(...skipping 4249 matching lines...) Expand 10 before | Expand all | Expand 10 after
6268 __ movq(R10, Immediate(kInvalidObjectPointer)); 6268 __ movq(R10, Immediate(kInvalidObjectPointer));
6269 __ movq(RBX, Immediate(kInvalidObjectPointer)); 6269 __ movq(RBX, Immediate(kInvalidObjectPointer));
6270 #endif 6270 #endif
6271 } 6271 }
6272 6272
6273 } // namespace dart 6273 } // namespace dart
6274 6274
6275 #undef __ 6275 #undef __
6276 6276
6277 #endif // defined TARGET_ARCH_X64 6277 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698