summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/MCTargetDesc
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-01-12 03:09:16 +0000
committerDan Gohman <dan433584@gmail.com>2016-01-12 03:09:16 +0000
commita11fb2373ce68abea6094221ab7101b94b574db4 (patch)
treec303a87fdaf7e4a7191d22e044f117d84210e0a3 /llvm/lib/Target/WebAssembly/MCTargetDesc
parent15414cd0a7b24ebd6f9466b5750c7bba0e610bd9 (diff)
downloadbcm5719-llvm-a11fb2373ce68abea6094221ab7101b94b574db4.tar.gz
bcm5719-llvm-a11fb2373ce68abea6094221ab7101b94b574db4.zip
[WebAssembly] Define OperandTypes for decoding immediate values.
llvm-svn: 257438
Diffstat (limited to 'llvm/lib/Target/WebAssembly/MCTargetDesc')
-rw-r--r--llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
index 06f3ea7bf86..753b78fde67 100644
--- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
+++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
@@ -15,6 +15,7 @@
#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
#define LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
+#include "llvm/MC/MCInstrDesc.h"
#include "llvm/Support/DataTypes.h"
namespace llvm {
@@ -40,6 +41,26 @@ MCAsmBackend *createWebAssemblyAsmBackend(const Triple &TT);
MCObjectWriter *createWebAssemblyELFObjectWriter(raw_pwrite_stream &OS,
bool Is64Bit, uint8_t OSABI);
+namespace WebAssembly {
+enum OperandType {
+ /// Basic block label in a branch construct.
+ OPERAND_BASIC_BLOCK = MCOI::OPERAND_FIRST_TARGET,
+ /// Floating-point immediate.
+ OPERAND_FPIMM
+};
+} // 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),
+};
+} // end namespace WebAssemblyII
+
} // end namespace llvm
// Defines symbolic names for WebAssembly registers. This defines a mapping from
@@ -56,15 +77,4 @@ MCObjectWriter *createWebAssemblyELFObjectWriter(raw_pwrite_stream &OS,
#define GET_SUBTARGETINFO_ENUM
#include "WebAssemblyGenSubtargetInfo.inc"
-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),
-};
-} // end namespace WebAssemblyII
-
#endif
OpenPOWER on IntegriCloud