Skip to content
Snippets Groups Projects
Commit 553c1e74 authored by jdh8d's avatar jdh8d
Browse files

extensions for xor globals, and moving xorg to libIRDB-decoded.

Former-commit-id: 803078e95f5a28ee831858404869326dcb89fd2e
parent 51c5c2a4
No related branches found
No related tags found
No related merge requests found
......@@ -35,11 +35,13 @@ class DecodedOperand_t
bool hasIndexRegister() const;
uint32_t getBaseRegister() const;
uint32_t getIndexRegister() const;
bool hasMemoryDisplacement() const;
virtual_offset_t getMemoryDisplacement() const;
bool isPcrel() const;
uint32_t getScaleValue() const;
uint32_t getMemoryDisplacementEncodingSize() const;
uint32_t getArgumentSizeInBytes() const;
uint32_t getArgumentSizeInBits() const;
bool isRead() const;
bool isWritten() const;
......
......@@ -194,6 +194,14 @@ uint32_t DecodedOperand_t::getScaleValue() const
return t->Memory.Scale; /* 0 indicates no scale */
}
bool DecodedOperand_t::hasMemoryDisplacement() const
{
if(!isMemory())
throw std::logic_error("GetBaseRegister called on not memory operand");
ARGTYPE *t=static_cast<ARGTYPE*>(arg_data);
return t->Memory.DisplacementAddr!=0;
}
virtual_offset_t DecodedOperand_t::getMemoryDisplacement() const
{
if(!isMemory())
......@@ -220,6 +228,12 @@ uint32_t DecodedOperand_t::getArgumentSizeInBytes() const
return t->ArgSize/8;
}
uint32_t DecodedOperand_t::getArgumentSizeInBits() const
{
ARGTYPE *t=static_cast<ARGTYPE*>(arg_data);
return t->ArgSize;
}
bool DecodedOperand_t::hasSegmentRegister() const
{
ARGTYPE *t=static_cast<ARGTYPE*>(arg_data);
......
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