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

Unified Diff: src/mips64/code-stubs-mips64.cc

Issue 1773533002: MIPS64: Fix [stubs] Introduce a dedicated FastNewObjectStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing master Created 4 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/code-stubs-mips64.cc
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
index e08ed69a7d2a4bf706a34041b0ecd5ac70fd9d7b..762084520d55e026fb3ab90e9cbfb63b2ba29549 100644
--- a/src/mips64/code-stubs-mips64.cc
+++ b/src/mips64/code-stubs-mips64.cc
@@ -4755,7 +4755,7 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
__ ld(a2, FieldMemOperand(a3, JSFunction::kPrototypeOrInitialMapOffset));
__ JumpIfSmi(a2, &new_object);
__ GetObjectType(a2, a0, a0);
- __ Branch(&new_object, ne, a2, Operand(MAP_TYPE));
+ __ Branch(&new_object, ne, a0, Operand(MAP_TYPE));
// Fall back to runtime if the target differs from the new target's
// initial map constructor.
@@ -4774,7 +4774,7 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
__ sd(a3, MemOperand(v0, JSObject::kPropertiesOffset));
__ sd(a3, MemOperand(v0, JSObject::kElementsOffset));
STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize);
- __ Addu(a1, v0, Operand(JSObject::kHeaderSize));
+ __ Daddu(a1, v0, Operand(JSObject::kHeaderSize));
// ----------- S t a t e -------------
// -- v0 : result (untagged)
@@ -4788,7 +4788,7 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
// Perform in-object slack tracking if requested.
Label slack_tracking;
STATIC_ASSERT(Map::kNoSlackTracking == 0);
- __ lw(a3, FieldMemOperand(a2, Map::kBitField3Offset));
+ __ lwu(a3, FieldMemOperand(a2, Map::kBitField3Offset));
__ And(at, a3, Operand(Map::ConstructionCounter::kMask));
__ Branch(USE_DELAY_SLOT, &slack_tracking, ne, at, Operand(zero_reg));
__ LoadRoot(a0, Heap::kUndefinedValueRootIndex); // In delay slot.
@@ -4799,7 +4799,7 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
// Add the object tag to make the JSObject real.
STATIC_ASSERT(kHeapObjectTag == 1);
__ Ret(USE_DELAY_SLOT);
- __ Addu(v0, v0, Operand(kHeapObjectTag)); // In delay slot.
+ __ Daddu(v0, v0, Operand(kHeapObjectTag)); // In delay slot.
}
__ bind(&slack_tracking);
{
@@ -4824,7 +4824,7 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
__ And(a3, a3, Operand(Map::ConstructionCounter::kMask));
__ Branch(USE_DELAY_SLOT, &finalize, eq, a3, Operand(zero_reg));
STATIC_ASSERT(kHeapObjectTag == 1);
- __ Addu(v0, v0, Operand(kHeapObjectTag)); // In delay slot.
+ __ Daddu(v0, v0, Operand(kHeapObjectTag)); // In delay slot.
__ Ret();
// Finalize the instance size.
@@ -4845,6 +4845,7 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
STATIC_ASSERT(kSmiTag == 0);
STATIC_ASSERT(kSmiTagSize == 1);
__ dsll(a4, a4, kPointerSizeLog2 + kSmiShiftSize + kSmiTagSize);
+ __ SmiTag(a4);
__ Push(a2, a4);
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ Pop(a2);
@@ -4852,7 +4853,7 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
STATIC_ASSERT(kHeapObjectTag == 1);
__ Dsubu(v0, v0, Operand(kHeapObjectTag));
__ lbu(a5, FieldMemOperand(a2, Map::kInstanceSizeOffset));
- __ Lsa(a5, v0, a5, kPointerSizeLog2);
+ __ Dlsa(a5, v0, a5, kPointerSizeLog2);
__ jmp(&done_allocate);
// Fall back to %NewObject.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698