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

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

Issue 14854010: On MIPS, keeps Object::null() in a register. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/object_mips_test.cc ('k') | runtime/vm/stub_code_mips.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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 // R1: instantiator type arguments or NULL. 1588 // R1: instantiator type arguments or NULL.
1589 // R2: cache array. 1589 // R2: cache array.
1590 // Result in R1: null -> not found, otherwise result (true or false). 1590 // Result in R1: null -> not found, otherwise result (true or false).
1591 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { 1591 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) {
1592 ASSERT((1 <= n) && (n <= 3)); 1592 ASSERT((1 <= n) && (n <= 3));
1593 if (n > 1) { 1593 if (n > 1) {
1594 // Get instance type arguments. 1594 // Get instance type arguments.
1595 __ LoadClass(R3, R0, R4); 1595 __ LoadClass(R3, R0, R4);
1596 // Compute instance type arguments into R4. 1596 // Compute instance type arguments into R4.
1597 Label has_no_type_arguments; 1597 Label has_no_type_arguments;
1598 __ LoadImmediate(R4, reinterpret_cast<intptr_t>(Object::null()));
1599 __ ldr(R5, FieldAddress(R3, 1598 __ ldr(R5, FieldAddress(R3,
1600 Class::type_arguments_field_offset_in_words_offset())); 1599 Class::type_arguments_field_offset_in_words_offset()));
1601 __ CompareImmediate(R5, Class::kNoTypeArguments); 1600 __ CompareImmediate(R5, Class::kNoTypeArguments);
1602 __ b(&has_no_type_arguments, EQ); 1601 __ b(&has_no_type_arguments, EQ);
1603 __ add(R5, R0, ShifterOperand(R5, LSL, 2)); 1602 __ add(R5, R0, ShifterOperand(R5, LSL, 2));
1604 __ ldr(R4, FieldAddress(R5, 0)); 1603 __ ldr(R4, FieldAddress(R5, 0));
1605 __ Bind(&has_no_type_arguments); 1604 __ Bind(&has_no_type_arguments);
1606 } 1605 }
1607 __ LoadClassId(R3, R0); 1606 __ LoadClassId(R3, R0);
1608 // R0: instance. 1607 // R0: instance.
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 __ Bind(&reference_compare); 1902 __ Bind(&reference_compare);
1904 __ cmp(left, ShifterOperand(right)); 1903 __ cmp(left, ShifterOperand(right));
1905 __ Bind(&done); 1904 __ Bind(&done);
1906 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); 1905 __ PopList((1 << R0) | (1 << R1) | (1 << R2));
1907 __ Ret(); 1906 __ Ret();
1908 } 1907 }
1909 1908
1910 } // namespace dart 1909 } // namespace dart
1911 1910
1912 #endif // defined TARGET_ARCH_ARM 1911 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/object_mips_test.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698