summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/opcodes/mips-formats.h
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/opcodes/mips-formats.h')
-rw-r--r--binutils-2.25/opcodes/mips-formats.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/binutils-2.25/opcodes/mips-formats.h b/binutils-2.25/opcodes/mips-formats.h
index 116d7c88..9c265a5e 100644
--- a/binutils-2.25/opcodes/mips-formats.h
+++ b/binutils-2.25/opcodes/mips-formats.h
@@ -53,6 +53,16 @@
return &op.root; \
}
+#define MAPPED_STRING(SIZE, LSB, MAP, ALLOW_CONSTANTS) \
+ { \
+ typedef char ATTRIBUTE_UNUSED \
+ static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static const struct mips_mapped_string_operand op = { \
+ { OP_MAPPED_STRING, SIZE, LSB }, MAP, ALLOW_CONSTANTS \
+ }; \
+ return &op.root; \
+ }
+
#define MSB(SIZE, LSB, BIAS, ADD_LSB, OPSIZE) \
{ \
static const struct mips_msb_operand op = { \