Add a new method which tries to compute the target address referenced by an operand.
This patch supports x86_64 RIP-relative addressing for now.
It is necessary to print referenced symbol names in llvm-objdump.
Differential D63847
[MC] Add MCInstrAnalysis::evaluateMemoryOperandAddress seiya on Jun 26 2019, 3:32 PM. Authored by
Details Add a new method which tries to compute the target address referenced by an operand. This patch supports x86_64 RIP-relative addressing for now. It is necessary to print referenced symbol names in llvm-objdump.
Diff Detail
Event Timeline
Comment Actions Are you planning to use it in llvm-objdump to symbolize instructions like: mov 0x206a3d(%rip),%rax # 207fe8 <__cxa_finalize@plt+0x2066a8>? When you make a dependent llvm-objdump change, you may add the test somewhere under test/tools/llvm-objdump
Comment Actions Yes. The example you showed is exactly what I'm going to implement. I plan to submit a separate patch which add tests along with the implementation of the feature in llvm-objdump.
Comment Actions I've added a couple more reviewers for you @seiya, based on the code owners file. No idea if either of them will have a chance to give this a look, but hopefully somebody will.
|