Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Zipr Toolchain
Commits
e7124bc7
Commit
e7124bc7
authored
5 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
code cleanups
parent
ea88519b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
irdb-libs/libIRDB-core/src/decode_csx86.cpp
+7
-29
7 additions, 29 deletions
irdb-libs/libIRDB-core/src/decode_csx86.cpp
with
7 additions
and
29 deletions
irdb-libs/libIRDB-core/src/decode_csx86.cpp
+
7
−
29
View file @
e7124bc7
...
...
@@ -72,37 +72,15 @@ static bool isPartOfGroup(const cs_insn* the_insn, const x86_insn_group the_grp)
static
bool
isJmp
(
cs_insn
*
the_insn
)
{
return
isPartOfGroup
(
the_insn
,
X86_GRP_JUMP
);
}
#if 0
class CapstoneHandle_t
{
public:
CapstoneHandle_t(FileIR_t* firp=NULL)
{
const auto width=FileIR_t::getArchitectureBitWidth();
const auto mode = (width==64) ? CS_MODE_64: CS_MODE_32;
auto err = cs_open(CS_ARCH_X86, mode, &handle);
if (err)
{
const auto s=string("Failed on cs_open() with error returned: ")+to_string(err)+"\n";
throw std::runtime_error(s);
}
cs_option(handle, CS_OPT_DETAIL, CS_OPT_ON);
cs_option(handle, CS_OPT_SYNTAX, CS_OPT_SYNTAX_INTEL);
}
inline csh getHandle() { return handle; }
const
auto
is_jmp_grp
=
isPartOfGroup
(
the_insn
,
X86_GRP_JUMP
);
const
auto
is_loop
=
the_insn
->
id
==
X86_INS_LOOP
||
the_insn
->
id
==
X86_INS_LOOPE
||
the_insn
->
id
==
X86_INS_LOOPNE
;
private:
csh handle;
};
static CapstoneHandle_t *cs_handle=NULL;
#endif
return
is_jmp_grp
||
is_loop
;
}
template
<
class
type
>
static
inline
type
insnToImmedHelper
(
cs_insn
*
the_insn
,
csh
handle
)
...
...
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