[LLVMdev] Are Opcode and register mappings exposed anywhere?
Stephen Checkoway
s at pahtak.org
Mon Oct 28 09:00:26 PDT 2013
I'm iterating over MCInsts and I'd like to examine particular instructions. For example, I'd like to look at all x86 CALL64m instructions. I may be missing something, but it seems like my only option is to use MCInstPrinter::getOpcodeName and compare strings. (Of course, I could iterate through the opcodes and build up a table of the ones I'm interested in to avoid string comparisons.)
Register mappings to names seem to be even worse. It appears you have to go through MCInstPrinter::printRegName(raw_ostream&, unsigned).
Is there a better way?
--
Stephen Checkoway
More information about the llvm-dev
mailing list