[WebAssembly] Use TSFlags instead of keeping a list of special-case opcodes.
[oota-llvm.git] / lib / Target / WebAssembly / WebAssemblyInstrInfo.td
index 061a253816e4a07ec129f8f90d558396f96f5d90..dfa66cd2dc1d15b0724a4cac05e64f6baed41578 100644 (file)
@@ -138,9 +138,20 @@ def : Pat<(i32 (WebAssemblywrapper texternalsym:$addr)),
 let Defs = [ARGUMENTS] in {
 
 // Function signature and local variable declaration "instructions".
-def PARAM  : I<(outs), (ins variable_ops), [], ".param  \t">;
-def RESULT : I<(outs), (ins variable_ops), [], ".result \t">;
-def LOCAL  : I<(outs), (ins variable_ops), [], ".local  \t">;
+// Set TSFlags{0} to 1 to indicate that the variable_ops are immediates.
+// Set TSFlags{1} to 1 to indicate that the immediates represent types.
+def PARAM  : I<(outs), (ins variable_ops), [], ".param  \t"> {
+  let TSFlags{0} = 1;
+  let TSFlags{1} = 1;
+}
+def RESULT : I<(outs), (ins variable_ops), [], ".result \t"> {
+  let TSFlags{0} = 1;
+  let TSFlags{1} = 1;
+}
+def LOCAL  : I<(outs), (ins variable_ops), [], ".local  \t"> {
+  let TSFlags{0} = 1;
+  let TSFlags{1} = 1;
+}
 
 } // Defs = [ARGUMENTS]