mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Add the -mcpu= option to llvm-objdump for use with the disassemblers.
Also make the disassembler created with the Mach-O parser (the -m option) pick up the Target specific attributes specified with -mattr option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215032 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -93,6 +93,12 @@ cl::opt<std::string>
|
||||
llvm::TripleName("triple", cl::desc("Target triple to disassemble for, "
|
||||
"see -version for available targets"));
|
||||
|
||||
cl::opt<std::string>
|
||||
llvm::MCPU("mcpu",
|
||||
cl::desc("Target a specific cpu type (-mcpu=help for details)"),
|
||||
cl::value_desc("cpu-name"),
|
||||
cl::init(""));
|
||||
|
||||
cl::opt<std::string>
|
||||
llvm::ArchName("arch", cl::desc("Target arch to disassemble for, "
|
||||
"see -version for available targets"));
|
||||
@ -107,8 +113,8 @@ static cl::alias
|
||||
SectionHeadersShorter("h", cl::desc("Alias for --section-headers"),
|
||||
cl::aliasopt(SectionHeaders));
|
||||
|
||||
static cl::list<std::string>
|
||||
MAttrs("mattr",
|
||||
cl::list<std::string>
|
||||
llvm::MAttrs("mattr",
|
||||
cl::CommaSeparated,
|
||||
cl::desc("Target specific attributes"),
|
||||
cl::value_desc("a1,+a2,-a3,..."));
|
||||
@ -303,7 +309,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
||||
}
|
||||
|
||||
std::unique_ptr<const MCSubtargetInfo> STI(
|
||||
TheTarget->createMCSubtargetInfo(TripleName, "", FeaturesStr));
|
||||
TheTarget->createMCSubtargetInfo(TripleName, MCPU, FeaturesStr));
|
||||
if (!STI) {
|
||||
errs() << "error: no subtarget info for target " << TripleName << "\n";
|
||||
return;
|
||||
|
Reference in New Issue
Block a user