[PATCH] Add the -mcpu= option to llvm-rtdyld.

Vladimir Radosavljevic vladimir.radosavljevic at rt-rk.com
Wed Jun 17 06:53:40 PDT 2015


Hi lhames, petarj,

This patch adds the -mcpu= option to llvm-rtdyld. With this option, we can test relocations for different types of CPUs (e.g., Mips64r6).

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10503

Files:
  tools/llvm-rtdyld/llvm-rtdyld.cpp

Index: tools/llvm-rtdyld/llvm-rtdyld.cpp
===================================================================
--- tools/llvm-rtdyld/llvm-rtdyld.cpp
+++ tools/llvm-rtdyld/llvm-rtdyld.cpp
@@ -81,6 +81,12 @@
 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."),
@@ -575,7 +581,7 @@
   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));

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10503.27832.patch
Type: text/x-patch
Size: 954 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150617/3fad1331/attachment.bin>


More information about the llvm-commits mailing list