1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02: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

llvm-svn: 240477
This commit is contained in:
Petar Jovanovic 2015-06-23 22:52:19 +00:00
parent bca9f0ccb7
commit da5324d964

View File

@ -82,6 +82,12 @@ Dylibs("dylib",
static cl::opt<std::string>
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>
CheckFiles("check",
cl::desc("File containing RuntimeDyld verifier checks."),
@ -539,7 +545,7 @@ static int linkAndVerify() {
TripleName = TheTriple.getTriple();
std::unique_ptr<MCSubtargetInfo> STI(
TheTarget->createMCSubtargetInfo(TripleName, "", ""));
TheTarget->createMCSubtargetInfo(TripleName, MCPU, ""));
assert(STI && "Unable to create subtarget info!");
std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TripleName));