diff options
Diffstat (limited to 'lib/Target/WebAssembly/WebAssembly.td')
-rw-r--r-- | lib/Target/WebAssembly/WebAssembly.td | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/Target/WebAssembly/WebAssembly.td b/lib/Target/WebAssembly/WebAssembly.td index 99cf1f119a20..2f301da8e422 100644 --- a/lib/Target/WebAssembly/WebAssembly.td +++ b/lib/Target/WebAssembly/WebAssembly.td @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// /// /// \file -/// \brief This is a target description file for the WebAssembly architecture, +/// This is a target description file for the WebAssembly architecture, /// which is also known as "wasm". /// //===----------------------------------------------------------------------===// @@ -32,6 +32,15 @@ def FeatureNontrappingFPToInt : "HasNontrappingFPToInt", "true", "Enable non-trapping float-to-int conversion operators">; +def FeatureSignExt : + SubtargetFeature<"sign-ext", + "HasSignExt", "true", + "Enable sign extension operators">; + +def FeatureExceptionHandling : + SubtargetFeature<"exception-handling", "HasExceptionHandling", "true", + "Enable Wasm exception handling">; + //===----------------------------------------------------------------------===// // Architectures. //===----------------------------------------------------------------------===// @@ -68,6 +77,20 @@ def : ProcessorModel<"bleeding-edge", NoSchedModel, // Target Declaration //===----------------------------------------------------------------------===// +def WebAssemblyAsmParser : AsmParser { + // The physical register names are not in the binary format or asm text + let ShouldEmitMatchRegisterName = 0; +} + +def WebAssemblyAsmWriter : AsmWriter { + string AsmWriterClassName = "InstPrinter"; + int PassSubtarget = 0; + int Variant = 0; + bit isMCAsmWriter = 1; +} + def WebAssembly : Target { let InstructionSet = WebAssemblyInstrInfo; + let AssemblyParsers = [WebAssemblyAsmParser]; + let AssemblyWriters = [WebAssemblyAsmWriter]; } |