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

Side by Side Diff: vm/assembler_macros_x64.cc

Issue 9017024: X64: check all cases with "__ movq(FieldAddress" and converted them to StoreIntoObject if appropr... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 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 | « no previous file | vm/code_generator_x64.cc » ('j') | vm/code_generator_x64.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler_macros.h" 8 #include "vm/assembler_macros.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 30 matching lines...) Expand all
41 // instance_reg: potential next object start. 41 // instance_reg: potential next object start.
42 __ movq(TMP, Immediate(heap->EndAddress())); 42 __ movq(TMP, Immediate(heap->EndAddress()));
43 __ cmpq(instance_reg, Address(TMP, 0)); 43 __ cmpq(instance_reg, Address(TMP, 0));
44 __ j(ABOVE_EQUAL, failure, Assembler::kNearJump); 44 __ j(ABOVE_EQUAL, failure, Assembler::kNearJump);
45 // Successfully allocated the object, now update top to point to 45 // Successfully allocated the object, now update top to point to
46 // next object start and store the class in the class field of object. 46 // next object start and store the class in the class field of object.
47 __ movq(TMP, Immediate(heap->TopAddress())); 47 __ movq(TMP, Immediate(heap->TopAddress()));
48 __ movq(Address(TMP, 0), instance_reg); 48 __ movq(Address(TMP, 0), instance_reg);
49 ASSERT(instance_size >= kHeapObjectTag); 49 ASSERT(instance_size >= kHeapObjectTag);
50 __ subq(instance_reg, Immediate(instance_size - kHeapObjectTag)); 50 __ subq(instance_reg, Immediate(instance_size - kHeapObjectTag));
51 __ movq(FieldAddress(instance_reg, Instance::class_offset()), class_reg); 51 __ StoreIntoObject(instance_reg,
52 FieldAddress(instance_reg, Instance::class_offset()),
53 class_reg);
52 } else { 54 } else {
53 __ jmp(failure); 55 __ jmp(failure);
54 } 56 }
55 } 57 }
56 58
57 #undef __ 59 #undef __
58 60
59 } // namespace dart 61 } // namespace dart
60 62
61 #endif // defined TARGET_ARCH_X64 63 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | vm/code_generator_x64.cc » ('j') | vm/code_generator_x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698