diff options
Diffstat (limited to 'llvm/utils/TableGen/RISCVTargetDefEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/RISCVTargetDefEmitter.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp b/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp index 39211aa..723f1d7 100644 --- a/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp +++ b/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/ADT/DenseSet.h" +#include "llvm/Support/Format.h" #include "llvm/Support/RISCVISAUtils.h" #include "llvm/TableGen/Record.h" #include "llvm/TableGen/TableGenBackend.h" @@ -166,7 +167,7 @@ static void emitRISCVProfiles(const RecordKeeper &Records, raw_ostream &OS) { static void emitRISCVProcs(const RecordKeeper &RK, raw_ostream &OS) { OS << "#ifndef PROC\n" << "#define PROC(ENUM, NAME, DEFAULT_MARCH, FAST_SCALAR_UNALIGN" - << ", FAST_VECTOR_UNALIGN)\n" + << ", FAST_VECTOR_UNALIGN, MVENDORID, MARCHID, MIMPID)\n" << "#endif\n\n"; // Iterate on all definition records. @@ -192,8 +193,17 @@ static void emitRISCVProcs(const RecordKeeper &RK, raw_ostream &OS) { printMArch(OS, Features); else OS << MArch; + + uint32_t MVendorID = Rec->getValueAsInt("MVendorID"); + uint64_t MArchID = Rec->getValueAsInt("MArchID"); + uint64_t MImpID = Rec->getValueAsInt("MImpID"); + OS << "\"}, " << FastScalarUnalignedAccess << ", " - << FastVectorUnalignedAccess << ")\n"; + << FastVectorUnalignedAccess; + OS << ", " << format_hex(MVendorID, 10); + OS << ", " << format_hex(MArchID, 18); + OS << ", " << format_hex(MImpID, 18); + OS << ")\n"; } OS << "\n#undef PROC\n"; OS << "\n"; |