Home
last modified time | relevance | path

Searched full:offset (Results 1 – 25 of 288) sorted by relevance

12345678910>>...12

/arkcompiler/ets_runtime/ecmascript/regexp/
Dregexp_opcode.cpp129 uint32_t SaveStartOpCode::DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const in DumpOpCode()
131 out << offset << ":\t" in DumpOpCode()
132 << "save_start\t" << buf.GetU8(offset + 1) << std::endl; in DumpOpCode()
133 return offset + GetSize(); in DumpOpCode()
144 uint32_t SaveEndOpCode::DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const in DumpOpCode()
146 out << offset << ":\t" in DumpOpCode()
147 << "save_end\t" << buf.GetU8(offset + 1) << std::endl; in DumpOpCode()
148 return offset + GetSize(); in DumpOpCode()
159 uint32_t CharOpCode::DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const in DumpOpCode()
161 out << offset << ":\t" in DumpOpCode()
[all …]
Dregexp_opcode.h89 virtual uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const = 0;
103 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
113 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
123 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
130 void UpdateOpPara(DynChunk *buf, uint32_t offset, uint32_t para) const;
134 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
140 uint32_t InsertOpCode(DynChunk *buf, uint32_t offset, uint32_t para) const;
144 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
150 uint32_t InsertOpCode(DynChunk *buf, uint32_t offset, uint32_t para) const;
154 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
[all …]
/arkcompiler/ets_runtime/ecmascript/jspandafile/bytecode_inst/
Dinstruction.h36 const uint8_t *GetPointer(int32_t offset) const in GetPointer() argument
39 return pc_ + offset; in GetPointer()
63 T Read(size_t offset) const in Read() argument
66 return *reinterpret_cast<unaligned_type *>(GetPointer(offset)); in Read()
69 void Write(uint32_t value, uint32_t offset, uint32_t width) in Write() argument
71 auto *dst = const_cast<uint8_t *>(GetPointer(offset)); in Write()
73 … LOG(FATAL, PANDAFILE) << "Cannot write value : " << value << "at the dst offset : " << offset; in Write()
77 uint8_t ReadByte(size_t offset) const in ReadByte() argument
79 return Read<uint8_t>(offset); in ReadByte()
83 inline auto ReadHelper(size_t byteoffset, size_t bytecount, size_t offset, size_t width) const in ReadHelper() argument
[all …]
/arkcompiler/runtime_core/libpandabase/utils/
Dbit_memory_region.h53 Iterator(const BitMemoryRegion &region, uint32_t offset) : region_(region), bit_(offset) in Iterator() argument
129 bool Read(size_t offset) in Read() argument
131 ASSERT(offset < size_); in Read()
132 size_t index = (start_ + offset) / BITS_PER_BYTE; in Read()
133 size_t shift = (start_ + offset) % BITS_PER_BYTE; in Read()
138 void Write(bool value, size_t offset) in Write() argument
140 ASSERT(offset < size_); in Write()
141 size_t index = (start_ + offset) / BITS_PER_BYTE; in Write()
142 size_t shift = (start_ + offset) % BITS_PER_BYTE; in Write()
152 Read(size_t offset, size_t length) const in Read() argument
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/
Dtyped_array_stub_builder.h34 GateRef GetValueFromBuffer(GateRef buffer, GateRef index, GateRef offset, GateRef jsType);
39 GateRef offset = IntPtr(JSTypedArray::VIEWED_ARRAY_BUFFER_OFFSET); in GetViewedArrayBuffer() local
40 return Load(VariableType::JS_ANY(), array, offset); in GetViewedArrayBuffer()
45 GateRef offset = IntPtr(JSTypedArray::ARRAY_LENGTH_OFFSET); in GetArrayLength() local
46 return Load(VariableType::INT32(), array, offset); in GetArrayLength()
51 GateRef offset = IntPtr(JSTypedArray::BYTE_OFFSET_OFFSET); in GetByteOffset() local
52 return Load(VariableType::INT32(), array, offset); in GetByteOffset()
57 GateRef offset = IntPtr(JSArrayBuffer::DATA_OFFSET); in GetArrayBufferData() local
58 return Load(VariableType::JS_ANY(), buffer, offset); in GetArrayBufferData()
63 GateRef offset = IntPtr(JSArrayBuffer::BYTE_LENGTH_OFFSET); in GetArrayBufferByteLength() local
[all …]
Dtype_recorder.cpp134 auto callback = [this] (uint32_t offset, PGOType *type) { in LoadTypesFromPGO() argument
136 bcOffsetPGOOpTypeMap_[offset] = *reinterpret_cast<PGOSampleType *>(type); in LoadTypesFromPGO()
138 bcOffsetPGORwTypeMap_[offset] = *reinterpret_cast<PGORWOpType *>(type); in LoadTypesFromPGO()
246 GateType TypeRecorder::GetType(const int32_t offset) const in GetType()
248 if (bcOffsetGtMap_.find(offset) != bcOffsetGtMap_.end()) { in GetType()
249 return bcOffsetGtMap_.at(offset); in GetType()
260 GateType TypeRecorder::UpdateType(const int32_t offset, const GateType &type) const in UpdateType() argument
262 auto tempType = GetType(offset); in UpdateType()
270 PGOSampleType TypeRecorder::GetOrUpdatePGOType(TSManager *tsManager, int32_t offset, const GateType… in GetOrUpdatePGOType() argument
272 if (bcOffsetPGOOpTypeMap_.find(offset) != bcOffsetPGOOpTypeMap_.end()) { in GetOrUpdatePGOType()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/assembler/x64/
Dassembler_x64.cpp304 void AssemblerX64::EmitJmp(int32_t offset) in EmitJmp() argument
306 offset--; in EmitJmp()
307 if (InRange8(offset - sizeof(int8_t))) { in EmitJmp()
310 EmitI8(offset - sizeof(int8_t)); in EmitJmp()
314 EmitI32(offset - sizeof(int32_t)); in EmitJmp()
318 void AssemblerX64::EmitJa(int32_t offset) in EmitJa() argument
320 offset--; in EmitJa()
321 if (InRange8(offset - sizeof(int8_t))) { in EmitJa()
324 EmitI8(offset - sizeof(int8_t)); in EmitJa()
326 offset--; in EmitJa()
[all …]
Dassembler_x64.h117 void Jmp(Immediate offset);
231 void EmitJmp(int32_t offset);
232 void EmitJa(int32_t offset);
233 void EmitJb(int32_t offset);
234 void EmitJz(int32_t offset);
235 void EmitJne(int32_t offset);
236 void EmitJbe(int32_t offset);
237 void EmitJnz(int32_t offset);
238 void EmitJle(int32_t offset);
239 void EmitJae(int32_t offset);
[all …]
/arkcompiler/runtime_core/compiler/tests/
Dencoders_test.cpp71 void TestPcRelativeLoad(size_t data_size, ssize_t offset, bool get_address, in TestPcRelativeLoad() argument
75 … T *data = reinterpret_cast<T *>(buffer->template GetOffsetAddress<uint8_t *>(data_size) + offset); in TestPcRelativeLoad()
95 GetEncoder()->LoadPcRelative(reg, offset, addr); in TestPcRelativeLoad()
97 GetEncoder()->LoadPcRelative(reg, offset); in TestPcRelativeLoad()
132 void TestOffset(size_t data_size, ssize_t offset) in TestOffset() argument
134 ASSERT((offset & 3) == 0); in TestOffset()
135 if (vixl::IsInt21(offset)) { in TestOffset()
136 TestPcRelativeLoad<uint64_t>(data_size, offset, false, {"adr", "ldr"}); in TestOffset()
137 TestPcRelativeLoad<uint64_t>(data_size, offset, true, {"adr", "ldr"}); in TestOffset()
138 TestPcRelativeLoad<uint64_t>(data_size, -offset, false, {"adr", "ldr"}); in TestOffset()
[all …]
/arkcompiler/runtime_core/libpandabase/tests/
Dbit_memory_region_test.cpp23 static void CompareData(uint8_t *data, size_t offset, size_t length, uint32_t value, uint8_t fill_v… in CompareData() argument
26 … uint8_t expected = (offset <= i && i < offset + length) ? value >> (i - offset) : fill_value; in CompareData()
39 for (size_t offset = 0; offset < MAX_BITS_COUNT; offset++) { in TEST() local
44 BitMemoryRegion region1(data.data(), offset, 1); in TEST()
47 CompareData(data.data(), offset, 1, value, fill_value); in TEST()
50 region2.Write(value, offset); in TEST()
51 ASSERT_EQ(region2.Read(offset), value); in TEST()
52 CompareData(data.data(), offset, 1, value, fill_value); in TEST()
64 for (size_t offset = 0; offset < MAX_BITS_COUNT; offset++) { in TEST() local
70 BitMemoryRegion region1(data.data(), offset, length); in TEST()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/base/
Dbit_set.h61 bool TestBit(size_t offset) const in TestBit() argument
64 return data_.inlineWord_ & Mask(offset); in TestBit()
66 return data_.words_[Index(offset)] & Mask(IndexInWord(offset)); in TestBit()
70 void SetBit(size_t offset) in SetBit() argument
73 data_.inlineWord_ |= Mask(offset); in SetBit()
75 data_.words_[Index(offset)] |= Mask(IndexInWord(offset)); in SetBit()
79 void ClearBit(size_t offset) in ClearBit() argument
82 data_.inlineWord_ &= ~Mask(offset); in ClearBit()
84 data_.words_[Index(offset)] &= ~Mask(IndexInWord(offset)); in ClearBit()
146 size_t IndexInWord(size_t offset) const in IndexInWord() argument
[all …]
/arkcompiler/ets_runtime/ecmascript/mem/
Ddyn_chunk.h46 int EmitSelf(size_t offset, size_t len);
87 inline uint32_t GetU32(size_t offset) const in GetU32() argument
90 return *reinterpret_cast<uint32_t *>(buf_ + offset); in GetU32()
93 inline void PutU32(size_t offset, uint32_t data) const in PutU32() argument
96 *reinterpret_cast<uint32_t *>(buf_ + offset) = data; in PutU32()
99 inline uint32_t GetU16(size_t offset) const in GetU16() argument
102 return *reinterpret_cast<uint16_t *>(buf_ + offset); in GetU16()
105 inline void PutU16(size_t offset, uint16_t data) const in PutU16() argument
108 *reinterpret_cast<uint16_t *>(buf_ + offset) = data; in PutU16()
111 inline uint32_t GetU8(size_t offset) const in GetU8() argument
[all …]
Dgc_bitset.h88 bool SetBit(uintptr_t offset);
90 void ClearBit(uintptr_t offset) in ClearBit() argument
92 Words()[Index(offset)] &= ~Mask(IndexInWord(offset)); in ClearBit()
115 bool TestBit(uintptr_t offset) const in TestBit() argument
117 return Words()[Index(offset)] & Mask(IndexInWord(offset)); in TestBit()
173 size_t IndexInWord(uintptr_t offset) const in IndexInWord() argument
175 return offset & BIT_PER_WORD_MASK; in IndexInWord()
178 size_t Index(uintptr_t offset) const in Index() argument
180 return offset >> BIT_PER_WORD_LOG2; in Index()
216 inline bool GCBitset::SetBit<AccessType::NON_ATOMIC>(uintptr_t offset)
[all …]
Dbarriers.h29 static inline void SetPrimitive(void *obj, size_t offset, T value) in SetPrimitive() argument
31 auto *addr = reinterpret_cast<T *>(ToUintPtr(obj) + offset); in SetPrimitive()
37 static inline bool AtomicSetPrimitive(volatile void *obj, size_t offset, T oldValue, T value) in AtomicSetPrimitive() argument
39 … volatile auto atomicField = reinterpret_cast<volatile std::atomic<T> *>(ToUintPtr(obj) + offset); in AtomicSetPrimitive()
45 static void SetObject(const JSThread *thread, void *obj, size_t offset, JSTaggedType value);
50 static inline T GetValue(const void *obj, size_t offset) in GetValue() argument
52 auto *addr = reinterpret_cast<T *>(ToUintPtr(obj) + offset); in GetValue()
/arkcompiler/runtime_core/docs/
Dfile_format.md40 having an offset to an entity it doesn't matter whether the entity is local or foreign.
42 Runtime can easily check type of an offset by checking it is in the foreign region
45 or create a runtime object from the definition by the offset (for local entities).
53 An offset cannot contain values in the range *\[0; 32)*, except for specially mentioned cases.
197 A file begins with the header which is located at offset 0.
212Offset to the foreign region. The region must contain elements only of types [ForeignField](#forei…
215 | `class_idx_off` | `uint32_t` | Offset to the class index structure. The offset must p…
217 | `lnp_idx_off` | `uint32_t` | Offset to the line number program index structure. The…
219 | `literalarray_idx_off` | `uint32_t` | Offset to the literalarray index structure. The offset
221 | `index_section_off` | `uint32_t` | Offset to the index section. The offset must point to …
[all …]
/arkcompiler/runtime_core/libpandafile/
Dbytecode_instruction-inl.h26 inline auto BytecodeInst<Mode>::ReadHelper(size_t byteoffset, size_t bytecount, size_t offset, size… in ReadHelper() argument
30 size_t right_shift = offset % BYTE_WIDTH; in ReadHelper()
51 template <size_t offset, size_t width, bool is_signed /* = false */>
55 constexpr size_t BYTE_OFFSET = offset / BYTE_WIDTH; in Read()
56 constexpr size_t BYTE_OFFSET_END = (offset + width + BYTE_WIDTH - 1) / BYTE_WIDTH; in Read()
62 return ReadHelper<return_type, storage_type>(BYTE_OFFSET, BYTE_COUNT, offset, width); in Read()
67 inline auto BytecodeInst<Mode>::Read64(size_t offset, size_t width) const in Read64() argument
72 ASSERT((offset % BYTE_WIDTH) + width <= BIT64); in Read64()
74 size_t byteoffset = offset / BYTE_WIDTH; in Read64()
75 size_t byteoffset_end = (offset + width + BYTE_WIDTH - 1) / BYTE_WIDTH; in Read64()
[all …]
Dbytecode_instruction.h95 const uint8_t *GetPointer(int32_t offset) const in GetPointer() argument
98 return pc_ + offset; in GetPointer()
112 T Read(size_t offset) const in Read() argument
115 return *reinterpret_cast<unaligned_type *>(GetPointer(offset)); in Read()
118 void Write(uint32_t value, uint32_t offset, uint32_t width) in Write() argument
120 auto *dst = const_cast<uint8_t *>(GetPointer(offset)); in Write()
122 … LOG(FATAL, PANDAFILE) << "Cannot write value : " << value << "at the dst offset : " << offset; in Write()
126 uint8_t ReadByte(size_t offset) const in ReadByte() argument
128 return Read<uint8_t>(offset); in ReadByte()
146 const uint8_t *GetPointer(int32_t offset) const in GetPointer() argument
[all …]
/arkcompiler/runtime_core/bytecode_optimizer/
Dir_interface.h36 virtual std::string GetMethodIdByOffset(uint32_t offset) const in GetMethodIdByOffset() argument
38 auto it = maps_->methods.find(offset); in GetMethodIdByOffset()
44 virtual std::string GetStringIdByOffset(uint32_t offset) const in GetStringIdByOffset() argument
46 auto it = maps_->strings.find(offset); in GetStringIdByOffset()
52 virtual std::string GetLiteralArrayByOffset(uint32_t offset) const in GetLiteralArrayByOffset() argument
54 auto it = maps_->literalarrays.find(offset); in GetLiteralArrayByOffset()
60 std::optional<std::string> GetLiteralArrayIdByOffset(uint32_t offset) const in GetLiteralArrayIdByOffset() argument
66 auto id = std::to_string(offset); in GetLiteralArrayIdByOffset()
72 virtual std::string GetTypeIdByOffset(uint32_t offset) const in GetTypeIdByOffset() argument
74 auto it = maps_->classes.find(offset); in GetTypeIdByOffset()
[all …]
/arkcompiler/ets_runtime/ecmascript/jspandafile/
Ddebug_info_extractor.h35 uint32_t offset; member
40 return offset < other.offset;
45 uint32_t offset; member
50 return offset < other.offset;
139 currentOffset = lineTable[j].offset; in MatchWithLocation()
140 … uint32_t nextOffset = ((j == lineTable.size() - 1) ? UINT32_MAX : lineTable[j + 1].offset); in MatchWithLocation()
142 if (pair.offset >= currentOffset && pair.offset < nextOffset) { in MatchWithLocation()
144 return cb(JSPtLocation(jsPandaFile_, methodId, pair.offset, url)); in MatchWithLocation()
165 … bool MatchLineWithOffset(const Callback &cb, panda_file::File::EntityId methodId, uint32_t offset) in MatchLineWithOffset() argument
169 … auto iter = std::upper_bound(lineTable.begin(), lineTable.end(), LineTableEntry {offset, 0}); in MatchLineWithOffset()
[all …]
Dmethod_literal.h49 using HaveThisBit = BitField<bool, 0, 1>; // offset 0
50 using HaveNewTargetBit = HaveThisBit::NextFlag; // offset 1
51 using HaveExtraBit = HaveNewTargetBit::NextFlag; // offset 2
52 using HaveFuncBit = HaveExtraBit::NextFlag; // offset 3
53 using NumVregsBits = HaveFuncBit::NextField<uint32_t, VREGS_ARGS_NUM_BITS>; // offset 4-31
54 using NumArgsBits = NumVregsBits::NextField<uint32_t, VREGS_ARGS_NUM_BITS>; // offset 32-59
55 using IsNativeBit = NumArgsBits::NextFlag; // offset 60
56 using IsAotCodeBit = IsNativeBit::NextFlag; // offset 61
57 using IsFastBuiltinBit = IsAotCodeBit::NextFlag; // offset 62
58 using IsFastCallBit = IsFastBuiltinBit::NextFlag; // offset 63
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/assembler/
Dassembler.h138 // +1 skip offset 0 in BindTo()
144 // +1 skip offset 0 in LinkTo()
155 // +1 skip offset 0 in LinkNearPos()
206 void PutI8(size_t offset, int8_t data) in PutI8() argument
208 buffer_.PutU8(offset, static_cast<int8_t>(data)); in PutI8()
211 void PutI32(size_t offset, int32_t data) in PutI32() argument
213 buffer_.PutU32(offset, static_cast<int32_t>(data)); in PutI32()
216 uint32_t GetU32(size_t offset) const in GetU32() argument
218 return buffer_.GetU32(offset); in GetU32()
221 int8_t GetI8(size_t offset) const in GetI8() argument
[all …]
/arkcompiler/ets_frontend/es2panda/compiler/core/
DinlineCache.cpp27 uint32_t InlineCache::Offset(uint32_t slotSize) in Offset() function in panda::es2panda::compiler::InlineCache
29 uint32_t offset = size_ + slotSize; in Offset() local
32 if (offset > LIMIT) { in Offset()
36 size_ = offset; in Offset()
37 return offset; in Offset()
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/
Dpgo_profiler_info.h72 |------------{ offset, size (reserve), number1 }
74 |------------{ offset, size (reserve), number2 }
76 |------------{ offset, size (reserve), number3 }
83 |------------{ offset, size, number4 }
85 …--------{ size1, entityId, count, mode, methodName, [{ size, offset, type }, { size, offset, type …
87 …--------{ size1, entityId, count, mode, methodName, [{ size, offset, type }, { size, offset, type …
93 |--------{ offset, size, number5 }
476 void AddType(uint32_t offset, PGOSampleType type) in AddType() argument
478 auto result = scalarOpTypeInfos_.find(ScalarOpTypeInfo(offset, type)); in AddType()
483 scalarOpTypeInfos_.emplace(offset, type); in AddType()
[all …]
/arkcompiler/ets_runtime/ecmascript/
Dmethod.h422 using HaveThisBit = BitField<bool, 0, 1>; // offset 0
423 using HaveNewTargetBit = HaveThisBit::NextFlag; // offset 1
424 using HaveExtraBit = HaveNewTargetBit::NextFlag; // offset 2
425 using HaveFuncBit = HaveExtraBit::NextFlag; // offset 3
426 using NumVregsBits = HaveFuncBit::NextField<uint32_t, VREGS_ARGS_NUM_BITS>; // offset 4-31
427 using NumArgsBits = NumVregsBits::NextField<uint32_t, VREGS_ARGS_NUM_BITS>; // offset 32-59
428 using IsNativeBit = NumArgsBits::NextFlag; // offset 60
429 using IsAotCodeBit = IsNativeBit::NextFlag; // offset 61
430 using IsFastBuiltinBit = IsAotCodeBit::NextFlag; // offset 62
431 using IsFastCallBit = IsFastBuiltinBit::NextFlag; // offset 63
[all …]
/arkcompiler/runtime_core/compiler/docs/
Dinterface_inline_cache.md27 Cache structure:(offset addr)/(class addr) 32bit/32bit
31 cache:offset/class ---------->| <-|
38 use cache.offset(method) |
41 save method‘s offset to cache >------|
48 2. cache's high 32 save the `offset addr`,cache's low 32 save the `class addr`
59 `offset addr`
60 1. The purpose of `offset addr` is to obtain the `method addr` through calculation.
61 2. `offset addr` = ((`method addr`) - ([`class addr`].`methods_` addr)) / 2 ^ 3
99 4. why `offset addr` divided by 2 ^ 3 at the end of the formula?

12345678910>>...12