aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.c
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2003-12-10 22:12:50 +0000
committerZack Weinberg <zackw@panix.com>2003-12-10 22:12:50 +0000
commit1f6c9eb08453736ce145144dbdd0b3727e2c5592 (patch)
treef37591828f9f05c6d90404b1fd903a36bbf2125d /gas/config/tc-ppc.c
parent7ae4c3a566beba00e16dd10bb69414ffc214dcbb (diff)
downloadgdb-1f6c9eb08453736ce145144dbdd0b3727e2c5592.zip
gdb-1f6c9eb08453736ce145144dbdd0b3727e2c5592.tar.gz
gdb-1f6c9eb08453736ce145144dbdd0b3727e2c5592.tar.bz2
opcodes:
* ppc-opc.c (MO): Make optional. (RAO, RSO, SHO): New optional forms of RA, RS, SH operands. (tlbwe): Accept for both PPC403 and BOOKE. Make all operands optional. gas: * tc-ppc.c (md_assemble): Rewrite comment about optional operands to indicate that 'all or none' is also handled. Pluralize a word in another comment. gas/testsuite: * gas/ppc/booke.s: Add two more forms of the mbar instruction and three forms of the tlbwe instruction. * gas/ppc/booke.d: Update to match.
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r--gas/config/tc-ppc.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 84698be..f4cf419 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -2136,13 +2136,14 @@ md_assemble (str)
/* PowerPC operands are just expressions. The only real issue is
that a few operand types are optional. All cases which might use
- an optional operand separate the operands only with commas (in
- some cases parentheses are used, as in ``lwz 1,0(1)'' but such
- cases never have optional operands). There is never more than
- one optional operand for an instruction. So, before we start
- seriously parsing the operands, we check to see if we have an
- optional operand, and, if we do, we count the number of commas to
- see whether the operand should be omitted. */
+ an optional operand separate the operands only with commas (in some
+ cases parentheses are used, as in ``lwz 1,0(1)'' but such cases never
+ have optional operands). Most instructions with optional operands
+ have only one. Those that have more than one optional operand can
+ take either all their operands or none. So, before we start seriously
+ parsing the operands, we check to see if we have optional operands,
+ and if we do, we count the number of commas to see which operands
+ have been omitted. */
skip_optional = 0;
for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++)
{
@@ -2178,7 +2179,7 @@ md_assemble (str)
/* If there are fewer operands in the line then are called
for by the instruction, we want to skip the optional
- operand. */
+ operands. */
if (opcount < num_operands_expected)
skip_optional = 1;