mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 09:03:22 -05:00
feat(relinker): report instruction conversion progress for executables and modules
This commit is contained in:
1 parent
b42aa8c540
commit
6224febfb0
10 files changed
+69
-64
No files matched your search
@@ -10,21 +10,13 @@ namespace Codegen {
|
||||
class InstructionScanner : public IInstructionScanner {
|
||||
public:
|
||||
explicit InstructionScanner(std::function<void(std::uint64_t, std::uint64_t)> progress) : progress(std::move(progress)) {}
|
||||
[[nodiscard]] std::vector<InstructionMatch> ScanCodeSection(
|
||||
const std::vector<std::uint8_t>& codeSection,
|
||||
Domain::FileByteOffset codeSectionOffset,
|
||||
Domain::FileByteOffset codeSectionSize
|
||||
) const override;
|
||||
[[nodiscard]] std::vector<InstructionMatch> ScanCodeSection(const std::vector<std::uint8_t>& codeSection, Domain::FileByteOffset codeSectionOffset, Domain::FileByteOffset codeSectionSize) const override;
|
||||
|
||||
private:
|
||||
std::function<void(std::uint64_t, std::uint64_t)> progress;
|
||||
};
|
||||
|
||||
std::vector<InstructionMatch> InstructionScanner::ScanCodeSection(
|
||||
const std::vector<std::uint8_t>& codeSection,
|
||||
const Domain::FileByteOffset codeSectionOffset,
|
||||
const Domain::FileByteOffset codeSectionSize
|
||||
) const {
|
||||
std::vector<InstructionMatch> InstructionScanner::ScanCodeSection(const std::vector<std::uint8_t>& codeSection, const Domain::FileByteOffset codeSectionOffset, const Domain::FileByteOffset codeSectionSize) const {
|
||||
const std::size_t limit = std::min(codeSection.size(), static_cast<std::size_t>(codeSectionSize));
|
||||
|
||||
const X64InstructionDecoder decoder;
|
||||
|
||||
Reference in new issue
Block a user