mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-20 12:31:40 +00:00
Add "-mcpu=" option to llvm-rtdyld
This patch adds the -mcpu= option to llvm-rtdyld. With this option, one can test relocations for different types of CPUs (e.g. Mips64r6). Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D10503 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240477 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
926d65d4f7
commit
8dad59bc3e
@ -82,6 +82,12 @@ Dylibs("dylib",
|
|||||||
static cl::opt<std::string>
|
static cl::opt<std::string>
|
||||||
TripleName("triple", cl::desc("Target triple for disassembler"));
|
TripleName("triple", cl::desc("Target triple for disassembler"));
|
||||||
|
|
||||||
|
static cl::opt<std::string>
|
||||||
|
MCPU("mcpu",
|
||||||
|
cl::desc("Target a specific cpu type (-mcpu=help for details)"),
|
||||||
|
cl::value_desc("cpu-name"),
|
||||||
|
cl::init(""));
|
||||||
|
|
||||||
static cl::list<std::string>
|
static cl::list<std::string>
|
||||||
CheckFiles("check",
|
CheckFiles("check",
|
||||||
cl::desc("File containing RuntimeDyld verifier checks."),
|
cl::desc("File containing RuntimeDyld verifier checks."),
|
||||||
@ -539,7 +545,7 @@ static int linkAndVerify() {
|
|||||||
TripleName = TheTriple.getTriple();
|
TripleName = TheTriple.getTriple();
|
||||||
|
|
||||||
std::unique_ptr<MCSubtargetInfo> STI(
|
std::unique_ptr<MCSubtargetInfo> STI(
|
||||||
TheTarget->createMCSubtargetInfo(TripleName, "", ""));
|
TheTarget->createMCSubtargetInfo(TripleName, MCPU, ""));
|
||||||
assert(STI && "Unable to create subtarget info!");
|
assert(STI && "Unable to create subtarget info!");
|
||||||
|
|
||||||
std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TripleName));
|
std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TripleName));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user