Skip to content
Snippets Groups Projects
Commit 58dc35f9 authored by jdh8d's avatar jdh8d
Browse files

move globals improvements to libIRDB-decode

Former-commit-id: 650910476bebebae06883e343e962d6838c384a3
parent 194daf51
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ using namespace libIRDB;
using namespace std;
class DecodedOperand_t;
typedef std::vector<DecodedOperand_t> DecodedOperandVector_t;
class DecodedInstruction_t
{
......@@ -42,7 +43,7 @@ class DecodedInstruction_t
// 0-based. first operand is numbered 0.
bool hasOperand(const int op_num) const;
DecodedOperand_t getOperand(const int op_num) const;
vector<DecodedOperand_t> getOperands() const;
DecodedOperandVector_t getOperands() const;
private:
......
......@@ -30,6 +30,7 @@ class DecodedOperand_t
bool isPcrel() const;
uint32_t getScaleValue() const;
uint32_t getMemoryDisplacementEncodingSize() const;
uint32_t getArgumentSizeInBytes() const;
......
......@@ -174,9 +174,9 @@ DecodedOperand_t DecodedInstruction_t::getOperand(const int op_num) const
}
}
vector<DecodedOperand_t> DecodedInstruction_t::getOperands() const
DecodedOperandVector_t DecodedInstruction_t::getOperands() const
{
auto ret_val=vector<DecodedOperand_t>();
auto ret_val=DecodedOperandVector_t();
for(auto i=0;i<4;i++)
{
if(hasOperand(i))
......
......@@ -172,3 +172,9 @@ uint32_t DecodedOperand_t::getMemoryDisplacementEncodingSize() const
ARGTYPE *t=static_cast<ARGTYPE*>(arg_data);
return t->Memory.DisplacementSize;
}
uint32_t DecodedOperand_t::getArgumentSizeInBytes() const
{
ARGTYPE *t=static_cast<ARGTYPE*>(arg_data);
return t->ArgSize/8;
}
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