Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1678 | 1678 |
| 1679 | 1679 |
| 1680 void Assembler::CompareClassId(Register object, | 1680 void Assembler::CompareClassId(Register object, |
| 1681 intptr_t class_id, | 1681 intptr_t class_id, |
| 1682 Register scratch) { | 1682 Register scratch) { |
| 1683 LoadClassId(scratch, object); | 1683 LoadClassId(scratch, object); |
| 1684 CompareImmediate(scratch, class_id); | 1684 CompareImmediate(scratch, class_id); |
| 1685 } | 1685 } |
| 1686 | 1686 |
| 1687 | 1687 |
| 1688 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) { | |
|
zra
2014/06/04 18:55:00
tst(object, Operand(kSmiTagMask));
LoadImmediate(r
srdjan
2014/06/04 20:08:04
Done and added condition to LoadClassId
| |
| 1689 Label load, done; | |
| 1690 tst(object, Operand(kSmiTagMask)); | |
| 1691 b(&load, NE); | |
| 1692 LoadImmediate(result, Smi::RawValue(kSmiCid)); | |
| 1693 b(&done); | |
| 1694 Bind(&load); | |
| 1695 LoadClassId(result, object); | |
| 1696 SmiTag(result); | |
| 1697 Bind(&done); | |
| 1698 } | |
| 1699 | |
| 1700 | |
| 1688 static bool CanEncodeBranchOffset(int32_t offset) { | 1701 static bool CanEncodeBranchOffset(int32_t offset) { |
| 1689 ASSERT(Utils::IsAligned(offset, 4)); | 1702 ASSERT(Utils::IsAligned(offset, 4)); |
| 1690 return Utils::IsInt(Utils::CountOneBits(kBranchOffsetMask), offset); | 1703 return Utils::IsInt(Utils::CountOneBits(kBranchOffsetMask), offset); |
| 1691 } | 1704 } |
| 1692 | 1705 |
| 1693 | 1706 |
| 1694 int32_t Assembler::EncodeBranchOffset(int32_t offset, int32_t inst) { | 1707 int32_t Assembler::EncodeBranchOffset(int32_t offset, int32_t inst) { |
| 1695 // The offset is off by 8 due to the way the ARM CPUs read PC. | 1708 // The offset is off by 8 due to the way the ARM CPUs read PC. |
| 1696 offset -= Instr::kPCReadOffset; | 1709 offset -= Instr::kPCReadOffset; |
| 1697 | 1710 |
| (...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3191 | 3204 |
| 3192 | 3205 |
| 3193 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3206 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3194 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3207 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
| 3195 return fpu_reg_names[reg]; | 3208 return fpu_reg_names[reg]; |
| 3196 } | 3209 } |
| 3197 | 3210 |
| 3198 } // namespace dart | 3211 } // namespace dart |
| 3199 | 3212 |
| 3200 #endif // defined TARGET_ARCH_ARM | 3213 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |