diff options
author | Alan Modra <amodra@gmail.com> | 2007-04-20 12:25:15 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-04-20 12:25:15 +0000 |
commit | b84bf58af1e7ff1e983128c79145d5653cfe02ca (patch) | |
tree | c41ba7612fedd4b9b6fbd656320fe43e187ce5ca /gas/messages.c | |
parent | 1f90c7572b48869c092b1c91341387859ccd2c06 (diff) | |
download | gdb-b84bf58af1e7ff1e983128c79145d5653cfe02ca.zip gdb-b84bf58af1e7ff1e983128c79145d5653cfe02ca.tar.gz gdb-b84bf58af1e7ff1e983128c79145d5653cfe02ca.tar.bz2 |
include/opcode/
* ppc.h (struct powerpc_operand): Replace "bits" with "bitm".
(num_powerpc_operands): Declare.
(PPC_OPERAND_SIGNED et al): Redefine as hex.
(PPC_OPERAND_PLUS1): Define.
opcodes/
* ppc-dis.c (print_insn_powerpc): Adjust for struct powerpc_operand
change.
* ppc-opc.c (powerpc_operands): Replace bit count with bit mask
in all entries. Add PPC_OPERAND_SIGNED to DE entry. Remove
references to following deleted functions.
(insert_bd, extract_bd, insert_dq, extract_dq): Delete.
(insert_ds, extract_ds, insert_de, extract_de): Delete.
(insert_des, extract_des, insert_li, extract_li): Delete.
(insert_nb, insert_rsq, insert_rtq, insert_ev2, extract_ev2): Delete.
(insert_ev4, extract_ev4, insert_ev8, extract_ev8): Delete.
(num_powerpc_operands): New constant.
(XSPRG_MASK): Remove entire SPRG field.
(powerpc_opcodes <bcctre, bcctrel>): Use XLBB_MASK not XLYBB_MASK.
gas/
* messages.c (as_internal_value_out_of_range): Extend to report
errors for values with invalid low bits set.
* config/tc-ppc.c (ppc_setup_opcodes): Check powerpc_operands bitm
fields. Check that operands and opcode fields are disjoint.
(ppc_insert_operand): Check operands using mask rather than bit
count. Check low bits too. Handle PPC_OPERAND_PLUS1. Adjust
insertion code.
(md_apply_fix): Adjust for struct powerpc_operand change.
Diffstat (limited to 'gas/messages.c')
-rw-r--r-- | gas/messages.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gas/messages.c b/gas/messages.c index 21381b4..5736bac 100644 --- a/gas/messages.c +++ b/gas/messages.c @@ -1,6 +1,6 @@ /* messages.c - error reporter - Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, - 2003, 2004, 2005, 2006 + 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -456,6 +456,23 @@ as_internal_value_out_of_range (char * prefix, if (prefix == NULL) prefix = ""; + if (val >= min && val <= max) + { + addressT right = max & -max; + + if (max <= 1) + abort (); + + /* xgettext:c-format */ + err = _("%s out of domain (%d is not a multiple of %d"); + if (bad) + as_bad_where (file, line, err, + prefix, (int) val, (int) right); + else + as_warn_where (file, line, err, + prefix, (int) val, (int) right); + } + if ( val < HEX_MAX_THRESHOLD && min < HEX_MAX_THRESHOLD && max < HEX_MAX_THRESHOLD |