| Index: src/assembler-ia32.h
|
| diff --git a/src/assembler-ia32.h b/src/assembler-ia32.h
|
| index 17c6b82d600fd41258127426b4d21c9eb1364eb4..2abf24aaa1cbf7cce44567705de7df1ce849a471 100644
|
| --- a/src/assembler-ia32.h
|
| +++ b/src/assembler-ia32.h
|
| @@ -185,6 +185,10 @@ class Immediate BASE_EMBEDDED {
|
| inline explicit Immediate(Handle<Object> handle);
|
| inline explicit Immediate(Smi* value);
|
|
|
| + static Immediate CodeRelativeOffset(Label* label) {
|
| + return Immediate(label);
|
| + }
|
| +
|
| bool is_zero() const { return x_ == 0 && rmode_ == RelocInfo::NONE; }
|
| bool is_int8() const {
|
| return -128 <= x_ && x_ < 128 && rmode_ == RelocInfo::NONE;
|
| @@ -194,6 +198,8 @@ class Immediate BASE_EMBEDDED {
|
| }
|
|
|
| private:
|
| + inline explicit Immediate(Label* value);
|
| +
|
| int x_;
|
| RelocInfo::Mode rmode_;
|
|
|
| @@ -731,24 +737,6 @@ class Assembler : public Malloced {
|
|
|
|
|
| private:
|
| - // Code buffer:
|
| - // The buffer into which code and relocation info are generated.
|
| - byte* buffer_;
|
| - int buffer_size_;
|
| - // True if the assembler owns the buffer, false if buffer is external.
|
| - bool own_buffer_;
|
| -
|
| - // code generation
|
| - byte* pc_; // the program counter; moves forward
|
| - RelocInfoWriter reloc_info_writer;
|
| -
|
| - // push-pop elimination
|
| - byte* last_pc_;
|
| -
|
| - // source position information
|
| - int last_position_;
|
| - int last_statement_position_;
|
| -
|
| byte* addr_at(int pos) { return buffer_ + pos; }
|
| byte byte_at(int pos) { return buffer_[pos]; }
|
| uint32_t long_at(int pos) {
|
| @@ -766,6 +754,9 @@ class Assembler : public Malloced {
|
| inline void emit(const Immediate& x);
|
| inline void emit_w(const Immediate& x);
|
|
|
| + // Emit the code-object-relative offset of the label's position
|
| + inline void emit_code_relative_offset(Label* label);
|
| +
|
| // instruction generation
|
| void emit_arith_b(int op1, int op2, Register dst, int imm8);
|
|
|
| @@ -794,6 +785,24 @@ class Assembler : public Malloced {
|
|
|
| friend class CodePatcher;
|
| friend class EnsureSpace;
|
| +
|
| + // Code buffer:
|
| + // The buffer into which code and relocation info are generated.
|
| + byte* buffer_;
|
| + int buffer_size_;
|
| + // True if the assembler owns the buffer, false if buffer is external.
|
| + bool own_buffer_;
|
| +
|
| + // code generation
|
| + byte* pc_; // the program counter; moves forward
|
| + RelocInfoWriter reloc_info_writer;
|
| +
|
| + // push-pop elimination
|
| + byte* last_pc_;
|
| +
|
| + // source position information
|
| + int last_position_;
|
| + int last_statement_position_;
|
| };
|
|
|
|
|
|
|