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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips.cc
diff --git a/runtime/vm/assembler_mips.cc b/runtime/vm/assembler_mips.cc
index c08d4fa1886124e1846e13d15122a2f6d3bfa244..4bdc206dc85f2abae0e4309b0a3a56bb0bf98ecf 100644
--- a/runtime/vm/assembler_mips.cc
+++ b/runtime/vm/assembler_mips.cc
@@ -749,15 +749,14 @@ void Assembler::LoadClass(Register result, Register object) {
void Assembler::LoadClassIdMayBeSmi(Register result, Register object) {
- static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos;
-
- LoadImmediate(TMP, reinterpret_cast<int32_t>(&kSmiCidSource) + 1);
+ Label heap_object, done;
andi(CMPRES1, object, Immediate(kSmiTagMask));
- if (result != object) {
- mov(result, object);
- }
- movz(result, TMP, CMPRES1);
- LoadClassId(result, result);
+ bne(CMPRES1, ZR, &heap_object);
+ LoadImmediate(result, kSmiCid);
+ b(&done);
+ Bind(&heap_object);
+ LoadClassId(result, object);
+ Bind(&done);
}
« 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