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

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

Issue 106623006: Fix bug in double unboxing. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed mips code Created 7 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/intermediate_language_mips.cc ('k') | runtime/vm/object.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) 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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); 1578 FpuRegister fpu_temp = locs()->temp(2).fpu_reg();
1579 1579
1580 Label store_pointer, copy_payload; 1580 Label store_pointer, copy_payload;
1581 __ LoadObject(temp, Field::ZoneHandle(field().raw()), PP); 1581 __ LoadObject(temp, Field::ZoneHandle(field().raw()), PP);
1582 __ cmpq(FieldAddress(temp, Field::guarded_cid_offset()), 1582 __ cmpq(FieldAddress(temp, Field::guarded_cid_offset()),
1583 Immediate(kDoubleCid)); 1583 Immediate(kDoubleCid));
1584 __ j(NOT_EQUAL, &store_pointer); 1584 __ j(NOT_EQUAL, &store_pointer);
1585 __ cmpq(FieldAddress(temp, Field::is_nullable_offset()), 1585 __ cmpq(FieldAddress(temp, Field::is_nullable_offset()),
1586 Immediate(kNullCid)); 1586 Immediate(kNullCid));
1587 __ j(EQUAL, &store_pointer); 1587 __ j(EQUAL, &store_pointer);
1588 __ movzxb(temp2, FieldAddress(temp, Field::kind_bits_offset()));
1589 __ testq(temp2, Immediate(1 << Field::kUnboxingCandidateBit));
1590 __ j(ZERO, &store_pointer);
1588 1591
1589 __ movq(temp, FieldAddress(instance_reg, field().Offset())); 1592 __ movq(temp, FieldAddress(instance_reg, field().Offset()));
1590 __ CompareObject(temp, Object::null_object(), PP); 1593 __ CompareObject(temp, Object::null_object(), PP);
1591 __ j(NOT_EQUAL, &copy_payload); 1594 __ j(NOT_EQUAL, &copy_payload);
1592 1595
1593 StoreInstanceFieldSlowPath* slow_path = 1596 StoreInstanceFieldSlowPath* slow_path =
1594 new StoreInstanceFieldSlowPath(this); 1597 new StoreInstanceFieldSlowPath(this);
1595 compiler->AddSlowPathCode(slow_path); 1598 compiler->AddSlowPathCode(slow_path);
1596 1599
1597 if (!compiler->is_optimizing()) { 1600 if (!compiler->is_optimizing()) {
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after
4936 PcDescriptors::kOther, 4939 PcDescriptors::kOther,
4937 locs()); 4940 locs());
4938 __ Drop(2); // Discard type arguments and receiver. 4941 __ Drop(2); // Discard type arguments and receiver.
4939 } 4942 }
4940 4943
4941 } // namespace dart 4944 } // namespace dart
4942 4945
4943 #undef __ 4946 #undef __
4944 4947
4945 #endif // defined TARGET_ARCH_X64 4948 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698