From 51b9be96ba95ea765c047917c2aadc65d80c802f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 20 Apr 2007 12:25:15 +0000 Subject: 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 ): 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. --- gas/messages.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'gas/messages.c') diff --git a/gas/messages.c b/gas/messages.c index 21381b47e9..5736bac716 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 -- cgit v1.2.1