Index: src/x64/macro-assembler-x64.h |
diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h |
index e868cf0a655906f0d1beb5b1311e2943ffdcf1e4..0ee3933708a2a662d573b51c4036ea5675043194 100644 |
--- a/src/x64/macro-assembler-x64.h |
+++ b/src/x64/macro-assembler-x64.h |
@@ -604,6 +604,12 @@ class MacroAssembler: public Assembler { |
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 |