| Index: src/assembler-ia32.h
|
| ===================================================================
|
| --- src/assembler-ia32.h (revision 1004)
|
| +++ src/assembler-ia32.h (working copy)
|
| @@ -194,6 +194,10 @@
|
| 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;
|
| @@ -203,6 +207,8 @@
|
| }
|
|
|
| private:
|
| + inline explicit Immediate(Label* value);
|
| +
|
| int x_;
|
| RelocInfo::Mode rmode_;
|
|
|
| @@ -506,15 +512,14 @@
|
| void and_(const Operand& dst, const Immediate& x);
|
|
|
| void cmpb(const Operand& op, int8_t imm8);
|
| + void cmpb_al(const Operand& op);
|
| + void cmpw_ax(const Operand& op);
|
| void cmpw(const Operand& op, Immediate imm16);
|
| void cmp(Register reg, int32_t imm32);
|
| void cmp(Register reg, Handle<Object> handle);
|
| void cmp(Register reg, const Operand& op);
|
| void cmp(const Operand& op, const Immediate& imm);
|
|
|
| - void rep_cmpsb();
|
| - void rep_cmpsw();
|
| -
|
| void dec_b(Register dst);
|
|
|
| void dec(Register dst);
|
| @@ -740,24 +745,6 @@
|
|
|
|
|
| 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) {
|
| @@ -775,6 +762,9 @@
|
| 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);
|
|
|
| @@ -803,6 +793,24 @@
|
|
|
| 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_;
|
| };
|
|
|
|
|
|
|