Index: runtime/vm/intermediate_language_arm64.cc |
=================================================================== |
--- runtime/vm/intermediate_language_arm64.cc (revision 38317) |
+++ runtime/vm/intermediate_language_arm64.cc (working copy) |
@@ -907,7 +907,13 @@ |
void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const Register object = locs()->in(0).reg(); |
const Register result = locs()->out(0).reg(); |
- __ LoadTaggedClassIdMayBeSmi(result, object); |
+ static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos; |
+ |
+ __ LoadImmediate(TMP, reinterpret_cast<int64_t>(&kSmiCidSource) + 1, PP); |
+ __ tsti(object, kSmiTagMask); |
+ __ csel(TMP, TMP, object, EQ); |
+ __ LoadClassId(result, TMP, PP); |
+ __ SmiTag(result); |
} |