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

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

Issue 314783003: Eliminates some branches from arm code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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/assembler_arm.h ('k') | runtime/vm/flow_graph_compiler_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/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 const Address& dest, 1639 const Address& dest,
1640 const Object& value) { 1640 const Object& value) {
1641 ASSERT(value.IsSmi() || value.InVMHeap() || 1641 ASSERT(value.IsSmi() || value.InVMHeap() ||
1642 (value.IsOld() && value.IsNotTemporaryScopedHandle())); 1642 (value.IsOld() && value.IsNotTemporaryScopedHandle()));
1643 // No store buffer update. 1643 // No store buffer update.
1644 LoadObject(IP, value); 1644 LoadObject(IP, value);
1645 str(IP, dest); 1645 str(IP, dest);
1646 } 1646 }
1647 1647
1648 1648
1649 void Assembler::LoadClassId(Register result, Register object) { 1649 void Assembler::LoadClassId(Register result, Register object, Condition cond) {
1650 ASSERT(RawObject::kClassIdTagPos == 16); 1650 ASSERT(RawObject::kClassIdTagPos == 16);
1651 ASSERT(RawObject::kClassIdTagSize == 16); 1651 ASSERT(RawObject::kClassIdTagSize == 16);
1652 const intptr_t class_id_offset = Object::tags_offset() + 1652 const intptr_t class_id_offset = Object::tags_offset() +
1653 RawObject::kClassIdTagPos / kBitsPerByte; 1653 RawObject::kClassIdTagPos / kBitsPerByte;
1654 ldrh(result, FieldAddress(object, class_id_offset)); 1654 ldrh(result, FieldAddress(object, class_id_offset), cond);
1655 } 1655 }
1656 1656
1657 1657
1658 void Assembler::LoadClassById(Register result, Register class_id) { 1658 void Assembler::LoadClassById(Register result, Register class_id) {
1659 ASSERT(result != class_id); 1659 ASSERT(result != class_id);
1660 ldr(result, FieldAddress(CTX, Context::isolate_offset())); 1660 ldr(result, FieldAddress(CTX, Context::isolate_offset()));
1661 const intptr_t table_offset_in_isolate = 1661 const intptr_t table_offset_in_isolate =
1662 Isolate::class_table_offset() + ClassTable::table_offset(); 1662 Isolate::class_table_offset() + ClassTable::table_offset();
1663 LoadFromOffset(kWord, result, result, table_offset_in_isolate); 1663 LoadFromOffset(kWord, result, result, table_offset_in_isolate);
1664 ldr(result, Address(result, class_id, LSL, 2)); 1664 ldr(result, Address(result, class_id, LSL, 2));
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
3191 3191
3192 3192
3193 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3193 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3194 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3194 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3195 return fpu_reg_names[reg]; 3195 return fpu_reg_names[reg];
3196 } 3196 }
3197 3197
3198 } // namespace dart 3198 } // namespace dart
3199 3199
3200 #endif // defined TARGET_ARCH_ARM 3200 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698