util/llvmdisassembler: map registers by names
Internal LLVM register IDs can and did change between LLVM versions. These magic integers are replaced by iterating over all LLVM registers and mapping them to FAIL* registers by name. As this iteration requires a LLVM object created from a binary, a static convenience function is added to LLVMtoFailTranslator which creates a translator given the binary filename. Building this functionality inside libfail-llvmdisassembler prevents experiments from needing to add LLVM includes and library definitions. Change-Id: I27927f40d5cb6d9a22bb2caf21ca2450f6bcb0b8
This commit is contained in:
@ -7,11 +7,13 @@
|
||||
|
||||
namespace fail {
|
||||
|
||||
class LLVMDisassembler;
|
||||
|
||||
class LLVMtoFailGem5 : public LLVMtoFailTranslator {
|
||||
|
||||
public:
|
||||
|
||||
LLVMtoFailGem5();
|
||||
LLVMtoFailGem5(LLVMDisassembler *disas);
|
||||
|
||||
};
|
||||
} // end of namespace
|
||||
|
||||
Reference in New Issue
Block a user