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

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

Issue 1338923002: ARM & MIPS: Don't embed an address in the general class id fetch. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | runtime/vm/assembler_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" // NOLINT 5 #include "vm/globals.h" // NOLINT
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 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 2002
2003 void Assembler::CompareClassId(Register object, 2003 void Assembler::CompareClassId(Register object,
2004 intptr_t class_id, 2004 intptr_t class_id,
2005 Register scratch) { 2005 Register scratch) {
2006 LoadClassId(scratch, object); 2006 LoadClassId(scratch, object);
2007 CompareImmediate(scratch, class_id); 2007 CompareImmediate(scratch, class_id);
2008 } 2008 }
2009 2009
2010 2010
2011 void Assembler::LoadClassIdMayBeSmi(Register result, Register object) { 2011 void Assembler::LoadClassIdMayBeSmi(Register result, Register object) {
2012 static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos;
2013
2014 LoadImmediate(TMP, reinterpret_cast<int32_t>(&kSmiCidSource) + 1);
2015 tst(object, Operand(kSmiTagMask)); 2012 tst(object, Operand(kSmiTagMask));
2016 mov(TMP, Operand(object), NE); 2013 LoadClassId(result, object, NE);
2017 LoadClassId(result, TMP); 2014 LoadImmediate(result, kSmiCid, EQ);
2018 } 2015 }
2019 2016
2020 2017
2021 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) { 2018 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) {
2022 LoadClassIdMayBeSmi(result, object); 2019 LoadClassIdMayBeSmi(result, object);
2023 SmiTag(result); 2020 SmiTag(result);
2024 } 2021 }
2025 2022
2026 2023
2027 void Assembler::ComputeRange(Register result, 2024 void Assembler::ComputeRange(Register result,
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
3666 3663
3667 3664
3668 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3665 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3669 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3666 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3670 return fpu_reg_names[reg]; 3667 return fpu_reg_names[reg];
3671 } 3668 }
3672 3669
3673 } // namespace dart 3670 } // namespace dart
3674 3671
3675 #endif // defined TARGET_ARCH_ARM 3672 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698