[llvm-commits] [llvm] r95606 - in /llvm/trunk: include/llvm-c/EnhancedDisassembly.h tools/edis/EDMain.cpp tools/edis/EnhancedDisassembly.exports
Sean Callanan
scallanan at apple.com
Mon Feb 8 15:34:25 PST 2010
Author: spyffe
Date: Mon Feb 8 17:34:25 2010
New Revision: 95606
URL: http://llvm.org/viewvc/llvm-project?rev=95606&view=rev
Log:
Added header file declarations and .exports entries
for the new APIs offered by the enhanced disassembler
for inspecting operands.
Modified:
llvm/trunk/include/llvm-c/EnhancedDisassembly.h
llvm/trunk/tools/edis/EDMain.cpp
llvm/trunk/tools/edis/EnhancedDisassembly.exports
Modified: llvm/trunk/include/llvm-c/EnhancedDisassembly.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/EnhancedDisassembly.h?rev=95606&r1=95605&r2=95606&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/EnhancedDisassembly.h (original)
+++ llvm/trunk/include/llvm-c/EnhancedDisassembly.h Mon Feb 8 17:34:25 2010
@@ -368,10 +368,55 @@
int EDGetOperand(EDOperandRef *operand,
EDInstRef inst,
int index);
+
+/*!
+ @function EDOperandIsRegister
+ @param operand The operand to be queried.
+ @result 1 if the operand names a register; 0 if not; -1 on error.
+ */
+int EDOperandIsRegister(EDOperandRef operand);
+
+/*!
+ @function EDOperandIsImmediate
+ @param operand The operand to be queried.
+ @result 1 if the operand specifies an immediate value; 0 if not; -1 on error.
+ */
+int EDOperandIsImmediate(EDOperandRef operand);
+
+/*!
+ @function EDOperandIsMemory
+ @param operand The operand to be queried.
+ @result 1 if the operand specifies a location in memory; 0 if not; -1 on error.
+ */
+int EDOperandIsMemory(EDOperandRef operand);
+
+/*!
+ @function EDRegisterOperandValue
+ @param value A pointer whose target will be filled in with the LLVM register ID
+ of the register named by the operand.
+ @param operand The operand to be queried.
+ @result 0 on success; -1 otherwise.
+ */
+int EDRegisterOperandValue(unsigned *value,
+ EDOperandRef operand);
+
+/*!
+ @function EDImmediateOperandValue
+ @param value A pointer whose target will be filled in with the value of the
+ immediate.
+ @param operand The operand to be queried.
+ @result 0 on success; -1 otherwise.
+ */
+int EDImmediateOperandValue(uint64_t *value,
+ EDOperandRef operand);
/*!
@function EDEvaluateOperand
- Evaluates an operand using a client-supplied register state accessor.
+ Evaluates an operand using a client-supplied register state accessor. Register
+ operands are evaluated by reading the value of the register; immediate operands
+ are evaluated by reporting the immediate value; memory operands are evaluated
+ by computing the target address (with only those relocations applied that were
+ already applied to the original bytes).
@param result A pointer whose target is to be filled with the result of
evaluating the operand.
@param operand The operand to be evaluated.
Modified: llvm/trunk/tools/edis/EDMain.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDMain.cpp?rev=95606&r1=95605&r2=95606&view=diff
==============================================================================
--- llvm/trunk/tools/edis/EDMain.cpp (original)
+++ llvm/trunk/tools/edis/EDMain.cpp Mon Feb 8 17:34:25 2010
@@ -221,7 +221,7 @@
return 0;
}
-int EDImmedateOperandValue(uint64_t *value,
+int EDImmediateOperandValue(uint64_t *value,
EDOperandRef operand) {
if(!operand->isImmediate())
return -1;
Modified: llvm/trunk/tools/edis/EnhancedDisassembly.exports
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EnhancedDisassembly.exports?rev=95606&r1=95605&r2=95606&view=diff
==============================================================================
--- llvm/trunk/tools/edis/EnhancedDisassembly.exports (original)
+++ llvm/trunk/tools/edis/EnhancedDisassembly.exports Mon Feb 8 17:34:25 2010
@@ -25,6 +25,11 @@
_EDRegisterTokenValue
_EDNumOperands
_EDGetOperand
+_EDOperandIsRegister
+_EDOperandIsImmediate
+_EDOperandIsMemory
+_EDRegisterOperandValue
+_EDImmediateOperandValue
_EDEvaluateOperand
_EDBlockCreateInsts
_EDBlockEvaluateOperand
More information about the llvm-commits
mailing list