| Index: src/x64/macro-assembler-x64.h
|
| diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h
|
| index 35369118751d8ff4faca4577305cd0f101e9a296..195ee364e1d4d47e3b060af618b2319f96fa076d 100644
|
| --- a/src/x64/macro-assembler-x64.h
|
| +++ b/src/x64/macro-assembler-x64.h
|
| @@ -74,7 +74,7 @@ class MacroAssembler: public Assembler {
|
|
|
| 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);
|
|
|
| @@ -596,6 +596,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
|
| @@ -1772,6 +1778,23 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected,
|
| }
|
|
|
|
|
| +// Ensures that code is padded to at least a given size.
|
| +class Padding BASE_EMBEDDED {
|
| + public:
|
| + Padding(Assembler* masm, int min_size)
|
| + : masm_(masm), min_end_offset_(masm->pc_offset() + min_size) { }
|
| + ~Padding() {
|
| + int offset = masm_->pc_offset();
|
| + if (offset < min_end_offset_) {
|
| + masm_->Pad(min_end_offset_ - offset);
|
| + }
|
| + }
|
| + private:
|
| + Assembler* masm_;
|
| + int min_end_offset_;
|
| +};
|
| +
|
| +
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
|
|
|