fxos/include/fxos/passes/syscall.h

35 lines
1.1 KiB
C++

//---------------------------------------------------------------------------//
// 1100101 |_ mov #0, r4 __ //
// 11 |_ <0xb380 %5c4> / _|_ _____ ___ //
// 0110 |_ 3.50 -> 3.60 | _\ \ / _ (_-< //
// |_ base# + offset |_| /_\_\___/__/ //
//---------------------------------------------------------------------------//
// fxos/passes/syscall: Detection and substitution of syscall addresses
//
// This function identifies arguments that refer to syscall addresses and
// annotate them with the syscall number. No name resolution is performed at
// this point, that happens in the print pass.
//---
#ifndef FXOS_PASSES_SYSCALL_H
#define FXOS_PASSES_SYSCALL_H
#include <fxos/disassembly.h>
#include <fxos/os.h>
namespace FxOS {
class SyscallPass: public InstructionDisassemblyPass
{
public:
SyscallPass(Disassembly &disasm, OS *os);
bool analyze(uint32_t pc, Instruction &inst) override;
private:
OS *m_os;
};
} /* namespace FxOS */
#endif /* FXOS_PASSES_SYSCALL_H */