[llvm] r257525 - [WebAsssembly] Register the MC register info.
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 13:27:56 PST 2016
Author: djg
Date: Tue Jan 12 15:27:55 2016
New Revision: 257525
URL: http://llvm.org/viewvc/llvm-project?rev=257525&view=rev
Log:
[WebAsssembly] Register the MC register info.
Modified:
llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp?rev=257525&r1=257524&r2=257525&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp Tue Jan 12 15:27:55 2016
@@ -46,6 +46,12 @@ static MCInstrInfo *createMCInstrInfo()
return X;
}
+static MCRegisterInfo *createMCRegisterInfo(const Triple & /*T*/) {
+ MCRegisterInfo *X = new MCRegisterInfo();
+ InitWebAssemblyMCRegisterInfo(X, 0);
+ return X;
+}
+
static MCInstPrinter *createMCInstPrinter(const Triple & /*T*/,
unsigned SyntaxVariant,
const MCAsmInfo &MAI,
@@ -93,6 +99,9 @@ extern "C" void LLVMInitializeWebAssembl
// Register the MC instruction info.
TargetRegistry::RegisterMCInstrInfo(*T, createMCInstrInfo);
+ // Register the MC register info.
+ TargetRegistry::RegisterMCRegInfo(*T, createMCRegisterInfo);
+
// Register the MCInstPrinter.
TargetRegistry::RegisterMCInstPrinter(*T, createMCInstPrinter);
More information about the llvm-commits
mailing list