[WebAssembly] Introduce a WebAssemblyTargetStreamer class.
[oota-llvm.git] / lib / Target / WebAssembly / MCTargetDesc / WebAssemblyMCTargetDesc.h
index 7c4fb6c3c59cbcf7b132216841ef1b79824cdb1f..9bac4f82822a486053c999dc3baa4458a00d081b 100644 (file)
@@ -48,19 +48,26 @@ enum OperandType {
   /// Floating-point immediate.
   OPERAND_FPIMM
 };
+
+/// WebAssembly-specific directive identifiers.
+enum Directive {
+  // FIXME: This is not the real binary encoding.
+  DotParam = UINT64_MAX - 0,   ///< .param
+  DotResult = UINT64_MAX - 1,  ///< .result
+  DotLocal = UINT64_MAX - 2,   ///< .local
+  DotEndFunc = UINT64_MAX - 3, ///< .endfunc
+};
+
 } // end namespace WebAssembly
 
 namespace WebAssemblyII {
 enum {
   // For variadic instructions, this flag indicates whether an operand
   // in the variable_ops range is an immediate value.
-  VariableOpIsImmediate       = (1 << 0),
-  // For immediate values in the variable_ops range, this flag indicates
-  // whether the value represents a type.
-  VariableOpImmediateIsType   = (1 << 1),
+  VariableOpIsImmediate = (1 << 0),
   // For immediate values in the variable_ops range, this flag indicates
   // whether the value represents a control-flow label.
-  VariableOpImmediateIsLabel  = (1 << 2),
+  VariableOpImmediateIsLabel = (1 << 1),
 };
 } // end namespace WebAssemblyII