binutils-gdb/include/opcode
Peter Bergner 11a0cf2ec0 Allow for optional operands with non-zero default values.
ISA 2.07 (ie, POWER8) added the rfebb instruction which takes one operand
with the value of either a 0 or 1.  It also defines an extended mnemonic
with no operands (ie, "rfebb") that is supposed to be equivalent to "rfebb 1".
I implemented rfebb's lone operand with PPC_OPERAND_OPTIONAL, but the
problem is, optional operands that are ommitted always default to the
value 0, which is wrong in this case.  I have added support for allowing
non-zero default values by adding an additional flag PPC_OPERAND_OPTIONAL_VALUE
that specifies that the default operand value to be used is stored in the
SHIFT field of the operand field immediately following this one.

This fixes the rfebb issue.  I also fixed the mftb and mfcr instructions
so they use the same mechanism.  This allows us to flag invalid uses of
mfcr where we explicitly pass in a zero FXM value, like the use in a2.[sd].

include/opcode/

	* ppc.h (PPC_OPERAND_OPTIONAL_VALUE): New.
	(ppc_optional_operand_value): New inline function.

opcodes/
	* ppc-dis.h (skip_optional_operands): Use ppc_optional_operand_value.
	* ppc-opc.c (FXM4): Add non-zero optional value.
	(TBR): Likewise.
	(SXL): Likewise.
	(insert_fxm): Handle new default operand value.
	(extract_fxm): Likewise.
	(insert_tbr): Likewise.
	(extract_tbr): Likewise.

gas/
	* config/tc-ppc.c (md_assemble): Use ppc_optional_operand_value.
	Allow for optional operands without insert functions.

gas/testsuite/
	* gas/ppc/power8.d: Fixup rfebb test results.
	* gas/ppc/a2.s: Fix invalid mfcr test.
	* gas/ppc/a2.d: Likewise.
2015-06-19 17:17:07 -05:00
..
aarch64.h [AArch64] Add support for ARMv8.1 command line option 2015-06-04 11:14:07 +01:00
alpha.h
arc.h
arm.h [ARM] Support for ARMv8.1 command line option 2015-06-03 10:03:50 +01:00
avr.h
bfin.h
cgen.h
ChangeLog Allow for optional operands with non-zero default values. 2015-06-19 17:17:07 -05:00
ChangeLog-9103
convex.h
cr16.h
cris.h
crx.h
d10v.h
d30v.h
dlx.h
ft32.h
h8300.h
hppa.h
i370.h
i386.h
i860.h
i960.h
ia64.h
m68hc11.h
m68k.h
m88k.h
metag.h
mips.h
mmix.h
mn10200.h
mn10300.h
moxie.h
msp430-decode.h
msp430.h
nds32.h
nios2.h
nios2r1.h
np1.h
ns32k.h
pdp11.h
pj.h
pn.h
ppc.h Allow for optional operands with non-zero default values. 2015-06-19 17:17:07 -05:00
pyr.h
rl78.h
rx.h
s390.h
score-datadep.h
score-inst.h
sparc.h
spu-insns.h
spu.h
tahoe.h
tic4x.h
tic6x-control-registers.h
tic6x-insn-formats.h
tic6x-opcode-table.h
tic6x.h
tic30.h
tic54x.h
tic80.h
tilegx.h
tilepro.h
v850.h
vax.h
visium.h
xgate.h