]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - opcodes/ppc-opc.c
Don't decode powerpc insns with invalid fields
authorAlan Modra <amodra@gmail.com>
Mon, 6 Mar 2017 09:09:34 +0000 (19:39 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 6 Mar 2017 11:24:23 +0000 (21:54 +1030)
commit73f07bffaf8d423295a38dde51dfe6ec7b273280
treec7f5d0cba46cac8c01b3e23a671b147f101785e6
parentea0de82ec2d7f109ba179d8d55130805e680f02d
Don't decode powerpc insns with invalid fields

Certain insns have restrictions on fields.  For example, the insn
mentioned in the PR, lqarx, must specify an even general purpose
register as its destination and that register cannot appear in
either of the base or index reg fields.  This holds even when the RA0
field is 0 (meaning a zero rather than r0).

PR 21124
* ppc-opc.c (extract_esync, extract_ls, extract_ral, extract_ram)
(extract_raq, extract_ras, extract_rbx): New functions.
(powerpc_operands): Use opposite corresponding insert function.
(Q_MASK): Define.
(powerpc_opcodes): Apply Q_MASK to all quad insns with even
register restriction.
opcodes/ChangeLog
opcodes/ppc-opc.c