Commit 24297761 authored by plind44@gmail.com's avatar plind44@gmail.com

MIPS: Reland and fix r21225 and r21226.

Port r21232 (5681b0b)

BUG=
R=plind44@gmail.com

Review URL: https://codereview.chromium.org/275973002

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a942f431
...@@ -3039,7 +3039,7 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( ...@@ -3039,7 +3039,7 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
__ Addu(t0, t0, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag)); __ Addu(t0, t0, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag));
// Calculate the end of the descriptor array. // Calculate the end of the descriptor array.
__ mov(a2, t0); __ mov(a2, t0);
__ sll(t1, a3, kPointerSizeLog2 - kSmiTagSize); __ sll(t1, a3, kPointerSizeLog2);
__ Addu(a2, a2, t1); __ Addu(a2, a2, t1);
// Loop through all the keys in the descriptor array. If one of these is the // Loop through all the keys in the descriptor array. If one of these is the
......
...@@ -5236,7 +5236,7 @@ void MacroAssembler::CheckMapDeprecated(Handle<Map> map, ...@@ -5236,7 +5236,7 @@ void MacroAssembler::CheckMapDeprecated(Handle<Map> map,
if (map->CanBeDeprecated()) { if (map->CanBeDeprecated()) {
li(scratch, Operand(map)); li(scratch, Operand(map));
lw(scratch, FieldMemOperand(scratch, Map::kBitField3Offset)); lw(scratch, FieldMemOperand(scratch, Map::kBitField3Offset));
And(scratch, scratch, Operand(Smi::FromInt(Map::Deprecated::kMask))); And(scratch, scratch, Operand(Map::Deprecated::kMask));
Branch(if_deprecated, ne, scratch, Operand(zero_reg)); Branch(if_deprecated, ne, scratch, Operand(zero_reg));
} }
} }
...@@ -5493,7 +5493,8 @@ void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { ...@@ -5493,7 +5493,8 @@ void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
void MacroAssembler::EnumLength(Register dst, Register map) { void MacroAssembler::EnumLength(Register dst, Register map) {
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
lw(dst, FieldMemOperand(map, Map::kBitField3Offset)); lw(dst, FieldMemOperand(map, Map::kBitField3Offset));
And(dst, dst, Operand(Smi::FromInt(Map::EnumLengthBits::kMask))); And(dst, dst, Operand(Map::EnumLengthBits::kMask));
SmiTag(dst);
} }
......
...@@ -1486,7 +1486,7 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT ...@@ -1486,7 +1486,7 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
template<typename Field> template<typename Field>
void DecodeField(Register reg) { void DecodeField(Register reg) {
static const int shift = Field::kShift; static const int shift = Field::kShift;
static const int mask = (Field::kMask >> shift) << kSmiTagSize; static const int mask = Field::kMask >> shift;
srl(reg, reg, shift); srl(reg, reg, shift);
And(reg, reg, Operand(mask)); And(reg, reg, Operand(mask));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment