aboutsummaryrefslogtreecommitdiff
path: root/gas/ChangeLog
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-08-16 16:14:12 +0930
committerAlan Modra <amodra@gmail.com>2018-08-21 16:05:36 +0930
commit9cf7e5687f823a1009d25cb25ff653ee8372e517 (patch)
tree33fc95350dcbe996766c532ed4349dba4d01e4a0 /gas/ChangeLog
parent46807bf45106af5523ad06cf84e7b825dcb9f089 (diff)
downloadgdb-9cf7e5687f823a1009d25cb25ff653ee8372e517.zip
gdb-9cf7e5687f823a1009d25cb25ff653ee8372e517.tar.gz
gdb-9cf7e5687f823a1009d25cb25ff653ee8372e517.tar.bz2
Use operand->extract to provide defaults for optional PowerPC operands
Most optional operands to powerpc instructions use a default value of zero, but there are a few exceptions. Those have been handled by PPC_OPERAND_OPTIONAL_VALUE and an entry in the powerpc_operands table for the default value, smuggled in the shift field. This patch changes that to using the operand extract function to provide non-zero defaults. I've also moved the code determining whether optional operands are provided or omitted, to the point the first optional operand is seen, and allowed for the possibility of optional base register operands in a future patch. The patch does change the error you get on invalid assembly like ld 3,4 You'll now see "missing operand" rather than "syntax error; end of line, expected `('". gas/ * config/tc-ppc.c (md_assemble): Delay counting of optional operands until one is encountered. Allow for the possibility of optional base regs, ie. PPC_OPERAND_PARENS. Call ppc_optional_operand_value with extra args. include/ * opcode/ppc.h (struct powerpc_operand): Correct "insert" comment. Mention use of "extract" function to provide default value. (PPC_OPERAND_OPTIONAL_VALUE): Delete. (ppc_optional_operand_value): Rewrite to use extract function. opcodes/ * ppc-dis.c (operand_value_powerpc): Init "invalid". (skip_optional_operands): Count optional operands, and update ppc_optional_operand_value call. * ppc-opc.c (extract_dxdn): Remove ATTRIBUTE_UNUSED from used arg. (extract_vlensi): Likewise. (extract_fxm): Return default value for missing optional operand. (extract_ls, extract_raq, extract_tbr): Likewise. (insert_sxl, extract_sxl): New functions. (insert_esync, extract_esync): Remove Power9 handling and simplify. (powerpc_operands <FXM4, TBR>): Delete PPC_OPERAND_OPTIONAL_VALUE flag and extra entry. (powerpc_operands <SXL>): Likewise, and use insert_sxl and extract_sxl.
Diffstat (limited to 'gas/ChangeLog')
-rw-r--r--gas/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 031fb42..366f4c1 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
2018-08-21 Alan Modra <amodra@gmail.com>
+ * config/tc-ppc.c (md_assemble): Delay counting of optional
+ operands until one is encountered. Allow for the possibility
+ of optional base regs, ie. PPC_OPERAND_PARENS. Call
+ ppc_optional_operand_value with extra args.
+
+2018-08-21 Alan Modra <amodra@gmail.com>
+
* testsuite/gas/s12z/bit-manip-invalid.d: Correct regexps.
2018-08-18 John Darrington <john@darrington.wattle.id.au>