Home
last modified time | relevance | path

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

12345

/arkcompiler/ets_runtime/ecmascript/jspandafile/
Dpanda_file_translator.cpp301 #define ADD_NOP_INST(pc, oldLen, newOpcode) \ argument
306 *(pc + newLen + i) = static_cast<uint8_t>(EcmaOpcode::NOP); \
315 auto pc = const_cast<uint8_t *>(inst.GetAddress()); in FixOpcode() local
321 *pc = static_cast<uint8_t>(EcmaOpcode::MOV_V4_V4); in FixOpcode()
325 *pc = static_cast<uint8_t>(EcmaOpcode::MOV_V8_V8); in FixOpcode()
329 *pc = static_cast<uint8_t>(EcmaOpcode::MOV_V16_V16); in FixOpcode()
336 *pc = static_cast<uint8_t>(newOpcode); in FixOpcode()
338 if (memcpy_s(pc + 1, sizeof(uint16_t), &newId, sizeof(uint16_t)) != EOK) { in FixOpcode()
342 ADD_NOP_INST(pc, oldLen, newOpcode); in FixOpcode()
346 *pc = static_cast<uint8_t>(EcmaOpcode::JMP_IMM8); in FixOpcode()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/
Dinterpreter_stub.h40 GateRef pc { 0 };
46 …return (constpool != 0) && (pc != 0) && (offset != Offset::INVALID) && (length != Length::INVALID); in IsValid()
61 inline GateRef ReadInst4_0(GateRef pc);
62 inline GateRef ReadInst4_1(GateRef pc);
63 inline GateRef ReadInst4_2(GateRef pc);
64 inline GateRef ReadInst4_3(GateRef pc);
65 inline GateRef ReadInst8_0(GateRef pc);
66 inline GateRef ReadInst8_1(GateRef pc);
67 inline GateRef ReadInst8_2(GateRef pc);
68 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.cpp44 GateRef pc = PtrArgument(static_cast<size_t>(InterpreterHandlerInputs::PC)); \
54 GenerateCircuitImpl(glue, sp, pc, constpool, profileTypeInfo, acc, hotnessCounter, callback); \
58 void name##StubBuilder::GenerateCircuitImpl(GateRef glue, GateRef sp, GateRef pc, \
65 …[this, glue, sp, pc, profileTypeInfo](const std::initializer_list<GateRef> &values, OperationType …
67 …profiler.PGOProfiler(glue, pc, GetFunctionFromFrame(GetFrame(sp)), profileTypeInfo, values, type);…
85 // Dispatch(glue, sp, pc, constpool, profileTypeInfo, acc, hotnessCounter, offset)
89 // Dispatch(glue, sp, pc, constpool, profileTypeInfo, *varAcc, hotnessCounter, offset)
93 // Dispatch(glue, sp, pc, constpool, *varProfileTypeInfo, acc, *varHotnessCounter, offset)
102 Dispatch(glue, sp, pc, constpool, __VA_ARGS__)
112 DispatchLast(glue, sp, pc, constpool, profileTypeInfo, acc, hotnessCounter) \
[all …]
Dprofiler_stub_builder.cpp23 void ProfilerStubBuilder::PGOProfiler(GateRef glue, GateRef pc, GateRef func, GateRef profileTypeIn… in PGOProfiler() argument
28 ProfileCall(glue, pc, func, values[0]); in PGOProfiler()
31 ProfileOpType(glue, pc, func, profileTypeInfo, values[0]); in PGOProfiler()
34 ProfileDefineClass(glue, pc, func, values[0]); in PGOProfiler()
37 ProfileCreateObject(glue, pc, func, values[0]); in PGOProfiler()
40 ProfileObjLayout(glue, pc, func, values[0], Int32(1)); in PGOProfiler()
43 ProfileObjLayout(glue, pc, func, values[0], Int32(0)); in PGOProfiler()
50 void ProfilerStubBuilder::ProfileOpType(GateRef glue, GateRef pc, GateRef func, GateRef profileType… in ProfileOpType() argument
65 GateRef offset = TruncPtrToInt32(PtrSub(pc, firstPC)); in ProfileOpType()
76 GateRef slotId = ZExtInt8ToInt32(Load(VariableType::INT8(), pc, IntPtr(1))); in ProfileOpType()
[all …]
Dprofiler_stub_builder.h32 void PGOProfiler(GateRef glue, GateRef pc, GateRef func, GateRef profileTypeInfo,
34 void ProfileCall(GateRef glue, GateRef pc, GateRef func, GateRef target);
35 … void ProfileOpType(GateRef glue, GateRef pc, GateRef func, GateRef profileTypeInfo, GateRef type);
36 void ProfileDefineClass(GateRef glue, GateRef pc, GateRef func, GateRef constructor);
37 void ProfileCreateObject(GateRef glue, GateRef pc, GateRef func, GateRef newObj);
38 void ProfileObjLayout(GateRef glue, GateRef pc, GateRef func, GateRef object, GateRef store);
Dbytecodes.h230 static BytecodeMetaData InitBytecodeMetaData(const uint8_t *pc);
288 static EcmaOpcode GetOpcode(const uint8_t *pc) in GetOpcode() argument
290 uint8_t primary = ReadByte(pc); in GetOpcode()
292 uint8_t secondary = ReadByte1(pc); in GetOpcode()
298 BytecodeMetaData GetBytecodeMetaData(const uint8_t *pc) const in GetBytecodeMetaData() argument
300 uint8_t primary = ReadByte(pc); in GetBytecodeMetaData()
302 uint8_t secondary = ReadByte1(pc); in GetBytecodeMetaData()
361 static uint8_t ReadByte(const uint8_t *pc) in ReadByte() argument
363 return *pc; in ReadByte()
365 static uint8_t ReadByte1(const uint8_t *pc) in ReadByte1() argument
[all …]
Dbytecodes.cpp20 BytecodeMetaData BytecodeMetaData::InitBytecodeMetaData(const uint8_t *pc) in InitBytecodeMetaData() argument
22 BytecodeInstruction inst(pc); in InitBytecodeMetaData()
419 for (uint8_t pc = 0; pc <= static_cast<uint8_t>(Bytecodes::LAST_OPCODE); pc++) { in Bytecodes() local
420 auto info = BytecodeMetaData::InitBytecodeMetaData(&pc); in Bytecodes()
421 bytecodes_[pc] = info; in Bytecodes()
424 for (uint8_t pc = 0; pc <= last; pc++) { in Bytecodes() local
425 std::array<uint8_t, 2> bytecode{CALLRUNTIME_PREFIX_OPCODE_INDEX, pc}; // 2: 2 opcode in Bytecodes()
427 callRuntimeBytecodes_[pc] = info; in Bytecodes()
430 for (uint8_t pc = 0; pc <= last; pc++) { in Bytecodes() local
431 std::array<uint8_t, 2> bytecode{DEPRECATED_PREFIX_OPCODE_INDEX, pc}; // 2: 2 opcode in Bytecodes()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/ir_builder/
Dir_builder.h41 uint32_t pc {};
100 void CreateBlock(size_t pc) in CreateBlock() argument
102 if (blocks_[pc] == nullptr) { in CreateBlock()
103 blocks_[pc] = GetGraph()->CreateEmptyBlock(); in CreateBlock()
104 blocks_[pc]->SetGuestPc(pc); in CreateBlock()
108 BasicBlock *GetBlockForPc(size_t pc) in GetBlockForPc() argument
110 return blocks_[pc]; in GetBlockForPc()
113 BasicBlock *GetPrevBlockForPc(size_t pc) in GetPrevBlockForPc() argument
116 ASSERT(pc > 0); in GetPrevBlockForPc()
117 pc--; in GetPrevBlockForPc()
[all …]
Dir_builder.cpp132 auto pc = inst_builder->GetPc(inst.GetAddress()); in BuildInstructionsForBB() local
133 …// Break if current pc is pc of some basic block, that means that it is the end of the current blo… in BuildInstructionsForBB()
134 if (pc != bb->GetGuestPc() && GetBlockForPc(pc) != nullptr) { in BuildInstructionsForBB()
206 auto pc = instructions.GetPc(inst); in BuildBasicBlocks() local
209 CreateBlock(pc); in BuildBasicBlocks()
214 auto target_pc = pc + static_cast<size_t>(offset); in BuildBasicBlocks()
230 void IrBuilder::EnumerateTryBlocksCoveredPc(uint32_t pc, const Callback &callback) in EnumerateTryBlocksCoveredPc() argument
233 if (begin_pc <= pc && pc < try_block.boundaries.end_pc) { in EnumerateTryBlocksCoveredPc()
275 auto pc = catch_block.GetHandlerPc(); in CreateTryCatchBoundariesBlocks() local
276 catches_pc_.insert(pc); in CreateTryCatchBoundariesBlocks()
[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.h42 * Find location (name, source file, line) of the specified pc in source code
44 bool GetSrcLocation(uintptr_t pc, std::string *function, std::string *src_file, uint32_t *line);
156 bool FindCompUnitByPc(uintptr_t pc, Dwarf_Die *cu_die);
161 …bool GetSrcFileAndLine(uintptr_t pc, Dwarf_Line_Context line_ctx, std::string *src_file, uint32_t …
162 Dwarf_Line GetLastLineWithPc(Dwarf_Addr pc, Span<Dwarf_Line>::ConstIterator it,
165 bool PcMatches(uintptr_t pc, Dwarf_Die die);
167 …bool GetDieRangeForPc(uintptr_t pc, Dwarf_Die die, Dwarf_Addr *out_low_pc, Dwarf_Addr *out_high_pc…
168 …bool FindRangeForPc(uintptr_t pc, const Span<Dwarf_Ranges> &ranges, Dwarf_Addr base_addr, Dwarf_Ad…
/arkcompiler/ets_runtime/ecmascript/interpreter/
Dinterpreter_assembly.cpp61pc += (offset); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-macr…
87 #define SAVE_PC() (GET_ASM_FRAME(sp)->pc = pc) // NOLINT(cppcoreguidelines-pro-bounds-pointer-arit…
107 ASSERT(prevState->callSize == GetJumpSizeAfterCall(pc)); \
150 #define READ_INST_8(offset) (*(pc + (offset)))
217 entryState->pc = nullptr; in InitStackFrameForSP()
279 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleMovV4V4() argument
291 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleMovV8V8() argument
303 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleMovV16V16() argument
315 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleLdaStrId16() argument
326 …JSThread *thread, const uint8_t *pc, JSTaggedType *sp, JSTaggedValue constpool, JSTaggedValue prof… in HandleJmpImm8() argument
[all …]
Dframe_handler.h56 inline static bool IsEntryFrame(const uint8_t *pc) in IsEntryFrame() argument
58 return pc == nullptr; in IsEntryFrame()
64 …ure of InterpretedFrame, AsmInterpretedFrame, InterpretedEntryFrame is the same, order is pc, base. in IsEntryFrame()
216 void DumpPC(std::ostream &os, const uint8_t *pc) const;
217 void DumpPC(const uint8_t *pc) const in DumpPC() argument
219 DumpPC(std::cout, pc); in DumpPC()
/arkcompiler/runtime_core/bytecode_optimizer/
Druntime_adapter.h157 bool IsPcBindType(int32_t pc) const override in IsPcBindType() argument
159 return pc_type_map_.find(pc) != pc_type_map_.end(); in IsPcBindType()
162 bool FillInstIdTypePairByPc(size_t id, int32_t pc) override in FillInstIdTypePairByPc() argument
164 const auto it = pc_type_map_.find(pc); in FillInstIdTypePairByPc()
177 bool AddPcTypePair(int32_t pc, TypeInfoIndex type) override in AddPcTypePair() argument
179 if (pc_type_map_.find(pc) != pc_type_map_.end()) { in AddPcTypePair()
182 pc_type_map_.emplace(pc, type); in AddPcTypePair()
190 for (const auto &[pc, type] : pc_type_map_) { in FillArgTypePairs()
191 if (pc < 0) { in FillArgTypePairs()
192 map->emplace(pc, type); in FillArgTypePairs()
Dir_interface.h93 size_t GetLineNumberByPc(size_t pc) const in GetLineNumberByPc() argument
95 if (pc == compiler::INVALID_PC || pc_ins_map_.size() == 0) { in GetLineNumberByPc()
98 auto iter = pc_ins_map_.find(pc); in GetLineNumberByPc()
105 uint32_t GetColumnNumberByPc(size_t pc) const in GetColumnNumberByPc() argument
107 if (pc == compiler::INVALID_PC || pc_ins_map_.size() == 0) { in GetColumnNumberByPc()
110 auto iter = pc_ins_map_.find(pc); in GetColumnNumberByPc()
/arkcompiler/ets_runtime/ecmascript/dfx/cpu_profiler/
Dcpu_profiler.cpp406 uint64_t pc = 0; in GetStackSignalHandler() local
417 pc = GetPcFromContext(context); in GetStackSignalHandler()
419 if (thread->IsAsmInterpreter() && profiler->IsAddrAtStubOrAot(pc) && in GetStackSignalHandler()
420 !profiler->IsEntryFrameHeaderOrTail(thread, pc)) { in GetStackSignalHandler()
470 bool CpuProfiler::InHeaderOrTail(uint64_t pc, uint64_t entryBegin, uint64_t entryDuration, uint64_t… in InHeaderOrTail() argument
474 if (pc >= entryBegin && pc <= (entryBegin + headerSize)) { in InHeaderOrTail()
477 if (pc <= entryEnd && pc >= (entryEnd - tailSize)) { in InHeaderOrTail()
483 bool CpuProfiler::IsEntryFrameHeaderOrTail(JSThread *thread, uint64_t pc) const in IsEntryFrameHeaderOrTail()
490 … bool inAsmInterpreterEntry = InHeaderOrTail(pc, entryBegin, entryDuration, headerSize, tailSize); in IsEntryFrameHeaderOrTail()
492 …bool inGeneratorReEnterAsmInterp = InHeaderOrTail(pc, entryBegin, entryDuration, headerSize, tailS… in IsEntryFrameHeaderOrTail()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/aot_file/
Dan_file_data_manager.cpp166 bool AnFileDataManager::SafeInsideStub(uintptr_t pc) in SafeInsideStub() argument
176 if (pc >= stubStartAddr && pc <= stubEndAddr) { in SafeInsideStub()
182 if (curDes.ContainCode(pc)) { in SafeInsideStub()
190 bool AnFileDataManager::SafeInsideAOT(uintptr_t pc) in SafeInsideAOT() argument
196 if (curDes.ContainCode(pc)) { in SafeInsideAOT()
/arkcompiler/ets_runtime/ecmascript/
Dmethod.cpp72 uint32_t Method::FindCatchBlock(uint32_t pc) const in FindCatchBlock()
80 cda.EnumerateTryBlocks([&pcOffset, pc](panda_file::CodeDataAccessor::TryBlock &tryBlock) { in FindCatchBlock()
81 … if ((tryBlock.GetStartPc() <= pc) && ((tryBlock.GetStartPc() + tryBlock.GetLength()) > pc)) { in FindCatchBlock()
/arkcompiler/runtime_core/libpandafile/
Dbytecode_instruction.h91 explicit BytecodeInstBase(const uint8_t *pc) : pc_ {pc} {} in BytecodeInstBase() argument
139 explicit BytecodeInstBase(const uint8_t *pc, const uint8_t *from, const uint8_t *to) in BytecodeInstBase() argument
140 : pc_ {pc}, from_ {from}, to_ {to}, valid_ {true} in BytecodeInstBase()
233 explicit BytecodeInst(const uint8_t *pc) : Base {pc} in BytecodeInst() argument
238 …explicit BytecodeInst(const uint8_t *pc, const uint8_t *from, const uint8_t *to) : Base {pc, from,… in BytecodeInst() argument
/arkcompiler/ets_runtime/ecmascript/compiler/trampoline/aarch64/
Dasm_interpreter_call.cpp178 // Reload pc to make sure stack trace is right in JSCallCommonEntry()
631 // ResumeRspAndDispatch(uintptr_t glue, uintptr_t sp, uintptr_t pc, uintptr_t constantPool,
636 // X20 - pc
649 Register pc(X20); in ResumeRspAndDispatch() local
674 __ Add(pc, pc, Operand(jumpSizeRegister, LSL, 0)); in ResumeRspAndDispatch()
675 __ Ldrb(opcode, MemoryOperand(pc, 0)); in ResumeRspAndDispatch()
695 __ Sub(pc, pc, jumpSizeRegister); // sub negative jmupSize in ResumeRspAndDispatch()
696 __ Ldrb(opcode, MemoryOperand(pc, 0)); in ResumeRspAndDispatch()
718 __ Sub(pc, pc, jumpSizeRegister); // sub negative jmupSize in ResumeRspAndDispatch()
719 __ Ldrb(opcode, MemoryOperand(pc, 0)); in ResumeRspAndDispatch()
[all …]
/arkcompiler/runtime_core/docs/
Dirtoc.md28 All property setters that IrConstructor provides (`i64`, `bool`, `Pc`, `CC`, etc) are
31 var = Add(input1, input2).i64.CC(:CC_GE).pc(123)
44 var = Add(input1, input2).i64.CC(:CC_GE).pc(123)
49 Return(Add(input1, input2).i64.CC(:CC_GE).pc(123)).i64
/arkcompiler/ets_runtime/ecmascript/dfx/stackinfo/
Djs_stackinfo.cpp177 uintptr_t pc = uctx->uc_mcontext.pc; in CrashCallback() local
179 // 1. check pc is between ark code heap in CrashCallback()
186 if (!JsStackInfo::loader->InsideStub(pc) && !JsStackInfo::loader->InsideAOT(pc)) { in CrashCallback()
189 LOG_ECMA(ERROR) << std::hex << "CrashCallback pc:" << pc << " fp:" << fp; in CrashCallback()
322 bool StepArkManagedNativeFrame(int pid, uintptr_t *pc, uintptr_t *fp, uintptr_t *sp, in StepArkManagedNativeFrame() argument
362 if (!ReadUintptrFromAddr(pid, currentPtr, *pc)) { in StepArkManagedNativeFrame()
434 uintptr_t pcOffset = MEMBER_OFFSET(AsmInterpretedFrame, pc); in GetArkJSHeapCrashInfo()
473 int pid, uintptr_t *pc, uintptr_t *fp, uintptr_t *sp, char *buf, size_t buf_sz) in step_ark_managed_native_frame() argument
475 if (panda::ecmascript::StepArkManagedNativeFrame(pid, pc, fp, sp, buf, buf_sz)) { in step_ark_managed_native_frame()
/arkcompiler/runtime_core/libpandabase/mem/
Dcode_allocator.cpp78 bool CodeAllocator::InAllocatedCodeRange(const void *pc) in InAllocatedCodeRange() argument
81 return (pc >= codeRangeStart_) && (pc <= codeRangeEnd_); in InAllocatedCodeRange()

12345