| Index: src/assembler.h
|
| diff --git a/src/assembler.h b/src/assembler.h
|
| index df8c8a9cac32cc6243b9b0167ab7aab345e22399..6d67fc1cb8e3eedeb863ed0905a748b58cf55cb9 100644
|
| --- a/src/assembler.h
|
| +++ b/src/assembler.h
|
| @@ -276,6 +276,12 @@ class Label BASE_EMBEDDED {
|
|
|
| enum SaveFPRegsMode { kDontSaveFPRegs, kSaveFPRegs };
|
|
|
| +// Specifies whether to perform icache flush operations on RelocInfo updates.
|
| +// If FLUSH_ICACHE_IF_NEEDED, the icache will always be flushed if an
|
| +// instruction was modified. If SKIP_ICACHE_FLUSH the flush will always be
|
| +// skipped (only use this if you will flush the icache manually before it is
|
| +// executed).
|
| +enum ICacheFlushMode { FLUSH_ICACHE_IF_NEEDED, SKIP_ICACHE_FLUSH };
|
|
|
| // -----------------------------------------------------------------------------
|
| // Relocation information
|
| @@ -360,7 +366,6 @@ class RelocInfo {
|
| LAST_STANDARD_NONCOMPACT_ENUM = INTERNAL_REFERENCE
|
| };
|
|
|
| -
|
| RelocInfo() {}
|
|
|
| RelocInfo(byte* pc, Mode rmode, intptr_t data, Code* host)
|
| @@ -452,7 +457,9 @@ class RelocInfo {
|
| void set_host(Code* host) { host_ = host; }
|
|
|
| // Apply a relocation by delta bytes
|
| - INLINE(void apply(intptr_t delta));
|
| + INLINE(void apply(intptr_t delta,
|
| + ICacheFlushMode icache_flush_mode =
|
| + FLUSH_ICACHE_IF_NEEDED));
|
|
|
| // Is the pointer this relocation info refers to coded like a plain pointer
|
| // or is it strange in some way (e.g. relative or patched into a series of
|
| @@ -468,22 +475,35 @@ class RelocInfo {
|
| // can only be called if IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)
|
| INLINE(Address target_address());
|
| INLINE(void set_target_address(Address target,
|
| - WriteBarrierMode mode = UPDATE_WRITE_BARRIER));
|
| + WriteBarrierMode write_barrier_mode =
|
| + UPDATE_WRITE_BARRIER,
|
| + ICacheFlushMode icache_flush_mode =
|
| + FLUSH_ICACHE_IF_NEEDED));
|
| INLINE(Object* target_object());
|
| INLINE(Handle<Object> target_object_handle(Assembler* origin));
|
| INLINE(void set_target_object(Object* target,
|
| - WriteBarrierMode mode = UPDATE_WRITE_BARRIER));
|
| + WriteBarrierMode write_barrier_mode =
|
| + UPDATE_WRITE_BARRIER,
|
| + ICacheFlushMode icache_flush_mode =
|
| + FLUSH_ICACHE_IF_NEEDED));
|
| INLINE(Address target_runtime_entry(Assembler* origin));
|
| INLINE(void set_target_runtime_entry(Address target,
|
| - WriteBarrierMode mode =
|
| - UPDATE_WRITE_BARRIER));
|
| + WriteBarrierMode write_barrier_mode =
|
| + UPDATE_WRITE_BARRIER,
|
| + ICacheFlushMode icache_flush_mode =
|
| + FLUSH_ICACHE_IF_NEEDED));
|
| INLINE(Cell* target_cell());
|
| INLINE(Handle<Cell> target_cell_handle());
|
| INLINE(void set_target_cell(Cell* cell,
|
| - WriteBarrierMode mode = UPDATE_WRITE_BARRIER));
|
| + WriteBarrierMode write_barrier_mode =
|
| + UPDATE_WRITE_BARRIER,
|
| + ICacheFlushMode icache_flush_mode =
|
| + FLUSH_ICACHE_IF_NEEDED));
|
| INLINE(Handle<Object> code_age_stub_handle(Assembler* origin));
|
| INLINE(Code* code_age_stub());
|
| - INLINE(void set_code_age_stub(Code* stub));
|
| + INLINE(void set_code_age_stub(Code* stub,
|
| + ICacheFlushMode icache_flush_mode =
|
| + FLUSH_ICACHE_IF_NEEDED));
|
|
|
| // Returns the address of the constant pool entry where the target address
|
| // is held. This should only be called if IsInConstantPool returns true.
|
|
|