Skip to content
Snippets Groups Projects
Commit 3bb506ce authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

formalizing libtransform

parent e5ed3af9
No related branches found
No related tags found
No related merge requests found
#include <irdb-core>
namespace IRDB_SDK
{
using namespace std;
Instruction_t* insertAssemblyBefore (FileIR_t* firp, Instruction_t* before, string assembly, Instruction_t *target=nullptr);
Instruction_t* insertAssemblyAfter (FileIR_t* firp, Instruction_t* after , string assembly, Instruction_t *target=nullptr);
Instruction_t* insertDataBitsBefore (FileIR_t* firp, Instruction_t* before, string dataBits, Instruction_t *target=nullptr);
Instruction_t* insertDataBitsAfter (FileIR_t* firp, Instruction_t* after , string dataBits, Instruction_t *target=nullptr);
Instruction_t* addNewDataBits (FileIR_t* firp, string p_bits);
Instruction_t* addNewAssembly (FileIR_t* firp, string p_asm);
Instruction_t* addNewDataBits (FileIR_t* firp, Instruction_t* p_after, string p_bits);
Instruction_t* addNewAssembly (FileIR_t* firp, Instruction_t* p_after, string p_asm);
void setInstructionAssembly(
FileIR_t* firp,
Instruction_t* instr,
const string& p_asm,
Instruction_t *p_new_fallthrough,
Instruction_t* p_new_target=nullptr);
void setInstructionAssembly(FileIR_t* firp, Instruction_t* instr, const string& p_asm);
}
#include <string>
#include <set>
#include <map>
#include <irdb-core>
namespace IRDB_SDK
{
using namespace std;
class Transform
{
public:
Transform(FileIR_t * file);
virtual ~Transform() { }
Instruction_t* insertAssemblyBefore (Instruction_t* p_before, const string &p_asm, Instruction_t* p_targ=nullptr);
Instruction_t* insertAssemblyAfter (Instruction_t* p_after , const string &p_asm, Instruction_t* p_targ=nullptr);
Instruction_t* insertDataBitsBefore (Instruction_t* p_before, const string &p_asm, Instruction_t* p_targ=nullptr);
Instruction_t* insertDataBitsAfter (Instruction_t* p_after , const string &p_asm, Instruction_t* p_targ=nullptr);
Instruction_t* addNewDataBits (const string& p_bits);
Instruction_t* addNewAssembly (const string& p_asm);
void setInstructionAssembly(
Instruction_t* instr,
const string& p_asm,
Instruction_t *p_new_fallthrough,
Instruction_t* p_new_target=nullptr);
void setInstructionAssembly(Instruction_t* instr, const string& p_asm);
virtual FileIR_t* getFileIR();
private:
FileIR_t *m_fileIR;
};
}
#ifndef IRDB_SDK_transform
#define IRDB_SDK_transform
#include "inc-transform/transform.hpp"
#include "inc-transform/rewrite_util.hpp"
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment