37#ifndef V8_CODEGEN_IA32_ASSEMBLER_IA32_INL_H_
38#define V8_CODEGEN_IA32_ASSEMBLER_IA32_INL_H_
103 WriteUnalignedValue(
pc_, target.ptr());
111 return ReadUnalignedValue<Address>(
pc_);
117 WriteUnalignedValue(
pc_, target);
125 return WasmCodePointer{ReadUnalignedValue<uint32_t>(
pc_)};
131 WriteUnalignedValue(
pc_, target.value());
139 return ReadUnalignedValue<Address>(
pc_);
155 return ReadUnalignedValue<uint32_t>(
pc);
159 uint32_t new_constant,
160 WritableJitAllocation* jit_allocation,
162 if (jit_allocation) {
163 jit_allocation->WriteUnalignedValue<uint32_t>(
pc, new_constant);
165 WriteUnalignedValue<uint32_t>(
pc, new_constant);
173 WriteUnalignedValue(
reinterpret_cast<Address>(
pc_),
x);
174 pc_ +=
sizeof(uint32_t);
178 WriteUnalignedValue(
reinterpret_cast<Address>(
pc_),
x);
179 pc_ +=
sizeof(uint64_t);
194 emit(code.address(), rmode);
204 if (
x.is_heap_number_request()) {
213 if (
label->is_bound()) {
223 DCHECK(
x.is_int8() ||
x.is_uint8());
224 uint8_t value =
static_cast<uint8_t
>(
x.immediate());
230 uint16_t value =
static_cast<uint16_t
>(
x.immediate());
231 WriteUnalignedValue(
reinterpret_cast<Address>(
pc_), value);
232 pc_ +=
sizeof(uint16_t);
236 return pc +
sizeof(int32_t) + ReadUnalignedValue<int32_t>(
pc);
241 WritableJitAllocation* jit_allocation,
243 if (jit_allocation) {
244 jit_allocation->WriteUnalignedValue(
pc, target - (
pc +
sizeof(int32_t)));
246 WriteUnalignedValue(
pc, target - (
pc +
sizeof(int32_t)));
269 emit(
static_cast<int>(disp.
data()));
274 if (
L->is_near_linked()) {
277 disp =
static_cast<uint8_t
>(
offset & 0xFF);
300 *
reinterpret_cast<int8_t*
>(&
buf_[
len_++]) = disp;
interpreter::OperandScale scale
void RequestHeapNumber(HeapNumberRequest request)
static constexpr int kSpecialTargetSize
static void deserialization_set_target_internal_reference_at(Address pc, Address target, WritableJitAllocation &jit_allocation, RelocInfo::Mode mode=RelocInfo::INTERNAL_REFERENCE)
void emit_w(const Immediate &x)
void disp_at_put(Label *L, Displacement disp)
void emit_code_relative_offset(Label *label)
static void set_uint32_constant_at(Address pc, Address constant_pool, uint32_t new_constant, WritableJitAllocation *jit_allocation, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
void emit_disp(Label *L, Displacement::Type type)
void emit_near_disp(Label *L)
void long_at_put(int pos, uint32_t x)
Displacement disp_at(Label *L)
void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data=0)
uint32_t long_at(int pos)
static V8_INLINE void set_target_address_at(Address pc, Address constant_pool, Address target, WritableJitAllocation *jit_allocation, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
static int deserialization_special_target_size(Address location)
static V8_INLINE Address target_address_at(Address pc, Address constant_pool)
static uint32_t uint32_constant_at(Address pc, Address constant_pool)
static bool SupportsOptimizer()
static constexpr int kHeaderSize
void set_disp8(int8_t disp)
void set_sib(ScaleFactor scale, Register index, Register base)
V8_INLINE Address target_internal_reference()
static constexpr bool IsInternalReference(Mode mode)
static constexpr bool IsOffHeapTarget(Mode mode)
static const int kApplyMask
static constexpr int ModeMask(Mode mode)
V8_INLINE Address target_address()
V8_INLINE Address target_internal_reference_address()
static constexpr bool IsCodeTarget(Mode mode)
static constexpr bool IsWasmCall(Mode mode)
V8_INLINE int target_address_size()
V8_INLINE Builtin target_builtin_at(Assembler *origin)
V8_INLINE WasmCodePointer wasm_code_pointer_table_entry() const
V8_INLINE Address target_off_heap_target()
static constexpr bool IsWasmStubCall(Mode mode)
V8_INLINE Address target_external_reference()
V8_INLINE Tagged< HeapObject > target_object(PtrComprCageBase cage_base)
V8_INLINE Address constant_pool_entry_address()
V8_INLINE JSDispatchHandle js_dispatch_handle()
V8_INLINE DirectHandle< HeapObject > target_object_handle(Assembler *origin)
static constexpr bool IsFullEmbeddedObject(Mode mode)
@ WASM_CODE_POINTER_TABLE_ENTRY
bool HasTargetAddressAddress() const
V8_INLINE Address target_address_address()
static constexpr bool IsNoInfo(Mode mode)
V8_INLINE void WriteUnalignedValue(Address address, T value)
V8_INLINE void set_target_object(Tagged< InstructionStream > host, Tagged< HeapObject > target, WriteBarrierMode write_barrier_mode=UPDATE_WRITE_BARRIER, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
V8_INLINE void set_wasm_code_pointer_table_entry(WasmCodePointer, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
V8_INLINE void apply(intptr_t delta)
V8_INLINE void set_target_external_reference(Address, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
static V ReadUnalignedValue(Address p)
static void WriteUnalignedValue(Address p, V value)
V8_INLINE IndirectHandle< T > handle(Tagged< T > object, Isolate *isolate)
void FlushInstructionCache(void *start, size_t size)
kInterpreterTrampolineOffset Tagged< HeapObject >
base::StrongAlias< JSDispatchHandleAliasTag, uint32_t > JSDispatchHandle
Handle< T > IndirectHandle
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)