diff options
Diffstat (limited to 'deps/v8/src/mips/macro-assembler-mips.h')
-rw-r--r-- | deps/v8/src/mips/macro-assembler-mips.h | 61 |
1 files changed, 51 insertions, 10 deletions
diff --git a/deps/v8/src/mips/macro-assembler-mips.h b/deps/v8/src/mips/macro-assembler-mips.h index 75ded88490..0805bb9670 100644 --- a/deps/v8/src/mips/macro-assembler-mips.h +++ b/deps/v8/src/mips/macro-assembler-mips.h @@ -51,6 +51,12 @@ class JumpTarget; // MIPS generated code calls C code, it must be via t9 register. +// Flags used for LeaveExitFrame function. +enum LeaveExitFrameMode { + EMIT_RETURN = true, + NO_EMIT_RETURN = false +}; + // Flags used for AllocateHeapNumber enum TaggingMode { // Tag the result. @@ -848,7 +854,8 @@ class MacroAssembler: public Assembler { // Leave the current exit frame. void LeaveExitFrame(bool save_doubles, Register arg_count, - bool do_return = false); + bool restore_context, + bool do_return = NO_EMIT_RETURN); // Get the actual activation frame alignment for target environment. static int ActivationFrameAlignment(); @@ -1194,11 +1201,18 @@ class MacroAssembler: public Assembler { void CallJSExitStub(CodeStub* stub); // Call a runtime routine. - void CallRuntime(const Runtime::Function* f, int num_arguments); - void CallRuntimeSaveDoubles(Runtime::FunctionId id); + void CallRuntime(const Runtime::Function* f, + int num_arguments, + SaveFPRegsMode save_doubles = kDontSaveFPRegs); + void CallRuntimeSaveDoubles(Runtime::FunctionId id) { + const Runtime::Function* function = Runtime::FunctionForId(id); + CallRuntime(function, function->nargs, kSaveFPRegs); + } // Convenience function: Same as above, but takes the fid instead. - void CallRuntime(Runtime::FunctionId fid, int num_arguments); + void CallRuntime(Runtime::FunctionId id, int num_arguments) { + CallRuntime(Runtime::FunctionForId(id), num_arguments); + } // Convenience function: call an external reference. void CallExternalReference(const ExternalReference& ext, @@ -1271,7 +1285,8 @@ class MacroAssembler: public Assembler { ExternalReference thunk_ref, Register thunk_last_arg, int stack_space, - int return_value_offset_from_fp); + MemOperand return_value_operand, + MemOperand* context_restore_operand); // Jump to the builtin routine. void JumpToExternalReference(const ExternalReference& builtin, @@ -1419,6 +1434,18 @@ class MacroAssembler: public Assembler { // ------------------------------------------------------------------------- // String utilities. + // Generate code to do a lookup in the number string cache. If the number in + // the register object is found in the cache the generated code falls through + // with the result in the result register. The object and the result register + // can be the same. If the number is not found in the cache the code jumps to + // the label not_found with only the content of register object unchanged. + void LookupNumberStringCache(Register object, + Register result, + Register scratch1, + Register scratch2, + Register scratch3, + Label* not_found); + // Checks if both instance types are sequential ASCII strings and jumps to // label if either is not. void JumpIfBothInstanceTypesAreNotSequentialAscii( @@ -1471,6 +1498,9 @@ class MacroAssembler: public Assembler { And(reg, reg, Operand(mask)); } + // Generates function and stub prologue code. + void Prologue(PrologueFrameMode frame_mode); + // Activation support. void EnterFrame(StackFrame::Type type); void LeaveFrame(StackFrame::Type type); @@ -1493,11 +1523,22 @@ class MacroAssembler: public Assembler { // to another type. // On entry, receiver_reg should point to the array object. // scratch_reg gets clobbered. - // If allocation info is present, jump to allocation_info_present - void TestJSArrayForAllocationMemento(Register receiver_reg, - Register scratch_reg, - Condition cond, - Label* allocation_memento_present); + // If allocation info is present, jump to allocation_memento_present. + void TestJSArrayForAllocationMemento( + Register receiver_reg, + Register scratch_reg, + Label* no_memento_found, + Condition cond = al, + Label* allocation_memento_present = NULL); + + void JumpIfJSArrayHasAllocationMemento(Register receiver_reg, + Register scratch_reg, + Label* memento_found) { + Label no_memento_found; + TestJSArrayForAllocationMemento(receiver_reg, scratch_reg, + &no_memento_found, eq, memento_found); + bind(&no_memento_found); + } private: void CallCFunctionHelper(Register function, |