summaryrefslogtreecommitdiff
path: root/include/opcode
diff options
context:
space:
mode:
authorDmitry Selyutin <ghostmansd@gmail.com>2022-07-25 16:10:15 +0300
committerAlan Modra <amodra@gmail.com>2022-08-11 18:38:29 +0930
commit59f08271dda07502f53575538efcd19d247c70e1 (patch)
tree08d89f7eeff1e07cf6b7563acad373b90c5b2f49 /include/opcode
parent33ae8a3ae31d8ea787d79d2a677d960721ffe682 (diff)
downloadbinutils-gdb-59f08271dda07502f53575538efcd19d247c70e1.tar.gz
ppc/svp64: introduce non-zero operand flag
svstep and svshape instructions subtract 1 before encoding some of the operands. Obviously zero is not supported for these operands. Whilst PPC_OPERAND_PLUS1 fits perfectly to mark that maximal value should be incremented, there is no flag which marks the fact that zero values are not allowed. This patch adds a new flag, PPC_OPERAND_NONZERO, for this purpose.
Diffstat (limited to 'include/opcode')
-rw-r--r--include/opcode/ppc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index cf72db6069d..3578f0d218d 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -463,6 +463,11 @@ extern const unsigned int num_powerpc_operands;
#define PPC_OPERAND_FCR (0x1000000)
#define PPC_OPERAND_UDI (0x2000000)
+/* Valid range of operand is 1..n rather than 0..n-1.
+ Before encoding, the operand value is decremented.
+ After decoding, the operand value is incremented. */
+#define PPC_OPERAND_NONZERO (0x4000000)
+
extern ppc_cpu_t ppc_parse_cpu (ppc_cpu_t, ppc_cpu_t *, const char *);
static inline int64_t