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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 1176703002: Make guard_cid and nullable_cid half words. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_mips.cc
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index b26ab1681f6d30f09b34da542efea8e938023aff..dc934ebe1e5b2f38a47fd1e10955e3ad99f869e4 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -1650,16 +1650,16 @@ void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
if (value_cid == kDynamicCid) {
LoadValueCid(compiler, value_cid_reg, value_reg);
- __ lw(CMPRES1, field_cid_operand);
+ __ lhu(CMPRES1, field_cid_operand);
__ beq(value_cid_reg, CMPRES1, &ok);
- __ lw(TMP, field_nullability_operand);
+ __ lhu(TMP, field_nullability_operand);
__ subu(CMPRES1, value_cid_reg, TMP);
} else if (value_cid == kNullCid) {
- __ lw(TMP, field_nullability_operand);
+ __ lhu(TMP, field_nullability_operand);
__ LoadImmediate(CMPRES1, value_cid);
__ subu(CMPRES1, TMP, CMPRES1);
} else {
- __ lw(TMP, field_cid_operand);
+ __ lhu(TMP, field_cid_operand);
__ LoadImmediate(CMPRES1, value_cid);
__ subu(CMPRES1, TMP, CMPRES1);
}
@@ -1674,16 +1674,16 @@ void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
if (!field().needs_length_check()) {
// Uninitialized field can be handled inline. Check if the
// field is still unitialized.
- __ lw(CMPRES1, field_cid_operand);
+ __ lhu(CMPRES1, field_cid_operand);
__ BranchNotEqual(CMPRES1, Immediate(kIllegalCid), fail);
if (value_cid == kDynamicCid) {
- __ sw(value_cid_reg, field_cid_operand);
- __ sw(value_cid_reg, field_nullability_operand);
+ __ sh(value_cid_reg, field_cid_operand);
+ __ sh(value_cid_reg, field_nullability_operand);
} else {
__ LoadImmediate(TMP, value_cid);
- __ sw(TMP, field_cid_operand);
- __ sw(TMP, field_nullability_operand);
+ __ sh(TMP, field_cid_operand);
+ __ sh(TMP, field_nullability_operand);
}
if (deopt == NULL) {
@@ -1696,7 +1696,7 @@ void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(!compiler->is_optimizing());
__ Bind(fail);
- __ lw(CMPRES1, FieldAddress(field_reg, Field::guarded_cid_offset()));
+ __ lhu(CMPRES1, FieldAddress(field_reg, Field::guarded_cid_offset()));
__ BranchEqual(CMPRES1, Immediate(kDynamicCid), &ok);
__ addiu(SP, SP, Immediate(-2 * kWordSize));
@@ -2000,14 +2000,14 @@ void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ LoadObject(temp, Field::ZoneHandle(field().raw()));
- __ lw(temp2, FieldAddress(temp, Field::is_nullable_offset()));
+ __ lhu(temp2, FieldAddress(temp, Field::is_nullable_offset()));
__ BranchEqual(temp2, Immediate(kNullCid), &store_pointer);
__ lbu(temp2, FieldAddress(temp, Field::kind_bits_offset()));
__ andi(CMPRES1, temp2, Immediate(1 << Field::kUnboxingCandidateBit));
__ beq(CMPRES1, ZR, &store_pointer);
- __ lw(temp2, FieldAddress(temp, Field::guarded_cid_offset()));
+ __ lhu(temp2, FieldAddress(temp, Field::guarded_cid_offset()));
__ BranchEqual(temp2, Immediate(kDoubleCid), &store_double);
// Fall through.
@@ -2317,10 +2317,10 @@ void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
FieldAddress field_nullability_operand(result_reg,
Field::is_nullable_offset());
- __ lw(temp, field_nullability_operand);
+ __ lhu(temp, field_nullability_operand);
__ BranchEqual(temp, Immediate(kNullCid), &load_pointer);
- __ lw(temp, field_cid_operand);
+ __ lhu(temp, field_cid_operand);
__ BranchEqual(temp, Immediate(kDoubleCid), &load_double);
// Fall through.
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698