aboutsummaryrefslogtreecommitdiffstats
path: root/tools/edis/EDOperand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/edis/EDOperand.cpp')
-rw-r--r--tools/edis/EDOperand.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/edis/EDOperand.cpp b/tools/edis/EDOperand.cpp
index c15860a..da6797e 100644
--- a/tools/edis/EDOperand.cpp
+++ b/tools/edis/EDOperand.cpp
@@ -125,6 +125,26 @@ int EDOperand::evaluate(uint64_t &result,
return -1;
}
+int EDOperand::isRegister() {
+ return(Inst.ThisInstInfo->operandFlags[OpIndex] & kOperandFlagRegister);
+}
+
+unsigned EDOperand::regVal() {
+ return Inst.Inst->getOperand(MCOpIndex).getReg();
+}
+
+int EDOperand::isImmediate() {
+ return(Inst.ThisInstInfo->operandFlags[OpIndex] & kOperandFlagImmediate);
+}
+
+uint64_t EDOperand::immediateVal() {
+ return Inst.Inst->getOperand(MCOpIndex).getImm();
+}
+
+int EDOperand::isMemory() {
+ return(Inst.ThisInstInfo->operandFlags[OpIndex] & kOperandFlagMemory);
+}
+
#ifdef __BLOCKS__
struct RegisterReaderWrapper {
EDRegisterBlock_t regBlock;