mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Match X86 register names to number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77404 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
#include <algorithm>
|
||||
using namespace llvm;
|
||||
|
||||
static cl::opt<unsigned>
|
||||
AsmParserNum("asmparsernum", cl::init(0),
|
||||
cl::desc("Make -gen-asm-parser emit assembly parser #N"));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
AsmWriterNum("asmwriternum", cl::init(0),
|
||||
cl::desc("Make -gen-asm-writer emit assembly writer #N"));
|
||||
@@ -133,6 +137,15 @@ Record *CodeGenTarget::getInstructionSet() const {
|
||||
return TargetRec->getValueAsDef("InstructionSet");
|
||||
}
|
||||
|
||||
/// getAsmParser - Return the AssemblyParser definition for this target.
|
||||
///
|
||||
Record *CodeGenTarget::getAsmParser() const {
|
||||
std::vector<Record*> LI = TargetRec->getValueAsListOfDefs("AssemblyParsers");
|
||||
if (AsmParserNum >= LI.size())
|
||||
throw "Target does not have an AsmParser #" + utostr(AsmParserNum) + "!";
|
||||
return LI[AsmParserNum];
|
||||
}
|
||||
|
||||
/// getAsmWriter - Return the AssemblyWriter definition for this target.
|
||||
///
|
||||
Record *CodeGenTarget::getAsmWriter() const {
|
||||
|
||||
Reference in New Issue
Block a user