| Index: src/x64/macro-assembler-x64.h
|
| ===================================================================
|
| --- src/x64/macro-assembler-x64.h (revision 7006)
|
| +++ src/x64/macro-assembler-x64.h (working copy)
|
| @@ -74,7 +74,7 @@
|
|
|
| void LoadRoot(Register destination, Heap::RootListIndex index);
|
| void CompareRoot(Register with, Heap::RootListIndex index);
|
| - void CompareRoot(Operand with, Heap::RootListIndex index);
|
| + void CompareRoot(const Operand& with, Heap::RootListIndex index);
|
| void PushRoot(Heap::RootListIndex index);
|
| void StoreRoot(Register source, Heap::RootListIndex index);
|
|
|
| @@ -540,7 +540,15 @@
|
|
|
| // ---------------------------------------------------------------------------
|
| // String macros.
|
| +
|
| + // If object is a string, its map is loaded into object_map.
|
| template <typename LabelType>
|
| + void JumpIfNotString(Register object,
|
| + Register object_map,
|
| + LabelType* not_string);
|
| +
|
| +
|
| + template <typename LabelType>
|
| void JumpIfNotBothSequentialAsciiStrings(Register first_object,
|
| Register second_object,
|
| Register scratch1,
|
| @@ -596,6 +604,12 @@
|
| void Call(ExternalReference ext);
|
| void Call(Handle<Code> code_object, RelocInfo::Mode rmode);
|
|
|
| + // Emit call to the code we are currently generating.
|
| + void CallSelf() {
|
| + Handle<Code> self(reinterpret_cast<Code**>(CodeObject().location()));
|
| + Call(self, RelocInfo::CODE_TARGET);
|
| + }
|
| +
|
| // Non-x64 instructions.
|
| // Push/pop all general purpose registers.
|
| // Does not push rsp/rbp nor any of the assembler's special purpose registers
|
| @@ -906,6 +920,10 @@
|
|
|
| void Ret();
|
|
|
| + // Return and drop arguments from stack, where the number of arguments
|
| + // may be bigger than 2^16 - 1. Requires a scratch register.
|
| + void Ret(int bytes_dropped, Register scratch);
|
| +
|
| Handle<Object> CodeObject() { return code_object_; }
|
|
|
|
|
| @@ -1458,6 +1476,8 @@
|
| ASSERT(!src1.is(kScratchRegister));
|
| ASSERT(!src2.is(kScratchRegister));
|
| ASSERT(!dst.is(rcx));
|
| + // dst and src1 can be the same, because the one case that bails out
|
| + // is a shift by 0, which leaves dst, and therefore src1, unchanged.
|
| NearLabel result_ok;
|
| if (src1.is(rcx) || src2.is(rcx)) {
|
| movq(kScratchRegister, rcx);
|
| @@ -1592,6 +1612,17 @@
|
|
|
|
|
| template <typename LabelType>
|
| +void MacroAssembler::JumpIfNotString(Register object,
|
| + Register object_map,
|
| + LabelType* not_string) {
|
| + Condition is_smi = CheckSmi(object);
|
| + j(is_smi, not_string);
|
| + CmpObjectType(object, FIRST_NONSTRING_TYPE, object_map);
|
| + j(above_equal, not_string);
|
| +}
|
| +
|
| +
|
| +template <typename LabelType>
|
| void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first_object,
|
| Register second_object,
|
| Register scratch1,
|
|
|