Home
last modified time | relevance | path

Searched full:pc (Results 1 – 25 of 174) sorted by relevance

1234567

/arkcompiler/ets_runtime/ecmascript/jspandafile/
Dpanda_file_translator.cpp306 #define ADD_NOP_INST(pc, oldLen, newOpcode) \ argument
311 *(pc + newLen + i) = static_cast<uint8_t>(EcmaOpcode::NOP); \
320 auto pc = const_cast<uint8_t *>(inst.GetAddress()); in FixOpcode() local
326 *pc = static_cast<uint8_t>(EcmaOpcode::MOV_V4_V4); in FixOpcode()
330 *pc = static_cast<uint8_t>(EcmaOpcode::MOV_V8_V8); in FixOpcode()
334 *pc = static_cast<uint8_t>(EcmaOpcode::MOV_V16_V16); in FixOpcode()
341 *pc = static_cast<uint8_t>(newOpcode); in FixOpcode()
343 if (memcpy_s(pc + 1, sizeof(uint16_t), &newId, sizeof(uint16_t)) != EOK) { in FixOpcode()
347 ADD_NOP_INST(pc, oldLen, newOpcode); in FixOpcode()
351 *pc = static_cast<uint8_t>(EcmaOpcode::JMP_IMM8); in FixOpcode()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/
Dinterpreter_stub.h39 GateRef pc { 0 };
45 …return (constpool != 0) && (pc != 0) && (offset != Offset::INVALID) && (length != Length::INVALID); in IsValid()
60 inline GateRef ReadInst4_0(GateRef pc);
61 inline GateRef ReadInst4_1(GateRef pc);
62 inline GateRef ReadInst4_2(GateRef pc);
63 inline GateRef ReadInst4_3(GateRef pc);
64 inline GateRef ReadInst8_0(GateRef pc);
65 inline GateRef ReadInst8_1(GateRef pc);
66 inline GateRef ReadInst8_2(GateRef pc);
67 inline GateRef ReadInst8_3(GateRef pc);
[all …]
Dinterpreter_stub-inl.h37 GateRef InterpreterStubBuilder::ReadInst8_0(GateRef pc) in ReadInst8_0() argument
39 return Load(VariableType::INT8(), pc, IntPtr(1)); // 1 : skip 1 byte of bytecode in ReadInst8_0()
42 GateRef InterpreterStubBuilder::ReadInst8_1(GateRef pc) in ReadInst8_1() argument
44 return Load(VariableType::INT8(), pc, IntPtr(2)); // 2 : skip 1 byte of bytecode in ReadInst8_1()
47 GateRef InterpreterStubBuilder::ReadInst8_2(GateRef pc) in ReadInst8_2() argument
49 return Load(VariableType::INT8(), pc, IntPtr(3)); // 3 : skip 1 byte of bytecode in ReadInst8_2()
52 GateRef InterpreterStubBuilder::ReadInst8_3(GateRef pc) in ReadInst8_3() argument
54 return Load(VariableType::INT8(), pc, IntPtr(4)); // 4 : skip 1 byte of bytecode in ReadInst8_3()
57 GateRef InterpreterStubBuilder::ReadInst8_4(GateRef pc) in ReadInst8_4() argument
59 return Load(VariableType::INT8(), pc, IntPtr(5)); // 5 : skip 1 byte of bytecode in ReadInst8_4()
[all …]
Dinterpreter_stub.cpp42 GateRef pc = PtrArgument(static_cast<size_t>(InterpreterHandlerInputs::PC)); \
51 GenerateCircuitImpl(glue, sp, pc, constpool, profileTypeInfo, acc, hotnessCounter); \
53 void name##StubBuilder::GenerateCircuitImpl(GateRef glue, GateRef sp, GateRef pc, \
63 // Dispatch(glue, sp, pc, constpool, profileTypeInfo, acc, hotnessCounter, offset)
67 // Dispatch(glue, sp, pc, constpool, profileTypeInfo, *varAcc, hotnessCounter, offset)
71 // Dispatch(glue, sp, pc, constpool, *varProfileTypeInfo, acc, *varHotnessCounter, offset)
80 Dispatch(glue, sp, pc, constpool, __VA_ARGS__)
90 DispatchLast(glue, sp, pc, constpool, profileTypeInfo, acc, hotnessCounter) \
93 DispatchLast(glue, sp, pc, constpool, profileTypeInfo, *varAcc, hotnessCounter) \
108 CheckException(glue, sp, pc, constpool, profileTypeInfo, acc, hotnessCounter, \
[all …]
Dbytecodes.h179 static BytecodeMetaData InitBytecodeMetaData(const uint8_t *pc);
237 static EcmaOpcode GetOpcode(const uint8_t *pc) in GetOpcode() argument
239 uint8_t primary = ReadByte(pc); in GetOpcode()
241 uint8_t secondary = ReadByte1(pc); in GetOpcode()
247 BytecodeMetaData GetBytecodeMetaData(const uint8_t *pc) const in GetBytecodeMetaData() argument
249 uint8_t primary = ReadByte(pc); in GetBytecodeMetaData()
251 uint8_t secondary = ReadByte1(pc); in GetBytecodeMetaData()
267 static uint8_t ReadByte(const uint8_t *pc) in ReadByte() argument
269 return *pc; in ReadByte()
271 static uint8_t ReadByte1(const uint8_t *pc) in ReadByte1() argument
[all …]
/arkcompiler/runtime_core/runtime/interpreter/
Dcache.h26 bool Has(const void *pc, Method *caller) const in Has() argument
28 const auto &entry = data_[GetIndex(pc)]; in Has()
29 return entry.pc == pc && entry.caller == caller; in Has()
33 T *Get(const void *pc, Method *caller) const in Get() argument
35 if (UNLIKELY(!Has(pc, caller))) { in Get()
38 return static_cast<T *>(data_[GetIndex(pc)].item); in Get()
42 void Set(const void *pc, T *item, Method *caller) in Set() argument
44 data_[GetIndex(pc)] = {pc, item, caller}; in Set()
53 static size_t GetIndex(const void *pc) in GetIndex() argument
55 return panda::helpers::math::PowerOfTwoTableSlot(reinterpret_cast<size_t>(pc), N, 2U); in GetIndex()
[all …]
Dstate.h92 …ALWAYS_INLINE inline State(ManagedThread *thread, const uint8_t *pc, Frame *frame) : StateIface(fr… in State() argument
94 SetInst(BytecodeInstruction(pc)); in State()
99 ALWAYS_INLINE inline void UpdateState(const uint8_t *pc, Frame *frame) in UpdateState() argument
101 SetInst(BytecodeInstruction(pc)); in UpdateState()
177 …ALWAYS_INLINE inline State(ManagedThread *thread, const uint8_t *pc, Frame *frame) : StateIface(fr… in State() argument
179 SetInst(BytecodeInstruction(pc)); in State()
184 ALWAYS_INLINE inline void UpdateState(const uint8_t *pc, Frame *frame) in UpdateState() argument
186 SetInst(BytecodeInstruction(pc)); in UpdateState()
Dinstruction_handler_base.h114 auto pc = GetBytecodeOffset(); in UpdateBytecodeOffset() local
115 GetFrame()->SetBytecodeOffset(pc); in UpdateBytecodeOffset()
116 return pc; in UpdateBytecodeOffset()
124 auto pc = UpdateBytecodeOffset(); in InstrumentInstruction() local
125 …IfaceT::GetNotificationManager()->BytecodePcChangedEvent(GetThread(), GetFrame()->GetMethod(), pc); in InstrumentInstruction()
236 ALWAYS_INLINE void JumpTo(const uint8_t *pc) in JumpTo() argument
238 SetInst(BytecodeInstruction(pc)); in JumpTo()
316 auto pc = this->GetBytecodeOffset(); in UpdateBranchStatistics() local
318 prof_data->UpdateBranchTaken(pc); in UpdateBranchStatistics()
320 prof_data->UpdateBranchNotTaken(pc); in UpdateBranchStatistics()
/arkcompiler/runtime_core/compiler/optimizer/ir/
Daot_data.cpp25 intptr_t AotData::GetSharedSlowPathOffset(RuntimeInterface::EntrypointId id, uintptr_t pc) const in GetSharedSlowPathOffset()
31 return offset - (code_address_ + pc + CodeInfo::GetCodeOffset(graph_->GetArch())); in GetSharedSlowPathOffset()
34 void AotData::SetSharedSlowPathOffset(RuntimeInterface::EntrypointId id, uintptr_t pc) in SetSharedSlowPathOffset() argument
36 …slow_path_data_->SetSharedSlowPathOffset(id, code_address_ + pc + CodeInfo::GetCodeOffset(graph_->… in SetSharedSlowPathOffset()
39 intptr_t AotData::GetEntrypointOffset(uint64_t pc, int32_t slot_id) const in GetEntrypointOffset() argument
45 // Decrement by sum of method code start address and current pc in GetEntrypointOffset()
46 offset -= (code_address_ + pc); in GetEntrypointOffset()
52 intptr_t AotData::GetPltSlotOffset(uint64_t pc, uint32_t method_id) in GetPltSlotOffset() argument
62 return GetEntrypointOffset(pc, slot_id); in GetPltSlotOffset()
65 intptr_t AotData::GetVirtIndexSlotOffset(uint64_t pc, uint32_t method_id) in GetVirtIndexSlotOffset() argument
[all …]
Daot_data.h78 intptr_t GetEntrypointOffset(uint64_t pc, int32_t slot_id) const;
79 intptr_t GetSharedSlowPathOffset(RuntimeInterface::EntrypointId id, uintptr_t pc) const;
80 void SetSharedSlowPathOffset(RuntimeInterface::EntrypointId id, uintptr_t pc);
81 intptr_t GetPltSlotOffset(uint64_t pc, uint32_t method_id);
82 intptr_t GetVirtIndexSlotOffset(uint64_t pc, uint32_t method_id);
83 intptr_t GetClassSlotOffset(uint64_t pc, uint32_t klass_id, bool init);
84 intptr_t GetStringSlotOffset(uint64_t pc, uint32_t string_id);
85 uint64_t GetInfInlineCacheSlotOffset(uint64_t pc, uint64_t index);
/arkcompiler/runtime_core/compiler/optimizer/ir_builder/
Dir_builder.h41 uint32_t pc {};
102 void CreateBlock(size_t pc) in CreateBlock() argument
104 if (blocks_[pc] == nullptr) { in CreateBlock()
105 blocks_[pc] = GetGraph()->CreateEmptyBlock(); in CreateBlock()
106 blocks_[pc]->SetGuestPc(pc); in CreateBlock()
110 BasicBlock *GetBlockForPc(size_t pc) in GetBlockForPc() argument
112 return blocks_[pc]; in GetBlockForPc()
115 BasicBlock *GetPrevBlockForPc(size_t pc) in GetPrevBlockForPc() argument
118 ASSERT(pc > 0); in GetPrevBlockForPc()
119 pc--; in GetPrevBlockForPc()
[all …]
Dir_builder.cpp140 auto pc = inst_builder->GetPc(inst.GetAddress()); in BuildInstructionsForBB() local
141 …// Break if current pc is pc of some basic block, that means that it is the end of the current blo… in BuildInstructionsForBB()
142 if (pc != bb->GetGuestPc() && GetBlockForPc(pc) != nullptr) { in BuildInstructionsForBB()
217 auto pc = instructions.GetPc(inst); in BuildBasicBlocks() local
220 CreateBlock(pc); in BuildBasicBlocks()
225 auto target_pc = pc + static_cast<size_t>(offset); in BuildBasicBlocks()
241 void IrBuilder::EnumerateTryBlocksCoveredPc(uint32_t pc, const Callback &callback) in EnumerateTryBlocksCoveredPc() argument
244 if (begin_pc <= pc && pc < try_block.boundaries.end_pc) { in EnumerateTryBlocksCoveredPc()
286 auto pc = catch_block.GetHandlerPc(); in CreateTryCatchBoundariesBlocks() local
287 catches_pc_.insert(pc); in CreateTryCatchBoundariesBlocks()
[all …]
/arkcompiler/runtime_core/irtoc/scripts/
Dinterpreter.irt19 arm32: { dispatch: 12, pc: 4, frame: 8 },
20 arm64: { dispatch: 24, pc: 20, frame: 23 },
21 x86_64: { dispatch: 8, pc: 4, frame: 5 },
208 macro(:readbyte) do |pc, offset|
209 LoadI(pc).Imm(offset).u8
214 imm := readbyte(pc, offset).u32
217 imm := readbyte(pc, offset).u8
224 imm:= readbyte(pc, offset).i32
228 imm:= readbyte(pc, offset).i8
235 imm:= readbyte(pc, offset).u32
[all …]
/arkcompiler/runtime_core/runtime/jit/
Dprofiling_data.h47 void Init(uintptr_t pc) in Init() argument
49 SetBytecodePc(pc); in Init()
89 void SetBytecodePc(uintptr_t pc) in SetBytecodePc() argument
93 bytecode_pc_.store(pc, std::memory_order_release); in SetBytecodePc()
153 void Init(uintptr_t pc) in Init() argument
156 pc_.store(pc, std::memory_order_relaxed); in Init()
211 CallSiteInlineCache *FindInlineCache(uintptr_t pc) in FindInlineCache() argument
214 auto ic = std::lower_bound(ics.begin(), ics.end(), pc, in FindInlineCache()
216 return (ic == ics.end() || ic->GetBytecodePc() != pc) ? nullptr : &*ic; in FindInlineCache()
219 void UpdateInlineCaches(uintptr_t pc, Class *cls) in UpdateInlineCaches() argument
[all …]
/arkcompiler/runtime_core/libpandabase/os/
Dstacktrace.cpp105 void PrintFrame(size_t frame_num, uintptr_t pc, std::ostream &out) in PrintFrame() argument
109 out << "#" << std::setw(2U) << std::left << frame_num << ": 0x" << std::hex << pc << " "; in PrintFrame()
113 VmaEntry *vma = FindVma(pc); in PrintFrame()
117 vma = FindVma(pc); in PrintFrame()
120 uintptr_t pc_offset = pc - vma->start_addr + vma->offset; in PrintFrame()
121 // pc points to the instruction after the call in PrintFrame()
122 // Decrement pc to get source line number pointing to the function call in PrintFrame()
132 if (ReadSymbol(pc, &function, &offset)) { in PrintFrame()
171 bool ReadSymbol(uintptr_t pc, std::string *function, uintptr_t *offset) in ReadSymbol() argument
174 if (dladdr(reinterpret_cast<void *>(pc), &info) != 0 && info.dli_sname != nullptr) { in ReadSymbol()
[all …]
Ddebug_info.cpp232 bool DebugInfo::GetSrcLocation(uintptr_t pc, std::string *function, std::string *src_file, uint32_t… in GetSrcLocation() argument
240 // Mapping pc to function is to find the compilation unit DIE and then find the subprogram DIE. in GetSrcLocation()
243 // compilation unit and find the corresponding line and file which matches the pc. in GetSrcLocation()
247 Range range(pc, pc); in GetSrcLocation()
249 if (it == ranges_.end() || !it->Contain(pc)) { in GetSrcLocation()
251 if (!FindCompUnitByPc(pc, &cu_die)) { in GetSrcLocation()
264 if (it == ranges_.end() || !it->Contain(pc)) { in GetSrcLocation()
271 GetSrcFileAndLine(pc, it->GetCu()->GetLineContext(), src_file, line); in GetSrcLocation()
275 bool DebugInfo::FindCompUnitByPc(uintptr_t pc, Dwarf_Die *cu_die) in FindCompUnitByPc() argument
280 if (dwarf_get_arange(aranges_, arange_count_, pc, &arange, nullptr) == DW_DLV_OK && in FindCompUnitByPc()
[all …]
Ddebug_info.h41 * Find location (name, source file, line) of the specified pc in source code
43 bool GetSrcLocation(uintptr_t pc, std::string *function, std::string *src_file, uint32_t *line);
155 bool FindCompUnitByPc(uintptr_t pc, Dwarf_Die *cu_die);
160 …bool GetSrcFileAndLine(uintptr_t pc, Dwarf_Line_Context line_ctx, std::string *src_file, uint32_t …
161 Dwarf_Line GetLastLineWithPc(Dwarf_Addr pc, Span<Dwarf_Line>::ConstIterator it,
164 bool PcMatches(uintptr_t pc, Dwarf_Die die);
166 …bool GetDieRangeForPc(uintptr_t pc, Dwarf_Die die, Dwarf_Addr *out_low_pc, Dwarf_Addr *out_high_pc…
167 …bool FindRangeForPc(uintptr_t pc, const Span<Dwarf_Ranges> &ranges, Dwarf_Addr base_addr, Dwarf_Ad…
/arkcompiler/runtime_core/verification/cflow/
Dexception_source_map.h26 bool PutExceptionSource(const void *pc) in PutExceptionSource() argument
28 return Map_.Mark(pc, pc); in PutExceptionSource()
38 bool ClearExceptionSource(const void *pc) in ClearExceptionSource() argument
40 return Map_.Clear(pc, pc); in ClearExceptionSource()
59 bool IsExceptionSource(const void *pc) const in IsExceptionSource() argument
61 return Map_.HasMark(pc); in IsExceptionSource()
Dcflow_info.cpp47 …[&inst_map, &exc_src_map]([[maybe_unused]] auto typ, const uint8_t *pc, size_t sz, bool exception_… in FillInstructionsMap()
49 if (!inst_map.PutInstruction(pc, sz)) { in FillInstructionsMap()
50 … LOG_VERIFIER_CFLOW_INVALID_INSTRUCTION(OffsetAsHexStr(inst_map.AddrStart<void *>(), pc)); in FillInstructionsMap()
53 if (exception_source && !exc_src_map.PutExceptionSource(pc)) { in FillInstructionsMap()
54 … LOG_VERIFIER_CFLOW_INVALID_INSTRUCTION(OffsetAsHexStr(inst_map.AddrStart<void *>(), pc)); in FillInstructionsMap()
57 … const uint8_t *next_inst_pc = &pc[sz]; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) in FillInstructionsMap()
75 …_ptr, &inst_map, &jumps_map, last_inst_type_ptr](InstructionType typ, const uint8_t *pc, size_t sz, in FillJumpsMapAndGetLastInstructionType()
78 … const uint8_t *next_inst_pc = &pc[sz]; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) in FillJumpsMapAndGetLastInstructionType()
83 OffsetAsHexStr(inst_map.AddrStart<void *>(), pc)); in FillJumpsMapAndGetLastInstructionType()
86 if (!jumps_map.PutJump(pc, target)) { in FillJumpsMapAndGetLastInstructionType()
[all …]
/arkcompiler/runtime_core/docs/
Ddeoptimization.md25 3. create StateStamp(in compile time) for this address(np - native pc)
32 The function `Deoptimize` calculates bitecode pc where we should start executing code in the interp…
46 DeoptimizeAfterIFrame(thread, pc, iframe, cframe, last_iframe);
48 DeoptimizeAfterCFrame(thread, pc, iframe, cframe, last_iframe);
69 * bytecode pc of the entry
92 * bytecode pc of the entry
96 …compiled_frame_`(saves false) fields in the thread register and calls interpreter from bytecode pc.
97 … inlined method, we call interpreter for all inlined methods from bytecode pc which is taken from …
103 int64_t InvokeInterpreter(ManagedThread* thread, const uint8_t* pc, Frame* frame, Frame* last_frame…
107 interpreter::Execute(thread, pc, frame, thread->HasPendingException());
[all …]
/arkcompiler/ets_runtime/ecmascript/interpreter/
Dinterpreter_assembly.cpp64pc += (offset); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-macr…
90 #define SAVE_PC() (GET_ASM_FRAME(sp)->pc = pc) // NOLINT(cppcoreguidelines-pro-bounds-pointer-arit…
110 ASSERT(prevState->callSize == GetJumpSizeAfterCall(pc)); \
153 #define READ_INST_8(offset) (*(pc + (offset)))
211 entryState->pc = nullptr; in InitStackFrame()
261 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleMovV4V4() argument
273 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleMovV8V8() argument
285 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleMovV16V16() argument
297 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleLdaStrId16() argument
307 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleJmpImm8() argument
[all …]
/arkcompiler/runtime_core/runtime/
Ddeoptimization.cpp30 * @param pc PC from which interpreter starts execution
38 extern "C" [[noreturn]] void DeoptimizeAfterCFrame(ManagedThread *thread, const uint8_t *pc, Frame …
43 * @param pc PC from which interpreter starts execution
51 extern "C" [[noreturn]] void DeoptimizeAfterIFrame(ManagedThread *thread, const uint8_t *pc, Frame …
114 [[noreturn]] NO_ADDRESS_SANITIZE void Deoptimize(StackWalker *stack, const uint8_t *pc, bool has_ex… in InvalidateCompiledEntryPoint() argument
126 if (pc == nullptr) { in InvalidateCompiledEntryPoint()
129 pc = stack->GetMethod()->GetInstructions() + stack->GetBytecodePc(); in InvalidateCompiledEntryPoint()
175pc - stack->GetMethod()->GetInstructions(), events::DeoptimizationAfter::CFRAME); in InvalidateCompiledEntryPoint()
191 DeoptimizeAfterCFrame(thread, pc, iframe, cframe.GetFrameOrigin(), last_iframe, in InvalidateCompiledEntryPoint()
196 pc - stack->GetMethod()->GetInstructions(), in InvalidateCompiledEntryPoint()
[all …]
Ddeoptimization.h26 …* @param pc PC from which interpreter starts execution, if nullptr, pc is got from deoptimized …
29 [[noreturn]] void Deoptimize(StackWalker *stack, const uint8_t *pc, bool has_exception = false,
/arkcompiler/runtime_core/runtime/arch/arm/
Dinterpreter_support.S21 * r1 PC
36 * Using CFI opcode to get the interpreter PC from
46 * 4 the register which store interpreter PC
52 pop {r4, pc}
/arkcompiler/runtime_core/runtime/bridge/
Dbridge.cpp68 * specific pc. Note, that it releases input interpreter's frame at the exit.
70 extern "C" int64_t InvokeInterpreter(ManagedThread *thread, const uint8_t *pc, Frame *frame, Frame … in InvokeInterpreter() argument
77 interpreter::Execute(thread, pc, frame, thread->HasPendingException()); in InvokeInterpreter()
100 pc = frame->GetMethod()->GetInstructions() + frame->GetBytecodeOffset(); in InvokeInterpreter()
102 auto bc_inst = BytecodeInstruction(pc); in InvokeInterpreter()
112 pc = bc_inst.GetNext().GetAddress(); in InvokeInterpreter()
116 interpreter::Execute(thread, pc, frame, thread->HasPendingException()); in InvokeInterpreter()

1234567