diff options
author | Dmitry Selyutin <ghostmansd@gmail.com> | 2022-07-25 16:10:15 +0300 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-08-11 18:38:29 +0930 |
commit | 59f08271dda07502f53575538efcd19d247c70e1 (patch) | |
tree | 08d89f7eeff1e07cf6b7563acad373b90c5b2f49 /opcodes/ppc-dis.c | |
parent | 33ae8a3ae31d8ea787d79d2a677d960721ffe682 (diff) | |
download | gdb-59f08271dda07502f53575538efcd19d247c70e1.zip gdb-59f08271dda07502f53575538efcd19d247c70e1.tar.gz gdb-59f08271dda07502f53575538efcd19d247c70e1.tar.bz2 |
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 'opcodes/ppc-dis.c')
-rw-r--r-- | opcodes/ppc-dis.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c index db03dce..97f2e20 100644 --- a/opcodes/ppc-dis.c +++ b/opcodes/ppc-dis.c @@ -545,6 +545,9 @@ operand_value_powerpc (const struct powerpc_operand *operand, } } + if ((operand->flags & PPC_OPERAND_NONZERO) != 0) + ++value; + return value; } |