Revision f230a1cf deps/v8/src/ia32/macro-assembler-ia32.h

View differences:

deps/v8/src/ia32/macro-assembler-ia32.h
225 225
  void DebugBreak();
226 226
#endif
227 227

  
228
  // Generates function and stub prologue code.
229
  void Prologue(PrologueFrameMode frame_mode);
230

  
228 231
  // Enter specific kind of exit frame. Expects the number of
229 232
  // arguments in register eax and sets up the number of arguments in
230 233
  // register edi and the pointer to the first argument in register
......
240 243

  
241 244
  // Leave the current exit frame. Expects the return value in
242 245
  // register eax (untouched).
243
  void LeaveApiExitFrame();
246
  void LeaveApiExitFrame(bool restore_context);
244 247

  
245 248
  // Find the function context up the context chain.
246 249
  void LoadContext(Register dst, int context_chain_length);
......
366 369
  void Set(Register dst, const Immediate& x);
367 370
  void Set(const Operand& dst, const Immediate& x);
368 371

  
372
  // cvtsi2sd instruction only writes to the low 64-bit of dst register, which
373
  // hinders register renaming and makes dependence chains longer. So we use
374
  // xorps to clear the dst register before cvtsi2sd to solve this issue.
375
  void Cvtsi2sd(XMMRegister dst, Register src) { Cvtsi2sd(dst, Operand(src)); }
376
  void Cvtsi2sd(XMMRegister dst, const Operand& src);
377

  
369 378
  // Support for constant splitting.
370 379
  bool IsUnsafeImmediate(const Immediate& x);
371 380
  void SafeSet(Register dst, const Immediate& x);
......
509 518
  }
510 519

  
511 520
  void LoadUint32(XMMRegister dst, Register src, XMMRegister scratch);
521
  void LoadUint32NoSSE2(Register src);
512 522

  
513 523
  // Jump the register contains a smi.
514 524
  inline void JumpIfSmi(Register value,
......
754 764
  void StubReturn(int argc);
755 765

  
756 766
  // Call a runtime routine.
757
  void CallRuntime(const Runtime::Function* f, int num_arguments);
758
  void CallRuntimeSaveDoubles(Runtime::FunctionId id);
767
  void CallRuntime(const Runtime::Function* f,
768
                   int num_arguments,
769
                   SaveFPRegsMode save_doubles = kDontSaveFPRegs);
770
  void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
771
    const Runtime::Function* function = Runtime::FunctionForId(id);
772
    CallRuntime(function, function->nargs, kSaveFPRegs);
773
  }
759 774

  
760 775
  // Convenience function: Same as above, but takes the fid instead.
761
  void CallRuntime(Runtime::FunctionId id, int num_arguments);
776
  void CallRuntime(Runtime::FunctionId id, int num_arguments) {
777
    CallRuntime(Runtime::FunctionForId(id), num_arguments);
778
  }
762 779

  
763 780
  // Convenience function: call an external reference.
764 781
  void CallExternalReference(ExternalReference ref, int num_arguments);
......
807 824
                                Address thunk_address,
808 825
                                Operand thunk_last_arg,
809 826
                                int stack_space,
810
                                int return_value_offset_from_ebp);
827
                                Operand return_value_operand,
828
                                Operand* context_restore_operand);
811 829

  
812 830
  // Jump to a runtime routine.
813 831
  void JumpToExternalReference(const ExternalReference& ext);
......
890 908
  // ---------------------------------------------------------------------------
891 909
  // String utilities.
892 910

  
911
  // Generate code to do a lookup in the number string cache. If the number in
912
  // the register object is found in the cache the generated code falls through
913
  // with the result in the result register. The object and the result register
914
  // can be the same. If the number is not found in the cache the code jumps to
915
  // the label not_found with only the content of register object unchanged.
916
  void LookupNumberStringCache(Register object,
917
                               Register result,
918
                               Register scratch1,
919
                               Register scratch2,
920
                               Label* not_found);
921

  
893 922
  // Check whether the instance type represents a flat ASCII string. Jump to the
894 923
  // label if not. If the instance type can be scratched specify same register
895 924
  // for both instance type and scratch.
......
931 960
  // to another type.
932 961
  // On entry, receiver_reg should point to the array object.
933 962
  // scratch_reg gets clobbered.
934
  // If allocation info is present, conditional code is set to equal
963
  // If allocation info is present, conditional code is set to equal.
935 964
  void TestJSArrayForAllocationMemento(Register receiver_reg,
936
                                       Register scratch_reg);
965
                                       Register scratch_reg,
966
                                       Label* no_memento_found);
967

  
968
  void JumpIfJSArrayHasAllocationMemento(Register receiver_reg,
969
                                         Register scratch_reg,
970
                                         Label* memento_found) {
971
    Label no_memento_found;
972
    TestJSArrayForAllocationMemento(receiver_reg, scratch_reg,
973
                                    &no_memento_found);
974
    j(equal, memento_found);
975
    bind(&no_memento_found);
976
  }
937 977

  
938 978
 private:
939 979
  bool generating_stub_;
......
957 997
  void EnterExitFramePrologue();
958 998
  void EnterExitFrameEpilogue(int argc, bool save_doubles);
959 999

  
960
  void LeaveExitFrameEpilogue();
1000
  void LeaveExitFrameEpilogue(bool restore_context);
961 1001

  
962 1002
  // Allocation support helpers.
963 1003
  void LoadAllocationTopHelper(Register result,

Also available in: Unified diff