]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/ChangeLog
PowerPC instruction mask checks
authorAlan Modra <amodra@gmail.com>
Tue, 6 Nov 2018 05:34:40 +0000 (16:04 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 6 Nov 2018 10:47:28 +0000 (21:17 +1030)
commit715537181e9ba6ab371265fc4455d89533202fc5
treeb6d97bebdc03ff67c69dfd7aa1fa433ec85038f8
parent2eac3da184459607a476ebb5dcebd6e0acf9fefa
PowerPC instruction mask checks

The instruction mask bits should never overlap any of the operands,
nor should operand bits overlap, but some operands weren't checked.
This patch arranges to check the omitted operands, using a mask
returned by the operand->insert function.  Some tweaking of various
insert functions is needed to support this: The error case must set
field bits.

Since I was looking at the insert functions, I tidied some dead code
and simplified some of the powerpc_operands entries.

gas/
* config/tc-ppc.c (insn_validate): Don't ignore mask in
PPC_OPSHIFT_INV case.  Call the insert function to calculate
a mask.
opcodes/
* ppc-opc.c (insert_arx, insert_ary, insert_rx, insert_ry, insert_ls),
(insert_evuimm1_ex0, insert_evuimm2_ex0, insert_evuimm4_ex0),
(insert_evuimm8_ex0, insert_evuimm_lt8, insert_evuimm_lt16),
(insert_rD_rS_even, insert_off_lsp, insert_off_spe2, insert_Ddd):
Don't return zero on error, insert mask bits instead.
(insert_sd4h, extract_sd4h, insert_sd4w, extract_sd4w): Delete.
(insert_sh6, extract_sh6): Delete dead code.
(insert_sprbat, insert_sprg): Use unsigned comparisions.
(powerpc_operands <OIMM>): Set shift count rather than using
PPC_OPSHIFT_INV.
<SE_SDH, SE_SDW>: Likewise.  Don't use insert/extract functions.
gas/ChangeLog
gas/config/tc-ppc.c
opcodes/ChangeLog
opcodes/ppc-opc.c