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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 9372063: MIPS: Enable serialization for MIPS architecture. (Closed)
Patch Set: rebased on r10858. Created 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4065 matching lines...) Expand 10 before | Expand all | Expand 10 after
4076 __ Move(kDoubleRegZero, 0.0); 4076 __ Move(kDoubleRegZero, 0.0);
4077 } 4077 }
4078 4078
4079 4079
4080 // Load argv in s0 register. 4080 // Load argv in s0 register.
4081 int offset_to_argv = (kNumCalleeSaved + 1) * kPointerSize; 4081 int offset_to_argv = (kNumCalleeSaved + 1) * kPointerSize;
4082 if (CpuFeatures::IsSupported(FPU)) { 4082 if (CpuFeatures::IsSupported(FPU)) {
4083 offset_to_argv += kNumCalleeSavedFPU * kDoubleSize; 4083 offset_to_argv += kNumCalleeSavedFPU * kDoubleSize;
4084 } 4084 }
4085 4085
4086 __ InitializeRootRegister();
4086 __ lw(s0, MemOperand(sp, offset_to_argv + kCArgsSlotsSize)); 4087 __ lw(s0, MemOperand(sp, offset_to_argv + kCArgsSlotsSize));
4087 4088
4088 // We build an EntryFrame. 4089 // We build an EntryFrame.
4089 __ li(t3, Operand(-1)); // Push a bad frame pointer to fail if it is used. 4090 __ li(t3, Operand(-1)); // Push a bad frame pointer to fail if it is used.
4090 int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY; 4091 int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY;
4091 __ li(t2, Operand(Smi::FromInt(marker))); 4092 __ li(t2, Operand(Smi::FromInt(marker)));
4092 __ li(t1, Operand(Smi::FromInt(marker))); 4093 __ li(t1, Operand(Smi::FromInt(marker)));
4093 __ li(t0, Operand(ExternalReference(Isolate::kCEntryFPAddress, 4094 __ li(t0, Operand(ExternalReference(Isolate::kCEntryFPAddress,
4094 isolate))); 4095 isolate)));
4095 __ lw(t0, MemOperand(t0)); 4096 __ lw(t0, MemOperand(t0));
(...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after
7044 masm->bal(&find_ra); // ra = pc + 8. 7045 masm->bal(&find_ra); // ra = pc + 8.
7045 masm->nop(); // Branch delay slot nop. 7046 masm->nop(); // Branch delay slot nop.
7046 masm->bind(&find_ra); 7047 masm->bind(&find_ra);
7047 7048
7048 const int kNumInstructionsToJump = 6; 7049 const int kNumInstructionsToJump = 6;
7049 masm->addiu(ra, ra, kNumInstructionsToJump * kPointerSize); 7050 masm->addiu(ra, ra, kNumInstructionsToJump * kPointerSize);
7050 // Push return address (accessible to GC through exit frame pc). 7051 // Push return address (accessible to GC through exit frame pc).
7051 // This spot for ra was reserved in EnterExitFrame. 7052 // This spot for ra was reserved in EnterExitFrame.
7052 masm->sw(ra, MemOperand(sp, kCArgsSlotsSize)); 7053 masm->sw(ra, MemOperand(sp, kCArgsSlotsSize));
7053 masm->li(ra, Operand(reinterpret_cast<intptr_t>(GetCode().location()), 7054 masm->li(ra, Operand(reinterpret_cast<intptr_t>(GetCode().location()),
7054 RelocInfo::CODE_TARGET), true); 7055 RelocInfo::CODE_TARGET), CONSTANT_SIZE);
Erik Corry 2012/02/29 14:38:13 This line is incorrectly indented.
kalmard 2012/03/12 12:40:00 Done.
7055 // Call the function. 7056 // Call the function.
7056 masm->Jump(t9); 7057 masm->Jump(t9);
7057 // Make sure the stored 'ra' points to this position. 7058 // Make sure the stored 'ra' points to this position.
7058 ASSERT_EQ(kNumInstructionsToJump, masm->InstructionsGeneratedSince(&find_ra)); 7059 ASSERT_EQ(kNumInstructionsToJump, masm->InstructionsGeneratedSince(&find_ra));
7059 } 7060 }
7060 7061
7061 7062
7062 void StringDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm, 7063 void StringDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm,
7063 Label* miss, 7064 Label* miss,
7064 Label* done, 7065 Label* done,
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
7652 __ Ret(USE_DELAY_SLOT); 7653 __ Ret(USE_DELAY_SLOT);
7653 __ mov(v0, a0); 7654 __ mov(v0, a0);
7654 } 7655 }
7655 7656
7656 7657
7657 #undef __ 7658 #undef __
7658 7659
7659 } } // namespace v8::internal 7660 } } // namespace v8::internal
7660 7661
7661 #endif // V8_TARGET_ARCH_MIPS 7662 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698