Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IRDB SDK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
IRDB SDK
Commits
3bb506ce
Commit
3bb506ce
authored
6 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
formalizing libtransform
parent
e5ed3af9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/inc-transform/rewrite_util.hpp
+28
-0
28 additions, 0 deletions
include/inc-transform/rewrite_util.hpp
include/inc-transform/transform.hpp
+44
-0
44 additions, 0 deletions
include/inc-transform/transform.hpp
include/irdb-transform
+9
-0
9 additions, 0 deletions
include/irdb-transform
with
81 additions
and
0 deletions
include/inc-transform/rewrite_util.hpp
0 → 100644
+
28
−
0
View file @
3bb506ce
#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
);
}
This diff is collapsed.
Click to expand it.
include/inc-transform/transform.hpp
0 → 100644
+
44
−
0
View file @
3bb506ce
#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
;
};
}
This diff is collapsed.
Click to expand it.
include/irdb-transform
0 → 100644
+
9
−
0
View file @
3bb506ce
#ifndef IRDB_SDK_transform
#define IRDB_SDK_transform
#include "inc-transform/transform.hpp"
#include "inc-transform/rewrite_util.hpp"
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment