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

Unified Diff: runtime/vm/assembler_ia32.cc

Issue 552303005: Fix StoreIndexedInstr input representation requirements for Int32/Uint32 arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix typo Created 6 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
Index: runtime/vm/assembler_ia32.cc
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
index d9c372a447fbe5cd4b2420e6987af3c4b1528554..5b8b619cf4392252bb55ba7ede69285d709c49e4 100644
--- a/runtime/vm/assembler_ia32.cc
+++ b/runtime/vm/assembler_ia32.cc
@@ -2761,6 +2761,26 @@ void Assembler::CompareClassId(Register object,
}
+void Assembler::SmiUntagOrCheckClass(Register object,
+ intptr_t class_id,
+ Register scratch,
+ Label* is_smi) {
+ ASSERT(kSmiTagShift == 1);
+ ASSERT(RawObject::kClassIdTagPos == 16);
+ ASSERT(RawObject::kClassIdTagSize == 16);
+ const intptr_t class_id_offset = Object::tags_offset() +
+ RawObject::kClassIdTagPos / kBitsPerByte;
+
+ // Untag optimistically. Tag bit is shifted into the CARRY.
+ SmiUntag(object);
+ j(NOT_CARRY, is_smi, kNearJump);
+ // Load cid: can't use LoadClassId, object is untagged. Use TIMES_2 scale
+ // factor in the addressing mode to compensate for this.
+ movzxw(scratch, Address(object, TIMES_2, class_id_offset));
+ cmpl(scratch, Immediate(class_id));
+}
+
+
void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) {
ASSERT(result != object);
static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos;

Powered by Google App Engine
This is Rietveld 408576698