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

Side by Side Diff: runtime/vm/assembler_mips.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 | « runtime/vm/assembler_arm.cc ('k') | no next file » | 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_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 742
743 void Assembler::LoadClass(Register result, Register object) { 743 void Assembler::LoadClass(Register result, Register object) {
744 ASSERT(!in_delay_slot_); 744 ASSERT(!in_delay_slot_);
745 ASSERT(TMP != result); 745 ASSERT(TMP != result);
746 LoadClassId(TMP, object); 746 LoadClassId(TMP, object);
747 LoadClassById(result, TMP); 747 LoadClassById(result, TMP);
748 } 748 }
749 749
750 750
751 void Assembler::LoadClassIdMayBeSmi(Register result, Register object) { 751 void Assembler::LoadClassIdMayBeSmi(Register result, Register object) {
752 static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos; 752 Label heap_object, done;
753
754 LoadImmediate(TMP, reinterpret_cast<int32_t>(&kSmiCidSource) + 1);
755 andi(CMPRES1, object, Immediate(kSmiTagMask)); 753 andi(CMPRES1, object, Immediate(kSmiTagMask));
756 if (result != object) { 754 bne(CMPRES1, ZR, &heap_object);
757 mov(result, object); 755 LoadImmediate(result, kSmiCid);
758 } 756 b(&done);
759 movz(result, TMP, CMPRES1); 757 Bind(&heap_object);
760 LoadClassId(result, result); 758 LoadClassId(result, object);
759 Bind(&done);
761 } 760 }
762 761
763 762
764 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) { 763 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) {
765 LoadClassIdMayBeSmi(result, object); 764 LoadClassIdMayBeSmi(result, object);
766 SmiTag(result); 765 SmiTag(result);
767 } 766 }
768 767
769 768
770 void Assembler::ComputeRange(Register result, 769 void Assembler::ComputeRange(Register result,
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 Label stop; 1334 Label stop;
1336 b(&stop); 1335 b(&stop);
1337 Emit(reinterpret_cast<int32_t>(message)); 1336 Emit(reinterpret_cast<int32_t>(message));
1338 Bind(&stop); 1337 Bind(&stop);
1339 break_(Instr::kStopMessageCode); 1338 break_(Instr::kStopMessageCode);
1340 } 1339 }
1341 1340
1342 } // namespace dart 1341 } // namespace dart
1343 1342
1344 #endif // defined TARGET_ARCH_MIPS 1343 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698