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

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

Issue 23622037: Cleanup of some comparisons on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « no previous file | runtime/vm/intermediate_language_arm.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/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 } 85 }
86 } 86 }
87 fclose(f); 87 fclose(f);
88 88
89 // Did not find string in the proc file. 89 // Did not find string in the proc file.
90 return false; 90 return false;
91 } 91 }
92 #endif 92 #endif
93 93
94
94 void CPUFeatures::InitOnce() { 95 void CPUFeatures::InitOnce() {
95 #if defined(USING_SIMULATOR) 96 #if defined(USING_SIMULATOR)
96 integer_division_supported_ = true; 97 integer_division_supported_ = true;
97 neon_supported_ = true; 98 neon_supported_ = true;
98 #else 99 #else
99 ASSERT(CPUInfoContainsString("ARMv7")); // Implements ARMv7. 100 ASSERT(CPUInfoContainsString("ARMv7")); // Implements ARMv7.
100 ASSERT(CPUInfoContainsString("vfp")); // Has floating point unit. 101 ASSERT(CPUInfoContainsString("vfp")); // Has floating point unit.
101 // Has integer division. 102 // Has integer division.
102 integer_division_supported_ = CPUInfoContainsString("idiva"); 103 integer_division_supported_ = CPUInfoContainsString("idiva");
103 neon_supported_ = CPUInfoContainsString("neon"); 104 neon_supported_ = CPUInfoContainsString("neon");
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 1586
1586 1587
1587 void Assembler::PushObject(const Object& object) { 1588 void Assembler::PushObject(const Object& object) {
1588 LoadObject(IP, object); 1589 LoadObject(IP, object);
1589 Push(IP); 1590 Push(IP);
1590 } 1591 }
1591 1592
1592 1593
1593 void Assembler::CompareObject(Register rn, const Object& object) { 1594 void Assembler::CompareObject(Register rn, const Object& object) {
1594 ASSERT(rn != IP); 1595 ASSERT(rn != IP);
1595 LoadObject(IP, object); 1596 if (object.IsSmi()) {
1596 cmp(rn, ShifterOperand(IP)); 1597 CompareImmediate(rn, reinterpret_cast<int32_t>(object.raw()));
1598 } else {
1599 LoadObject(IP, object);
1600 cmp(rn, ShifterOperand(IP));
1601 }
1597 } 1602 }
1598 1603
1599 1604
1600 // Preserves object and value registers. 1605 // Preserves object and value registers.
1601 void Assembler::StoreIntoObjectFilterNoSmi(Register object, 1606 void Assembler::StoreIntoObjectFilterNoSmi(Register object,
1602 Register value, 1607 Register value,
1603 Label* no_update) { 1608 Label* no_update) {
1604 COMPILE_ASSERT((kNewObjectAlignmentOffset == kWordSize) && 1609 COMPILE_ASSERT((kNewObjectAlignmentOffset == kWordSize) &&
1605 (kOldObjectAlignmentOffset == 0), young_alignment); 1610 (kOldObjectAlignmentOffset == 0), young_alignment);
1606 1611
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 2735
2731 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2736 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2732 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 2737 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
2733 return fpu_reg_names[reg]; 2738 return fpu_reg_names[reg];
2734 } 2739 }
2735 2740
2736 } // namespace dart 2741 } // namespace dart
2737 2742
2738 #endif // defined TARGET_ARCH_ARM 2743 #endif // defined TARGET_ARCH_ARM
2739 2744
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698